Merge remote-tracking branch 'upstream/master' into aes-256-cbc-decrypt-test

This commit is contained in:
pyrho 2014-10-28 02:20:58 +01:00
commit 0982081dd7
3 changed files with 11 additions and 14 deletions

View File

@ -1,4 +1,4 @@
use libc::{c_int, c_ulong, c_void}; use libc::{c_int, c_ulong};
use std::{fmt, ptr}; use std::{fmt, ptr};
use std::c_str::CString; use std::c_str::CString;
use std::num::{One, Zero}; use std::num::{One, Zero};
@ -6,16 +6,6 @@ use std::num::{One, Zero};
use ffi; use ffi;
use ssl::error::SslError; use ssl::error::SslError;
#[allow(dead_code)]
#[repr(C)]
pub struct BIGNUM {
d: *mut c_void,
top: c_int,
dmax: c_int,
neg: c_int,
flags: c_int,
}
pub struct BigNum(*mut ffi::BIGNUM); pub struct BigNum(*mut ffi::BIGNUM);
#[repr(C)] #[repr(C)]

11
src/ffi.rs Executable file → Normal file
View File

@ -6,8 +6,6 @@ use std::ptr;
use std::rt::mutex::NativeMutex; use std::rt::mutex::NativeMutex;
use sync::one::{Once, ONCE_INIT}; use sync::one::{Once, ONCE_INIT};
pub use bn::BIGNUM;
pub type ASN1_INTEGER = c_void; pub type ASN1_INTEGER = c_void;
pub type ASN1_STRING = c_void; pub type ASN1_STRING = c_void;
pub type ASN1_TIME = c_void; pub type ASN1_TIME = c_void;
@ -66,6 +64,15 @@ pub struct X509V3_CTX {
// Maybe more here // Maybe more here
} }
#[repr(C)]
pub struct BIGNUM {
pub d: *mut c_void,
pub top: c_int,
pub dmax: c_int,
pub neg: c_int,
pub flags: c_int,
}
pub type CRYPTO_EX_new = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, pub type CRYPTO_EX_new = extern "C" fn(parent: *mut c_void, ptr: *mut c_void,
ad: *const CRYPTO_EX_DATA, idx: c_int, ad: *const CRYPTO_EX_DATA, idx: c_int,
argl: c_long, argp: *const c_void) -> c_int; argl: c_long, argp: *const c_void) -> c_int;

View File

@ -15,6 +15,6 @@ pub mod asn1;
pub mod bn; pub mod bn;
pub mod bio; pub mod bio;
pub mod crypto; pub mod crypto;
pub mod ffi; mod ffi;
pub mod ssl; pub mod ssl;
pub mod x509; pub mod x509;