diff options
author | Leorize <leorize+oss@disroot.org> | 2020-06-01 17:10:02 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-06-06 21:11:53 +0200 |
commit | 82092b3bb7ead1414f673ed7f43e9fa1dcf8c5f4 (patch) | |
tree | 37e8ab38ab54ed65833561bb62a56a0b808a8c35 /tests/stdlib/thttpclient_ssl.nim | |
parent | 61f2f1f5c5c563eefc8388c2b655ac816bcf676c (diff) | |
download | Nim-82092b3bb7ead1414f673ed7f43e9fa1dcf8c5f4.tar.gz |
asyncnet, net: call SSL_shutdown only when connection established
This commit prevents "SSL_shutdown while in init" errors from happening. See https://github.com/openssl/openssl/issues/710#issuecomment-253897666
Diffstat (limited to 'tests/stdlib/thttpclient_ssl.nim')
-rw-r--r-- | tests/stdlib/thttpclient_ssl.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/stdlib/thttpclient_ssl.nim b/tests/stdlib/thttpclient_ssl.nim index 2e9d1c5be..f06c1eddd 100644 --- a/tests/stdlib/thttpclient_ssl.nim +++ b/tests/stdlib/thttpclient_ssl.nim @@ -124,7 +124,8 @@ when not defined(windows): let msg = getCurrentExceptionMsg() log "client: exception: " & msg # SSL_shutdown:shutdown while in init - if not (msg.contains("shutdown while in init") or msg.contains("alert number 48") or - msg.contains("routines:CONNECT_CR_CERT:certificate verify failed")): + if not (msg.contains("alert number 48") or + msg.contains("routines:CONNECT_CR_CERT:certificate verify failed") or + msg.contains("routines:tls_process_server_certificate:certificate verify failed")): echo "CVerifyPeer exception: " & msg check(false) |