aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-02-17 13:44:21 -0800
committerSteven Fackler <[email protected]>2018-02-17 13:44:21 -0800
commit90d5f855113a30afa944829c4f19c2aa60156d82 (patch)
tree881d2d2b248d9cff2631d39f9ec372993d8f236e /openssl-sys/src
parentMerge pull request #844 from sfackler/fix-session-clone (diff)
downloadrust-openssl-90d5f855113a30afa944829c4f19c2aa60156d82.tar.xz
rust-openssl-90d5f855113a30afa944829c4f19c2aa60156d82.zip
Add SSL_version binding
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs6
-rw-r--r--openssl-sys/src/ossl110.rs3
2 files changed, 9 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..9c9afced 100644
--- a/openssl-sys/src/ossl110.rs
+++ b/openssl-sys/src/ossl110.rs
@@ -44,6 +44,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;