Add support LibreSSL and remove OpenSSL binding which we aren't using

This commit is contained in:
Rohit Aggarwal 2018-03-08 11:54:19 +00:00
parent 2d6cd9eb16
commit 55ffc9b2e4
4 changed files with 12 additions and 39 deletions

View File

@ -1876,6 +1876,12 @@ extern "C" {
ctx: *mut BN_CTX,
) -> c_int;
pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG;
pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG);
pub fn ECDSA_do_verify(dgst: *const c_uchar, dgst_len: c_int,
sig: *const ECDSA_SIG, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_sign(dgst: *const c_uchar, dgst_len: c_int, eckey: *mut ::EC_KEY) -> *mut ECDSA_SIG;
pub fn ERR_peek_last_error() -> c_ulong;
pub fn ERR_get_error() -> c_ulong;
pub fn ERR_get_error_line_data(

View File

@ -133,6 +133,12 @@ pub struct DSA {
pub engine: *mut ::ENGINE,
}
#[repr(C)]
pub struct ECDSA_SIG {
pub r: *mut ::BIGNUM,
pub s: *mut ::BIGNUM
}
#[repr(C)]
pub struct EVP_PKEY {
pub type_: c_int,

View File

@ -829,26 +829,6 @@ extern "C" {
);
pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong);
pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG;
pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG);
pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, pp: *mut *mut c_uchar) -> c_int;
pub fn d2i_ECDSA_SIG(sig: *mut *mut ECDSA_SIG, pp: *mut *const c_uchar, len: c_long) -> *mut ECDSA_SIG;
pub fn ECDSA_size(eckey: *const ::EC_KEY) -> c_int;
pub fn ECDSA_sign(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *mut c_uchar, siglen: *mut c_uint, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_sign(dgst: *const c_uchar, dgst_len: c_int, eckey: *mut ::EC_KEY) -> *mut ECDSA_SIG;
pub fn ECDSA_verify(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *const c_uchar, siglen: c_int, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_verify(dgst: *const c_uchar, dgst_len: c_int,
sig: *const ECDSA_SIG, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_sign_ex(dgst: *const c_uchar, dgstlen: c_int,
kinv: *const BIGNUM, rp: *const BIGNUM,
eckey: *mut ::EC_KEY) -> *mut ECDSA_SIG;
pub fn ECDSA_sign_setup(eckey: *mut ::EC_KEY, ctx: *mut ::BN_CTX, kinv: *mut *mut BIGNUM, rp: *mut *mut BIGNUM) -> c_int;
pub fn ECDSA_sign_ex(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *mut c_uchar, siglen: *mut c_uint,
kinv: *const BIGNUM, rp: *const BIGNUM, eckey: *mut ::EC_KEY) -> c_int;
pub fn ERR_load_crypto_strings();
pub fn RSA_generate_key(

View File

@ -365,25 +365,6 @@ extern "C" {
pub fn X509_REQ_get_version(req: *const X509_REQ) -> c_long;
pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut ::X509_NAME;
pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG;
pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG);
pub fn ECDSA_SIG_get0(sig: *const ECDSA_SIG, pr: *mut *const BIGNUM, ps: *mut *const BIGNUM);
pub fn ECDSA_SIG_set0(sig: *mut ECDSA_SIG, pr: *mut BIGNUM, ps: *mut BIGNUM) -> c_int;
pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, pp: *mut *mut c_uchar) -> c_int;
pub fn d2i_ECDSA_SIG(sig: *mut *mut ECDSA_SIG, pp: *mut *const c_uchar, len: c_long) -> *mut ECDSA_SIG;
pub fn ECDSA_size(eckey: *const ::EC_KEY) -> c_int;
pub fn ECDSA_sign(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *mut c_uchar, siglen: *mut c_uint, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_sign(dgst: *const c_uchar, dgst_len: c_int, eckey: *mut ::EC_KEY) -> *mut ECDSA_SIG;
pub fn ECDSA_verify(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *const c_uchar, siglen: c_int, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_verify(dgst: *const c_uchar, dgst_len: c_int,
sig: *const ECDSA_SIG, eckey: *mut ::EC_KEY) -> c_int;
pub fn ECDSA_do_sign_ex(dgst: *const c_uchar, dgstlen: c_int,
kinv: *const BIGNUM, rp: *const BIGNUM,
eckey: *mut ::EC_KEY) -> *mut ECDSA_SIG;
pub fn ECDSA_sign_setup(eckey: *mut ::EC_KEY, ctx: *mut ::BN_CTX, kinv: *mut *mut BIGNUM, rp: *mut *mut BIGNUM) -> c_int;
pub fn ECDSA_sign_ex(_type: c_int, dgst: *const c_uchar, dgstlen: c_int,
sig: *mut c_uchar, siglen: *mut c_uint,
kinv: *const BIGNUM, rp: *const BIGNUM, eckey: *mut ::EC_KEY) -> c_int;
}