libressl: make set_ecdh_auto available
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
524e8e3c5a
commit
0978f87095
|
|
@ -774,12 +774,12 @@ impl SslContextBuilder {
|
||||||
/// curve.
|
/// curve.
|
||||||
///
|
///
|
||||||
/// Requires the `v102` feature and OpenSSL 1.0.2.
|
/// Requires the `v102` feature and OpenSSL 1.0.2.
|
||||||
#[cfg(all(feature = "v102", ossl102))]
|
#[cfg(all(feature = "v102", any(ossl102, libressl)))]
|
||||||
pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
|
pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
|
||||||
self._set_ecdh_auto(onoff)
|
self._set_ecdh_auto(onoff)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(ossl102)]
|
#[cfg(any(ossl102,libressl))]
|
||||||
fn _set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
|
fn _set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
|
||||||
unsafe { cvt(ffi::SSL_CTX_set_ecdh_auto(self.as_ptr(), onoff as c_int)).map(|_| ()) }
|
unsafe { cvt(ffi::SSL_CTX_set_ecdh_auto(self.as_ptr(), onoff as c_int)).map(|_| ()) }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue