feat(boring): Add set_verify_cert_store_ref method to SslContextBuilder (#45)
This commit is contained in:
parent
72424152a9
commit
b48c194d16
|
|
@ -1163,6 +1163,19 @@ impl SslContextBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sets a custom certificate store for verifying peer certificates.
|
||||||
|
#[corresponds(SSL_CTX_set1_verify_cert_store)]
|
||||||
|
pub fn set_verify_cert_store_ref(
|
||||||
|
&mut self,
|
||||||
|
cert_store: &'static X509Store,
|
||||||
|
) -> Result<(), ErrorStack> {
|
||||||
|
unsafe {
|
||||||
|
cvt(ffi::SSL_CTX_set1_verify_cert_store(self.as_ptr(), cert_store.as_ptr()) as c_int)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Replaces the context's certificate store.
|
/// Replaces the context's certificate store.
|
||||||
#[corresponds(SSL_CTX_set_cert_store)]
|
#[corresponds(SSL_CTX_set_cert_store)]
|
||||||
pub fn set_cert_store(&mut self, cert_store: X509Store) {
|
pub fn set_cert_store(&mut self, cert_store: X509Store) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue