Function
build_tonic_tls_config
(materials: &TlsMaterials)
Source from the content-addressed store, hash-verified
| 223 | } |
| 224 | |
| 225 | pub fn build_tonic_tls_config(materials: &TlsMaterials) -> ClientTlsConfig { |
| 226 | let ca_cert = Certificate::from_pem(materials.ca.clone()); |
| 227 | let identity = Identity::from_pem(materials.cert.clone(), materials.key.clone()); |
| 228 | ClientTlsConfig::new() |
| 229 | .ca_certificate(ca_cert) |
| 230 | .identity(identity) |
| 231 | } |
| 232 | |
| 233 | #[derive(Debug)] |
| 234 | struct InsecureServerCertVerifier; |
Tested by
no test coverage detected