diff options
| author | Chris Cole <[email protected]> | 2015-01-03 11:10:03 -0500 |
|---|---|---|
| committer | Chris Cole <[email protected]> | 2015-01-03 11:10:03 -0500 |
| commit | f5f8c0e62b64a803cc6cd9fdfc4e3e1f8737fec2 (patch) | |
| tree | 2bd3de872d40f66dbd8b3d9489a5ec1f3c65da7b /openssl-sys/src | |
| parent | Merge remote-tracking branch 'upstream/master' (diff) | |
| parent | Added BN_add_word, BN_sub_word, BN_mul_word, BN_div_word. (diff) | |
| download | rust-openssl-f5f8c0e62b64a803cc6cd9fdfc4e3e1f8737fec2.tar.xz rust-openssl-f5f8c0e62b64a803cc6cd9fdfc4e3e1f8737fec2.zip | |
Merge branch 'master' of https://github.com/cjcole/rust-openssl
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index df38215d..7471616f 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -88,13 +88,6 @@ pub struct BIGNUM { impl Copy for BIGNUM {} -#[repr(C)] -pub struct BIGNUM_PTR { - pub ptr: *mut BIGNUM, -} - -impl Copy for BIGNUM_PTR {} - pub type CRYPTO_EX_new = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, ad: *const CRYPTO_EX_DATA, idx: c_int, argl: c_long, argp: *const c_void) -> c_int; @@ -275,7 +268,11 @@ extern "C" { pub fn BN_mod_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; pub fn BN_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; pub fn BN_nnmod(rem: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_word(r: *mut BIGNUM, w: c_ulong) -> c_ulong; + pub fn BN_add_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_sub_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_mul_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_div_word(r: *mut BIGNUM, w: c_ulong) -> c_ulong; + pub fn BN_mod_word(r: *const BIGNUM, w: c_ulong) -> c_ulong; pub fn BN_sqr(r: *mut BIGNUM, a: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; pub fn BN_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; @@ -309,11 +306,11 @@ extern "C" { pub fn BN_bn2bin(a: *mut BIGNUM, to: *mut u8) -> c_int; /* Conversion from/to decimal string representation */ - pub fn BN_dec2bn(a: *mut BIGNUM_PTR, s: *const i8) -> c_int; + pub fn BN_dec2bn(a: *const *mut BIGNUM, s: *const i8) -> c_int; pub fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char; /* Conversion from/to hexidecimal string representation */ - pub fn BN_hex2bn(a: *mut BIGNUM_PTR, s: *const i8) -> c_int; + pub fn BN_hex2bn(a: *const *mut BIGNUM, s: *const i8) -> c_int; pub fn BN_bn2hex(a: *mut BIGNUM) -> *const c_char; pub fn CRYPTO_num_locks() -> c_int; |