diff --git a/src/connection/verifier.rs b/src/connection/verifier.rs index d466d2e..ba4ad19 100644 --- a/src/connection/verifier.rs +++ b/src/connection/verifier.rs @@ -47,7 +47,10 @@ impl ClientCertVerifier for Verifier { return Err(rustls::Error::InvalidCertificate( rustls::CertificateError::NotValidForName, )); + } else { + return Ok(ClientCertVerified::assertion()); } + } else { } } todo!() diff --git a/src/sender/mod.rs b/src/sender/mod.rs index ebcad19..bd5b983 100644 --- a/src/sender/mod.rs +++ b/src/sender/mod.rs @@ -75,7 +75,7 @@ where let rustls_cert = rustls::Certificate(c.der); let cert_chain = vec![rustls_cert]; let key_der = rustls::PrivateKey(c.key); - cfg.with_single_cert(cert_chain, key_der)? + cfg.with_client_auth_cert(cert_chain, key_der)? } }; let client = ClientConnection::new(Arc::new(cfg), dnsname)?;