aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-01-22 19:07:38 -0800
committerSteven Fackler <[email protected]>2016-01-22 19:07:38 -0800
commit18e7e2455c3361cba5886641db6c25fd070f19c2 (patch)
treead33422954c1f20167f6af71d883f9c483eb46bd /openssl-sys/src
parentExclude test directory from package (diff)
parentFix up RSA integration (diff)
downloadrust-openssl-18e7e2455c3361cba5886641db6c25fd070f19c2.tar.xz
rust-openssl-18e7e2455c3361cba5886641db6c25fd070f19c2.zip
Merge pull request #330 from esclear/master
Add a interface to RSA structs
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs43
1 files changed, 41 insertions, 2 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index b4e97c1b..ff221935 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -22,9 +22,7 @@ pub type ENGINE = c_void;
pub type EVP_CIPHER = c_void;
pub type EVP_CIPHER_CTX = c_void;
pub type EVP_MD = c_void;
-pub type EVP_PKEY = c_void;
pub type EVP_PKEY_CTX = c_void;
-pub type RSA = c_void;
pub type SSL = c_void;
pub type SSL_CTX = c_void;
pub type SSL_METHOD = c_void;
@@ -65,6 +63,47 @@ pub struct BIO_METHOD {
unsafe impl Sync for BIO_METHOD {}
#[repr(C)]
+pub struct RSA {
+ pub pad: c_int,
+ pub version: c_long,
+ pub meth: *const c_void,
+
+ pub engine: *mut c_void,
+ pub n: *mut BIGNUM,
+ pub e: *mut BIGNUM,
+ pub d: *mut BIGNUM,
+ pub p: *mut BIGNUM,
+ pub q: *mut BIGNUM,
+ pub dmp1: *mut BIGNUM,
+ pub dmq1: *mut BIGNUM,
+ pub iqmp: *mut BIGNUM,
+
+ pub ex_data: *mut c_void,
+ pub references: c_int,
+ pub flags: c_int,
+
+ pub _method_mod_n: *mut c_void,
+ pub _method_mod_p: *mut c_void,
+ pub _method_mod_q: *mut c_void,
+
+ pub bignum_data: *mut c_char,
+ pub blinding: *mut c_void,
+ pub mt_blinding: *mut c_void,
+}
+
+#[repr(C)]
+pub struct EVP_PKEY {
+ pub type_: c_int,
+ pub save_type: c_int,
+ pub references: c_int,
+ pub ameth: *const c_void,
+ pub engine: *mut ENGINE,
+ pub pkey: *mut c_void,
+ pub save_parameters: c_int,
+ pub attributes: *mut c_void,
+}
+
+#[repr(C)]
pub struct BIO {
pub method: *mut BIO_METHOD,
pub callback: Option<unsafe extern "C" fn(*mut BIO,