aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src/openssl/v10x.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openssl-sys/src/openssl/v10x.rs')
-rw-r--r--openssl-sys/src/openssl/v10x.rs37
1 files changed, 28 insertions, 9 deletions
diff --git a/openssl-sys/src/openssl/v10x.rs b/openssl-sys/src/openssl/v10x.rs
index 6a4d4346..c22bb7fc 100644
--- a/openssl-sys/src/openssl/v10x.rs
+++ b/openssl-sys/src/openssl/v10x.rs
@@ -5,7 +5,7 @@ use std::ptr;
use std::sync::{Mutex, MutexGuard};
use std::sync::{Once, ONCE_INIT};
-#[cfg(not(ossl101))]
+#[cfg(ossl102)]
use libc::time_t;
use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t};
@@ -573,9 +573,6 @@ pub struct SSL_CTX {
#[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl101))]
srtp_profiles: *mut c_void,
-
- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
- srtp_profiles: *mut c_void,
#[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
alpn_select_cb: *mut c_void,
#[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
@@ -669,7 +666,7 @@ pub struct SRP_CTX {
}
#[repr(C)]
-#[cfg(not(ossl101))]
+#[cfg(ossl102)]
pub struct X509_VERIFY_PARAM {
pub name: *mut c_char,
pub check_time: time_t,
@@ -682,7 +679,7 @@ pub struct X509_VERIFY_PARAM {
pub id: *mut X509_VERIFY_PARAM_ID,
}
-#[cfg(not(ossl101))]
+#[cfg(ossl102)]
pub enum X509_VERIFY_PARAM_ID {}
pub enum PKCS12 {}
@@ -810,6 +807,28 @@ pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int {
::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int
}
+pub unsafe fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong {
+ ::SSL_CTX_ctrl(ctx as *mut _, ::SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong
+}
+
+pub unsafe fn SSL_CTX_set_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong {
+ ::SSL_CTX_ctrl(
+ ctx as *mut _,
+ ::SSL_CTRL_OPTIONS,
+ op as c_long,
+ ptr::null_mut(),
+ ) as c_ulong
+}
+
+pub unsafe fn SSL_CTX_clear_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong {
+ ::SSL_CTX_ctrl(
+ ctx as *mut _,
+ ::SSL_CTRL_CLEAR_OPTIONS,
+ op as c_long,
+ ptr::null_mut(),
+ ) as c_ulong
+}
+
extern "C" {
pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
pub fn BIO_s_file() -> *mut BIO_METHOD;
@@ -925,15 +944,15 @@ extern "C" {
loc: c_int,
set: c_int,
) -> c_int;
- #[cfg(not(ossl101))]
+ #[cfg(ossl102)]
pub fn X509_get0_signature(
psig: *mut *mut ::ASN1_BIT_STRING,
palg: *mut *mut ::X509_ALGOR,
x: *const ::X509,
);
- #[cfg(not(ossl101))]
+ #[cfg(ossl102)]
pub fn X509_get_signature_nid(x: *const X509) -> c_int;
- #[cfg(not(ossl101))]
+ #[cfg(ossl102)]
pub fn X509_ALGOR_get0(
paobj: *mut *mut ::ASN1_OBJECT,
pptype: *mut c_int,