Skip to content

Commit

Permalink
chore(doc): Update document to add ca certificate (#1919)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Sep 4, 2024
1 parent 5965daa commit be9ce61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tonic/src/transport/channel/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ impl ClientTlsConfig {
}
}

/// Sets the CA Certificate against which to verify the server's TLS certificate.
/// Adds the CA Certificate against which to verify the server's TLS certificate.
pub fn ca_certificate(self, ca_certificate: Certificate) -> Self {
let mut certs = self.certs;
certs.push(ca_certificate);
ClientTlsConfig { certs, ..self }
}

/// Sets the multiple CA Certificates against which to verify the server's TLS certificate.
/// Adds the multiple CA Certificates against which to verify the server's TLS certificate.
pub fn ca_certificates(self, ca_certificates: impl IntoIterator<Item = Certificate>) -> Self {
let mut certs = self.certs;
certs.extend(ca_certificates);
Expand Down

0 comments on commit be9ce61

Please sign in to comment.