net: don't call set_ecdh_auto for super old OpenSSL

And the fun thing is that currently we use a super old OpenSSL on
Windows.
This commit is contained in:
Leorize 2020-06-04 08:53:14 -05:00 • committed by Andreas Rumpf
commit 279438f1df
2 changed files with 4 additions and 6 deletions

View file

@ -585,7 +585,7 @@ when defineSsl:
#
# From OpenSSL >= 1.1.0, this setting is set by default and can't be
# overriden.
if newCTX.SSL_CTX_set_ecdh_auto(1) != 1:
if getOpenSSLVersion() >= 0x10002000 and newCTX.SSL_CTX_set_ecdh_auto(1) != 1:
raiseSSLError()
when defined(nimDisableCertificateValidation) or defined(windows):