Detect openssl related to outdated openssl and help user solve issue.
This commit is contained in:
parent
e4515f304a
commit
1975998c56
1 changed files with 8 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue