From 6b2d8bfc8b9e46ae92e490111cb6a2abc49a32b6 Mon Sep 17 00:00:00 2001 From: Leorize Date: Thu, 4 Jun 2020 18:13:06 -0500 Subject: net: also set TLSv1.3 cipher suites --- lib/wrappers/openssl.nim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/wrappers') diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index a3825b801..c81176a9b 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -296,6 +296,7 @@ when compileOption("dynlibOverride", "ssl") or defined(noOpenSSLHacks): SSl_state(ssl) and SSL_ST_INIT else: proc SSL_in_init*(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc.} + proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.} template OpenSSL_add_all_algorithms*() = discard @@ -423,6 +424,10 @@ else: 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")) + theProc(ctx, str) + proc ERR_load_BIO_strings*(){.cdecl, dynlib: DLLUtilName, importc.} proc SSL_new*(context: SslCtx): SslPtr{.cdecl, dynlib: DLLSSLName, importc.} -- cgit 1.4.1-2-gfad0