From 28320a65a734b2b38301ef149746a44cb23cd366 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 1 Sep 2015 10:56:33 +0200 Subject: Add SSL::set_ecdh_auto() This sets automatic curve selection and enables ECDH support. Requires LibreSSL or OpenSSL >= 1.0.2, so behind a feature gate. --- openssl/src/ssl/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'openssl/src') diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 3adf89e6..40e06e93 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -570,6 +570,14 @@ impl SslContext { }) } + #[cfg(feature = "ecdh_auto")] + pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(),SslError> { + wrap_ssl_result( + unsafe { + ffi::SSL_CTX_set_ecdh_auto(self.ctx, onoff as c_int) + }) + } + pub fn set_options(&mut self, option: SslContextOptions) -> SslContextOptions { let raw_bits = option.bits(); let ret = unsafe { -- cgit v1.2.3