aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r--openssl/src/ssl/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 578cfcd5..89abf59f 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -409,6 +409,15 @@ impl SslContext {
})
}
+ /// Adds a certificate to the certificate chain presented together with the
+ /// certificate specified using set_certificate()
+ pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Option<SslError> {
+ wrap_ssl_result(
+ unsafe {
+ ffi::SSL_CTX_add_extra_chain_cert(*self.ctx, cert.get_handle()) as c_int
+ })
+ }
+
/// Specifies the file that contains private key
pub fn set_private_key_file(&mut self, file: &Path,
file_type: X509FileType) -> Option<SslError> {