parent
f8b5464f31
commit
fb2ec8d192
1 changed files with 5 additions and 4 deletions
|
|
@ -331,6 +331,7 @@ when compileOption("dynlibOverride", "ssl") or defined(noOpenSSLHacks):
|
||||||
proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
proc SSLv2_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
proc SSLv2_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
proc SSLv3_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
proc SSLv3_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
|
||||||
|
proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, dynlib: DLLUtilName, importc.}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Here we're trying to stay compatible between openssl versions. Some
|
# Here we're trying to stay compatible between openssl versions. Some
|
||||||
|
|
@ -391,6 +392,10 @@ else:
|
||||||
let method2Proc = cast[proc(): PSSL_METHOD {.cdecl, gcsafe, raises: [].}](methodSym)
|
let method2Proc = cast[proc(): PSSL_METHOD {.cdecl, gcsafe, raises: [].}](methodSym)
|
||||||
return method2Proc()
|
return method2Proc()
|
||||||
|
|
||||||
|
proc CRYPTO_set_mem_functions(a,b,c: pointer) =
|
||||||
|
let theProc = cast[proc(a,b,c: pointer) {.cdecl.}](utilModule().symNullable("CRYPTO_set_mem_functions"))
|
||||||
|
if not theProc.isNil: theProc(a, b, c)
|
||||||
|
|
||||||
proc SSL_library_init*(): cint {.discardable.} =
|
proc SSL_library_init*(): cint {.discardable.} =
|
||||||
## Initialize SSL using OPENSSL_init_ssl for OpenSSL >= 1.1.0 otherwise
|
## Initialize SSL using OPENSSL_init_ssl for OpenSSL >= 1.1.0 otherwise
|
||||||
## SSL_library_init
|
## SSL_library_init
|
||||||
|
|
@ -572,10 +577,6 @@ const
|
||||||
useNimsAlloc = not defined(nimNoAllocForSSL) and not defined(gcDestructors)
|
useNimsAlloc = not defined(nimNoAllocForSSL) and not defined(gcDestructors)
|
||||||
|
|
||||||
when not useWinVersion and not defined(macosx) and not defined(android) and useNimsAlloc:
|
when not useWinVersion and not defined(macosx) and not defined(android) and useNimsAlloc:
|
||||||
proc CRYPTO_set_mem_functions(a,b,c: pointer) =
|
|
||||||
let theProc = cast[proc(a,b,c: pointer) {.cdecl.}](utilModule().symNullable("CRYPTO_set_mem_functions"))
|
|
||||||
if not theProc.isNil: theProc(a, b, c)
|
|
||||||
|
|
||||||
proc allocWrapper(size: int): pointer {.cdecl.} = allocShared(size)
|
proc allocWrapper(size: int): pointer {.cdecl.} = allocShared(size)
|
||||||
proc reallocWrapper(p: pointer; newSize: int): pointer {.cdecl.} =
|
proc reallocWrapper(p: pointer; newSize: int): pointer {.cdecl.} =
|
||||||
if p == nil:
|
if p == nil:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue