wrappers/openssl: defer loading SSL_CTX_set_ciphersuites

This commit is contained in:
Leorize 2020-06-04 18:30:20 -05:00 • committed by Andreas Rumpf
commit 4fdf9cb808

View file

@ -425,7 +425,9 @@ else:
raiseInvalidLibrary MainProc raiseInvalidLibrary MainProc
proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint = proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint =
let theProc {.global.} = cast[proc(ctx: SslCtx, str: cstring) {.cdecl, gcsafe.}](sslSymThrows("SSL_CTX_set_ciphersuites")) var theProc {.global.}: proc(ctx: SslCtx, str: cstring) {.cdecl, gcsafe.}
if theProc.isNil:
theProc = cast[typeof(theProc)](sslSymThrows("SSL_CTX_set_ciphersuites"))
theProc(ctx, str) theProc(ctx, str)
proc ERR_load_BIO_strings*(){.cdecl, dynlib: DLLUtilName, importc.} proc ERR_load_BIO_strings*(){.cdecl, dynlib: DLLUtilName, importc.}