diff options
| author | Steven Fackler <[email protected]> | 2017-02-16 21:26:26 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-02-16 21:26:26 -0800 |
| commit | 5122b92f56327721f3c9b271e85808c3d692e2e1 (patch) | |
| tree | 5296967069e6a1634eed2e88d1031dc7d286adef /openssl-sys/src | |
| parent | Update 1.1.0 version (diff) | |
| parent | add Ok to result (diff) | |
| download | rust-openssl-5122b92f56327721f3c9b271e85808c3d692e2e1.tar.xz rust-openssl-5122b92f56327721f3c9b271e85808c3d692e2e1.zip | |
Merge pull request #582 from bluejekyll/master
add set_verify_cert_store() to ssl ctx
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index a599c369..0073e69a 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1143,6 +1143,8 @@ pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE: c_int = 65; pub const SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 70; pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 71; pub const SSL_CTRL_GET_EXTRA_CHAIN_CERTS: c_int = 82; +#[cfg(not(any(ossl101, libressl)))] +pub const SSL_CTRL_SET_VERIFY_CERT_STORE: c_int = 106; pub const SSL_MODE_ENABLE_PARTIAL_WRITE: c_long = 0x1; pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: c_long = 0x2; @@ -1349,6 +1351,11 @@ pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) - SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void) } +#[cfg(not(any(ossl101, libressl)))] +pub unsafe fn SSL_CTX_set0_verify_cert_store(ctx: *mut SSL_CTX, st: *mut X509_STORE) -> c_long { + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_VERIFY_CERT_STORE, 0, st as *mut c_void) +} + pub unsafe fn SSL_CTX_set_tlsext_servername_callback(ctx: *mut SSL_CTX, cb: Option<extern fn()>) -> c_long { |