diff options
| author | Steven Fackler <[email protected]> | 2016-11-01 22:50:22 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-01 22:50:22 -0700 |
| commit | aa0040125b4006bd7520220cb8330b5b3d24ffb4 (patch) | |
| tree | df457c02c2e0208b91bc190fc7375e30287995a7 /openssl-sys/src | |
| parent | Don't clear BigNums in destructor (diff) | |
| download | rust-openssl-aa0040125b4006bd7520220cb8330b5b3d24ffb4.tar.xz rust-openssl-aa0040125b4006bd7520220cb8330b5b3d24ffb4.zip | |
Use built in DH parameters when available
Fall back to a hardcoded PEM blob on 1.0.1, but serialized from
DH_get_2048_256.
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index f30d9f03..f5de44b6 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1346,8 +1346,8 @@ extern { pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int; + pub fn DH_new() -> *mut DH; pub fn DH_free(dh: *mut DH); - #[cfg(not(ossl101))] pub fn DH_get_1024_160() -> *mut DH; #[cfg(not(ossl101))] @@ -1471,6 +1471,7 @@ extern { pub fn PEM_read_bio_RSAPrivateKey(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option<PasswordCallback>, user_data: *mut c_void) -> *mut RSA; pub fn PEM_read_bio_RSA_PUBKEY(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option<PasswordCallback>, user_data: *mut c_void) -> *mut RSA; + pub fn PEM_write_bio_DHparams(bio: *mut BIO, x: *mut DH) -> c_int; pub fn PEM_write_bio_PrivateKey(bio: *mut BIO, pkey: *mut EVP_PKEY, cipher: *const EVP_CIPHER, kstr: *mut c_uchar, klen: c_int, callback: Option<PasswordCallback>, @@ -1724,5 +1725,4 @@ extern { pub fn HMAC_Final(ctx: *mut HMAC_CTX, md: *mut c_uchar, len: *mut c_uint) -> c_int; - pub fn DH_new() -> *mut DH; } |