fixes ssl static link regression (#20722)
This commit is contained in:
parent
75ece74bdd
commit
59083e2e48
1 changed files with 5 additions and 1 deletions
|
|
@ -280,7 +280,9 @@ proc TLSv1_method*(): PSSL_METHOD{.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
# and support SSLv3, TLSv1, TLSv1.1 and TLSv1.2
|
# and support SSLv3, TLSv1, TLSv1.1 and TLSv1.2
|
||||||
# SSLv23_method(), SSLv23_server_method(), SSLv23_client_method() are removed in 1.1.0
|
# SSLv23_method(), SSLv23_server_method(), SSLv23_client_method() are removed in 1.1.0
|
||||||
|
|
||||||
when compileOption("dynlibOverride", "ssl") or defined(noOpenSSLHacks):
|
const useStaticLink = compileOption("dynlibOverride", "ssl") or defined(noOpenSSLHacks)
|
||||||
|
|
||||||
|
when useStaticLink:
|
||||||
# Static linking
|
# Static linking
|
||||||
|
|
||||||
when defined(openssl10):
|
when defined(openssl10):
|
||||||
|
|
@ -839,6 +841,8 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
|
||||||
proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
|
proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
|
proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
|
||||||
SSL_get1_peer_certificate(ssl)
|
SSL_get1_peer_certificate(ssl)
|
||||||
|
elif useStaticLink:
|
||||||
|
proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
else:
|
else:
|
||||||
proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
|
proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
|
||||||
let methodSym = sslSymNullable("SSL_get_peer_certificate", "SSL_get1_peer_certificate")
|
let methodSym = sslSymNullable("SSL_get_peer_certificate", "SSL_get1_peer_certificate")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue