diff options
author | Leorize <leorize+oss@disroot.org> | 2020-06-03 14:51:05 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-06-06 21:11:53 +0200 |
commit | f243f9aeb5c5ef6f59efadbee81feb918a20fae8 (patch) | |
tree | bbdc12396f297d9ec550c0f64834614aa8c647da /lib | |
parent | 78982b52f035904de0ba2b90f6e4cb43fb76e300 (diff) | |
download | Nim-f243f9aeb5c5ef6f59efadbee81feb918a20fae8.tar.gz |
openssl: fix erroneous function signatures
Now matches the declaration in openssl/err.h
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/net.nim | 2 | ||||
-rw-r--r-- | lib/wrappers/openssl.nim | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 1442e8544..c60caab08 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -479,8 +479,6 @@ when defineSsl: let err = ERR_peek_last_error() if err == 0: raise newException(SslError, "No error reported.") - if err == -1: - raiseOSError(osLastError()) var errStr = $ERR_error_string(err, nil) case err of 336032814, 336032784: diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index 5fd4def0b..01c53b755 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -478,10 +478,10 @@ proc BIO_free*(b: BIO): cint{.cdecl, dynlib: DLLUtilName, importc.} proc ERR_print_errors_fp*(fp: File){.cdecl, dynlib: DLLSSLName, importc.} -proc ERR_error_string*(e: cint, buf: cstring): cstring{.cdecl, +proc ERR_error_string*(e: culong, buf: cstring): cstring{.cdecl, dynlib: DLLUtilName, importc.} -proc ERR_get_error*(): cint{.cdecl, dynlib: DLLUtilName, importc.} -proc ERR_peek_last_error*(): cint{.cdecl, dynlib: DLLUtilName, importc.} +proc ERR_get_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.} +proc ERR_peek_last_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.} proc OPENSSL_config*(configName: cstring){.cdecl, dynlib: DLLSSLName, importc.} |