aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-14 22:26:32 -0700
committerGitHub <[email protected]>2016-10-14 22:26:32 -0700
commit1fe16382e034dea71f16bfcfc31c8952e66264a9 (patch)
tree3fe52191316bf3a45c01f18f06ff2fe806e7e8b7 /openssl-sys
parentMerge pull request #470 from sfackler/confs (diff)
parentFix test_alpn_server_select_none (diff)
downloadrust-openssl-1fe16382e034dea71f16bfcfc31c8952e66264a9.tar.xz
rust-openssl-1fe16382e034dea71f16bfcfc31c8952e66264a9.zip
Merge pull request #472 from sfackler/alpn-test
Fix test_alpn_server_select_none
Diffstat (limited to 'openssl-sys')
-rw-r--r--openssl-sys/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index 300ed056..026d6e6b 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -318,6 +318,18 @@ pub unsafe fn SSL_set_tlsext_host_name(s: *mut SSL, name: *mut c_char) -> c_long
name as *mut c_void)
}
+pub fn ERR_GET_LIB(l: c_ulong) -> c_int {
+ ((l >> 24) & 0x0FF) as c_int
+}
+
+pub fn ERR_GET_FUNC(l: c_ulong) -> c_int {
+ ((l >> 12) & 0xFFF) as c_int
+}
+
+pub fn ERR_GET_REASON(l: c_ulong) -> c_int {
+ (l & 0xFFF) as c_int
+}
+
extern {
pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int;
pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING;