aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorDaniel Albert <[email protected]>2016-01-01 19:33:49 +0000
committerDaniel Albert <[email protected]>2016-01-01 19:33:49 +0000
commit5813ca371dee64c1b2a8da53924be733c82a9421 (patch)
tree162606caaf6bef136ce2fe66e8363ef87cfc0612 /openssl-sys/src
parentUpdate README doc link (diff)
downloadrust-openssl-5813ca371dee64c1b2a8da53924be733c82a9421.tar.xz
rust-openssl-5813ca371dee64c1b2a8da53924be733c82a9421.zip
Add 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 f780b6d9..b6d2225b 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;
@@ -66,6 +64,47 @@ pub struct BIO_METHOD {
unsafe impl Sync for BIO_METHOD {}
#[repr(C)]
+pub struct RSA {
+ pad: c_int,
+ version: c_long,
+ 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,
+
+ ex_data: *mut c_void,
+ references: c_int,
+ flags: c_int,
+
+ _method_mod_n: *mut c_void,
+ _method_mod_p: *mut c_void,
+ _method_mod_q: *mut c_void,
+
+ bignum_data: *mut c_char,
+ blinding: *mut c_void,
+ 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,
+ engine: *mut ENGINE,
+ pub pkey: *mut c_void,
+ save_parameters: c_int,
+ attributes: *mut c_void,
+}
+
+#[repr(C)]
pub struct BIO {
pub method: *mut BIO_METHOD,
pub callback: Option<unsafe extern "C" fn(*mut BIO,