• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use super::super::*;
2 
3 extern "C" {
DH_new() -> *mut DH4     pub fn DH_new() -> *mut DH;
DH_free(dh: *mut DH)5     pub fn DH_free(dh: *mut DH);
DH_check(dh: *const DH, codes: *mut c_int) -> c_int6     pub fn DH_check(dh: *const DH, codes: *mut c_int) -> c_int;
7 
DH_generate_parameters( prime_len: c_int, generator: c_int, callback: Option<extern "C" fn(c_int, c_int, *mut c_void)>, cb_arg: *mut c_void, ) -> *mut DH8     pub fn DH_generate_parameters(
9         prime_len: c_int,
10         generator: c_int,
11         callback: Option<extern "C" fn(c_int, c_int, *mut c_void)>,
12         cb_arg: *mut c_void,
13     ) -> *mut DH;
14 
DH_generate_parameters_ex( dh: *mut DH, prime_len: c_int, generator: c_int, cb: *mut BN_GENCB, ) -> c_int15     pub fn DH_generate_parameters_ex(
16         dh: *mut DH,
17         prime_len: c_int,
18         generator: c_int,
19         cb: *mut BN_GENCB,
20     ) -> c_int;
21 
DH_generate_key(dh: *mut DH) -> c_int22     pub fn DH_generate_key(dh: *mut DH) -> c_int;
DH_compute_key(key: *mut c_uchar, pub_key: *const BIGNUM, dh: *mut DH) -> c_int23     pub fn DH_compute_key(key: *mut c_uchar, pub_key: *const BIGNUM, dh: *mut DH) -> c_int;
DH_size(dh: *const DH) -> c_int24     pub fn DH_size(dh: *const DH) -> c_int;
25 
d2i_DHparams(k: *mut *mut DH, pp: *mut *const c_uchar, length: c_long) -> *mut DH26     pub fn d2i_DHparams(k: *mut *mut DH, pp: *mut *const c_uchar, length: c_long) -> *mut DH;
i2d_DHparams(dh: *const DH, pp: *mut *mut c_uchar) -> c_int27     pub fn i2d_DHparams(dh: *const DH, pp: *mut *mut c_uchar) -> c_int;
28 
29     #[cfg(ossl102)]
DH_get_1024_160() -> *mut DH30     pub fn DH_get_1024_160() -> *mut DH;
31     #[cfg(ossl102)]
DH_get_2048_224() -> *mut DH32     pub fn DH_get_2048_224() -> *mut DH;
33     #[cfg(ossl102)]
DH_get_2048_256() -> *mut DH34     pub fn DH_get_2048_256() -> *mut DH;
35 
36     #[cfg(any(ossl110, libressl270))]
DH_set0_pqg(dh: *mut DH, p: *mut BIGNUM, q: *mut BIGNUM, g: *mut BIGNUM) -> c_int37     pub fn DH_set0_pqg(dh: *mut DH, p: *mut BIGNUM, q: *mut BIGNUM, g: *mut BIGNUM) -> c_int;
38     #[cfg(any(ossl110, libressl270))]
DH_get0_pqg( dh: *const DH, p: *mut *const BIGNUM, q: *mut *const BIGNUM, g: *mut *const BIGNUM, )39     pub fn DH_get0_pqg(
40         dh: *const DH,
41         p: *mut *const BIGNUM,
42         q: *mut *const BIGNUM,
43         g: *mut *const BIGNUM,
44     );
45 
46     #[cfg(any(ossl110, libressl270))]
DH_set0_key(dh: *mut DH, pub_key: *mut BIGNUM, priv_key: *mut BIGNUM) -> c_int47     pub fn DH_set0_key(dh: *mut DH, pub_key: *mut BIGNUM, priv_key: *mut BIGNUM) -> c_int;
48 
49     #[cfg(any(ossl110, libressl270))]
DH_get0_key(dh: *const DH, pub_key: *mut *const BIGNUM, priv_key: *mut *const BIGNUM)50     pub fn DH_get0_key(dh: *const DH, pub_key: *mut *const BIGNUM, priv_key: *mut *const BIGNUM);
51 }
52