Compare commits
No commits in common. "ca942d6e3e823dad828d3a63e19e83c425032be5" and "67b7a2d0ea8264fcf9e859668d170be8fdf87172" have entirely different histories.
ca942d6e3e
...
67b7a2d0ea
4 changed files with 3 additions and 16 deletions
|
@ -5,9 +5,10 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
digest = "0.10"
|
||||
libc = "0.2"
|
||||
libc = "0.2.146"
|
||||
rustls-pemfile = "1.0"
|
||||
sha2 = "0.10"
|
||||
time = "0.3"
|
||||
tinyrand = "0.5"
|
||||
x509-parser = "0.15"
|
||||
|
||||
|
|
|
@ -47,10 +47,7 @@ impl<S: FingerPrintStore> ClientCertVerifier for Verifier<S> {
|
|||
return Err(rustls::Error::InvalidCertificate(
|
||||
rustls::CertificateError::NotValidForName,
|
||||
));
|
||||
} else {
|
||||
return Ok(ClientCertVerified::assertion());
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
todo!()
|
||||
|
|
|
@ -535,17 +535,6 @@ fn chown(path: CString, uid: u32, gid: u32) -> Result<(), io::Error> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
fn chmod(path: CString, mode: u16) -> Result<(), io::Error> {
|
||||
unsafe {
|
||||
if libc::chmod(path.as_ptr(), mode) != 0 {
|
||||
return Err(io::Error::last_os_error());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn chmod(path: CString, mode: u32) -> Result<(), io::Error> {
|
||||
unsafe {
|
||||
if libc::chmod(path.as_ptr(), mode) != 0 {
|
||||
|
|
|
@ -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_client_auth_cert(cert_chain, key_der)?
|
||||
cfg.with_single_cert(cert_chain, key_der)?
|
||||
}
|
||||
};
|
||||
let client = ClientConnection::new(Arc::new(cfg), dnsname)?;
|
||||
|
|
Loading…
Add table
Reference in a new issue