diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 99d868847..af9eea51a 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -430,8 +430,14 @@ when defineSsl: raise newException(SSLError, "No error reported.") if err == -1: raiseOSError(osLastError()) - var errStr = ErrErrorString(err, nil) - raise newException(SSLError, $errStr) + var errStr = $ErrErrorString(err, nil) + case err + of 336032814, 336032784: + errStr = "Please upgrade your OpenSSL library, it does not support the " & + "necessary protocols. OpenSSL error is: " & errStr + else: + discard + raise newException(SSLError, errStr) proc getExtraData*(ctx: SSLContext, index: int): RootRef = ## Retrieves arbitrary data stored inside SSLContext.