From 5813ca371dee64c1b2a8da53924be733c82a9421 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Fri, 1 Jan 2016 19:33:49 +0000 Subject: Add RSA structs --- openssl-sys/src/lib.rs | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'openssl-sys/src/lib.rs') 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; @@ -65,6 +63,47 @@ pub struct BIO_METHOD { // so we can create static BIO_METHODs 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, -- cgit v1.2.3 From 6ae8298f2c2a77eb96bd12a6c795f53696a0fe03 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Tue, 12 Jan 2016 17:46:08 +0000 Subject: Make all ffi structs' fields public --- openssl-sys/src/lib.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'openssl-sys/src/lib.rs') diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index b6d2225b..519b0001 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -65,9 +65,9 @@ unsafe impl Sync for BIO_METHOD {} #[repr(C)] pub struct RSA { - pad: c_int, - version: c_long, - meth: *const c_void, + pub pad: c_int, + pub version: c_long, + pub meth: *const c_void, pub engine: *mut c_void, pub n: *mut BIGNUM, @@ -79,17 +79,17 @@ pub struct RSA { pub dmq1: *mut BIGNUM, pub iqmp: *mut BIGNUM, - ex_data: *mut c_void, - references: c_int, - flags: c_int, + pub ex_data: *mut c_void, + pub references: c_int, + pub flags: c_int, - _method_mod_n: *mut c_void, - _method_mod_p: *mut c_void, - _method_mod_q: *mut c_void, + pub _method_mod_n: *mut c_void, + pub _method_mod_p: *mut c_void, + pub _method_mod_q: *mut c_void, - bignum_data: *mut c_char, - blinding: *mut c_void, - mt_blinding: *mut c_void, + pub bignum_data: *mut c_char, + pub blinding: *mut c_void, + pub mt_blinding: *mut c_void, } #[repr(C)] @@ -98,10 +98,10 @@ pub struct EVP_PKEY { pub save_type: c_int, pub references: c_int, pub ameth: *const c_void, - engine: *mut ENGINE, + pub engine: *mut ENGINE, pub pkey: *mut c_void, - save_parameters: c_int, - attributes: *mut c_void, + pub save_parameters: c_int, + pub attributes: *mut c_void, } #[repr(C)] -- cgit v1.2.3 From 3df4c479c97cc5044ae6773b20427030ce849461 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 10 Feb 2016 09:36:00 -0800 Subject: Release v0.7.6 --- openssl-sys/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openssl-sys/src/lib.rs') diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index ff221935..eb2717f3 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1,6 +1,6 @@ #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(dead_code)] -#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.5")] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.6")] extern crate libc; -- cgit v1.2.3