diff options
author | Leorize <leorize+oss@disroot.org> | 2020-06-04 10:50:28 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-06-06 21:11:53 +0200 |
commit | b323bccd8125e9fa4ff28330da1a3adf206b8d32 (patch) | |
tree | 6c1d874f705be01e09e07094dccc1c381cf704c7 /lib | |
parent | e80a23f4d2bf4f628cb6bf7c235cb63cc58fdcb0 (diff) | |
download | Nim-b323bccd8125e9fa4ff28330da1a3adf206b8d32.tar.gz |
wrappers/openssl: enable SSL_CTX_set_ecdh_auto for LibreSSL
This procedure is not no-op for older LibreSSL, and the ABI is kept for newer versions, so there's no harm in enabling it unconditionally for all LibreSSL versions.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/wrappers/openssl.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index 8a80a554c..82fcb2194 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -609,7 +609,7 @@ proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} = ## Set automatic curve selection. ## ## On OpenSSL >= 1.1.0 this is on by default and cannot be disabled. - if getOpenSSLVersion() < 0x010100000: + if getOpenSSLVersion() < 0x010100000 or getOpenSSLVersion() == 0x020000000: result = cint SSL_CTX_ctrl(ctx, SSL_CTRL_SET_ECDH_AUTO, onoff, nil) else: result = 1 |