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
parent 6b2d8bfc8b
commit 4fdf9cb808

View File

@@ -425,7 +425,9 @@ else:
raiseInvalidLibrary MainProc
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)
proc ERR_load_BIO_strings*(){.cdecl, dynlib: DLLUtilName, importc.}