mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
Merge pull request #3364 from tmm1/osx-ssl-compile
Avoid referencing undefined SSLv2_method on MacOSX
This commit is contained in:
@@ -223,10 +223,7 @@ when defined(ssl):
|
||||
of protSSLv23:
|
||||
newCTX = SSL_CTX_new(SSLv23_method()) # SSlv2,3 and TLS1 support.
|
||||
of protSSLv2:
|
||||
when not defined(linux):
|
||||
newCTX = SSL_CTX_new(SSLv2_method())
|
||||
else:
|
||||
raiseSslError()
|
||||
raiseSslError("SSLv2 is no longer secure and has been deprecated, use protSSLv3")
|
||||
of protSSLv3:
|
||||
newCTX = SSL_CTX_new(SSLv3_method())
|
||||
of protTLSv1:
|
||||
|
||||
@@ -314,10 +314,7 @@ when defined(ssl):
|
||||
of protSSLv23:
|
||||
newCTX = SSL_CTX_new(SSLv23_method()) # SSlv2,3 and TLS1 support.
|
||||
of protSSLv2:
|
||||
when not defined(linux) and not defined(OpenBSD):
|
||||
newCTX = SSL_CTX_new(SSLv2_method())
|
||||
else:
|
||||
raiseSslError()
|
||||
raiseSslError("SSLv2 is no longer secure and has been deprecated, use protSSLv3")
|
||||
of protSSLv3:
|
||||
newCTX = SSL_CTX_new(SSLv3_method())
|
||||
of protTLSv1:
|
||||
|
||||
Reference in New Issue
Block a user