Commit 0978f870 authored by Marc-Antoine Perennou's avatar Marc-Antoine Perennou
Browse files

libressl: make set_ecdh_auto available

parent 524e8e3c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -774,12 +774,12 @@ impl SslContextBuilder {
    /// curve.
    ///
    /// 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> {
        self._set_ecdh_auto(onoff)
    }

    #[cfg(ossl102)]
    #[cfg(any(ossl102,libressl))]
    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(|_| ()) }
    }