diff options
author | Björn Gustavsson <[email protected]> | 2016-11-24 11:57:55 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-12-02 13:19:58 +0100 |
commit | 458c012e18eda87803ef356221d68955f4b8012d (patch) | |
tree | a434e4d73849accba0a017055000297277a7dccd /lib/crypto/c_src/crypto_callback.h | |
parent | 78a5de9611c25a4e7b5248aa9828f949f3a5c131 (diff) | |
download | otp-458c012e18eda87803ef356221d68955f4b8012d.tar.gz otp-458c012e18eda87803ef356221d68955f4b8012d.tar.bz2 otp-458c012e18eda87803ef356221d68955f4b8012d.zip |
Support OpenSSL 1.1.0
Diffstat (limited to 'lib/crypto/c_src/crypto_callback.h')
-rw-r--r-- | lib/crypto/c_src/crypto_callback.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h index 894d86cfd9..2641cc0c8b 100644 --- a/lib/crypto/c_src/crypto_callback.h +++ b/lib/crypto/c_src/crypto_callback.h @@ -18,13 +18,20 @@ * %CopyrightEnd% */ +#include <openssl/crypto.h> +#if OPENSSL_VERSION_NUMBER < 0x10100000L +# define CCB_FILE_LINE_ARGS +#else +# define CCB_FILE_LINE_ARGS , const char *file, int line +#endif + struct crypto_callbacks { size_t sizeof_me; - void* (*crypto_alloc)(size_t size); - void* (*crypto_realloc)(void* ptr, size_t size); - void (*crypto_free)(void* ptr); + void* (*crypto_alloc)(size_t size CCB_FILE_LINE_ARGS); + void* (*crypto_realloc)(void* ptr, size_t size CCB_FILE_LINE_ARGS); + void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS); /* openssl callbacks */ #ifdef OPENSSL_THREADS |