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.
This commit is contained in:
parent
e80a23f4d2
commit
b323bccd81
1 changed files with 1 additions and 1 deletions
|
|
@ -609,7 +609,7 @@ proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} =
|
||||||
## Set automatic curve selection.
|
## Set automatic curve selection.
|
||||||
##
|
##
|
||||||
## On OpenSSL >= 1.1.0 this is on by default and cannot be disabled.
|
## 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)
|
result = cint SSL_CTX_ctrl(ctx, SSL_CTRL_SET_ECDH_AUTO, onoff, nil)
|
||||||
else:
|
else:
|
||||||
result = 1
|
result = 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue