diff options
| author | Steven Fackler <[email protected]> | 2016-08-09 23:13:56 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-08-09 23:13:56 -0700 |
| commit | 35c79d176811af9e5cb0c012fe8daecbf7b0cdd4 (patch) | |
| tree | ddd891b25817a3bfbc67a466ccaf2668d2de2400 /openssl/src/dh | |
| parent | Test hmac features (diff) | |
| download | rust-openssl-35c79d176811af9e5cb0c012fe8daecbf7b0cdd4.tar.xz rust-openssl-35c79d176811af9e5cb0c012fe8daecbf7b0cdd4.zip | |
Fix build
Diffstat (limited to 'openssl/src/dh')
| -rw-r--r-- | openssl/src/dh/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openssl/src/dh/mod.rs b/openssl/src/dh/mod.rs index c0122d44..b9613a1d 100644 --- a/openssl/src/dh/mod.rs +++ b/openssl/src/dh/mod.rs @@ -7,9 +7,11 @@ use std::ptr; pub struct DH(*mut ffi::DH); impl DH { + /// Requires the `dh_from_params` feature. + #[cfg(feature = "dh_from_params")] pub fn from_params(p: BigNum, g: BigNum, q: BigNum) -> Result<DH, ErrorStack> { let dh = unsafe { - try_ssl_null!(ffi::DH_new_from_params(p.into_raw(), g.into_raw(), q.into_raw())) + try_ssl_null!(::c_helpers::rust_DH_new_from_params(p.into_raw(), g.into_raw(), q.into_raw())) }; Ok(DH(dh)) } @@ -75,6 +77,7 @@ mod tests { } #[test] + #[cfg(feature = "dh_from_params")] fn test_dh() { let mut ctx = SslContext::new(Sslv23).unwrap(); let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435\ |