aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-07-10 18:54:47 -0700
committerSteven Fackler <[email protected]>2018-07-10 18:54:47 -0700
commit9eeee0930c0b51f9a0e05f78183ebfbe33f5d284 (patch)
tree99860d063de7ee2269323e01d646460e8c12baaf /openssl-sys
parentPurge registry cache (diff)
downloadrust-openssl-9eeee0930c0b51f9a0e05f78183ebfbe33f5d284.tar.xz
rust-openssl-9eeee0930c0b51f9a0e05f78183ebfbe33f5d284.zip
Add bindings for custom error definition
Diffstat (limited to 'openssl-sys')
-rw-r--r--openssl-sys/src/lib.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index fd676f07..48d2aa9c 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -178,6 +178,12 @@ pub type PasswordCallback =
unsafe extern "C" fn(buf: *mut c_char, size: c_int, rwflag: c_int, user_data: *mut c_void)
-> c_int;
+#[repr(C)]
+pub struct ERR_STRING_DATA {
+ pub error: c_ulong,
+ pub string: *const c_char,
+}
+
pub type SHA_LONG = c_uint;
pub type SHA_LONG64 = u64;
@@ -1930,6 +1936,11 @@ extern "C" {
pub fn ERR_clear_error();
pub fn ERR_put_error(lib: c_int, func: c_int, reason: c_int, file: *const c_char, line: c_int);
pub fn ERR_set_error_data(data: *mut c_char, flags: c_int);
+ #[cfg(ossl110)]
+ pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA) -> c_int;
+ #[cfg(not(ossl110))]
+ pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA);
+ pub fn ERR_get_next_error_library() -> c_int;
pub fn EVP_md5() -> *const EVP_MD;
pub fn EVP_ripemd160() -> *const EVP_MD;
@@ -2602,8 +2613,7 @@ extern "C" {
pub fn SSL_CTX_set_psk_server_callback(
ssl: *mut SSL_CTX,
psk_server_cb: Option<
- extern "C" fn(*mut SSL, *const c_char, *mut c_uchar, c_uint)
- -> c_uint,
+ extern "C" fn(*mut SSL, *const c_char, *mut c_uchar, c_uint) -> c_uint,
>,
);