diff options
| author | Steven Fackler <[email protected]> | 2018-02-17 17:54:46 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-02-17 17:54:46 -0800 |
| commit | 9693c7ccf81ba5b0dfa5a16a08b954a241d3c3e4 (patch) | |
| tree | edc7ed42ba083b9d3c7f2d91a588650eed2b795b /openssl-sys/src | |
| parent | Merge pull request #844 from sfackler/fix-session-clone (diff) | |
| parent | Add some debugging-related bindings (diff) | |
| download | rust-openssl-9693c7ccf81ba5b0dfa5a16a08b954a241d3c3e4.tar.xz rust-openssl-9693c7ccf81ba5b0dfa5a16a08b954a241d3c3e4.zip | |
Merge pull request #845 from sfackler/ssl-version
Ssl version
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 6 | ||||
| -rw-r--r-- | openssl-sys/src/ossl110.rs | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index bfd7d0d7..47c13ec7 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1307,6 +1307,11 @@ pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: c_long = 0x200; pub const SSL_SESS_CACHE_NO_INTERNAL: c_long = SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | SSL_SESS_CACHE_NO_INTERNAL_STORE; +pub const SSL3_VERSION: c_int = 0x300; +pub const TLS1_VERSION: c_int = 0x301; +pub const TLS1_1_VERSION: c_int = 0x302; +pub const TLS1_2_VERSION: c_int = 0x303; + pub const TLSEXT_NAMETYPE_host_name: c_int = 0; pub const TLSEXT_STATUSTYPE_ocsp: c_int = 1; @@ -2374,6 +2379,7 @@ extern "C" { pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD; pub fn SSL_get_version(ssl: *const SSL) -> *const c_char; + pub fn SSL_version(ssl: *const SSL) -> c_int; pub fn SSL_state_string(ssl: *const SSL) -> *const c_char; pub fn SSL_state_string_long(ssl: *const SSL) -> *const c_char; pub fn SSL_set_verify( diff --git a/openssl-sys/src/ossl110.rs b/openssl-sys/src/ossl110.rs index 29462f30..6eb18a2f 100644 --- a/openssl-sys/src/ossl110.rs +++ b/openssl-sys/src/ossl110.rs @@ -33,6 +33,10 @@ pub enum X509_ALGOR {} pub enum X509_VERIFY_PARAM {} pub enum X509_REQ {} +#[cfg(ossl111)] +pub type SSL_CTX_keylog_cb_func = + Option<unsafe extern "C" fn(ssl: *const SSL, line: *const c_char)>; + pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000000; pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000000; pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000000; @@ -44,6 +48,9 @@ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00000000; pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00000000; pub const SSL_OP_NO_SSLv2: c_ulong = 0x00000000; +#[cfg(ossl111)] +pub const TLS1_3_VERSION: c_int = 0x304; + pub const OPENSSL_VERSION: c_int = 0; pub const OPENSSL_CFLAGS: c_int = 1; pub const OPENSSL_BUILT_ON: c_int = 2; @@ -212,6 +219,10 @@ extern "C" { unsafe extern "C" fn(*mut ::SSL, *const c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, >, ); + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; + #[cfg(ossl111)] + pub fn SSL_CTX_set_keylog_callback(ctx: *mut ::SSL_CTX, cb: SSL_CTX_keylog_cb_func); pub fn X509_getm_notAfter(x: *const ::X509) -> *mut ::ASN1_TIME; pub fn X509_getm_notBefore(x: *const ::X509) -> *mut ::ASN1_TIME; pub fn X509_get0_signature( |