diff options
author | Fredrik Gustafsson <[email protected]> | 2012-12-03 10:22:40 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-12-03 10:22:40 +0100 |
commit | c228ceb941e26a04317bd2f66a2ee64687f0f869 (patch) | |
tree | fb019fce335b6db5b92ce300ee707496a9fe759b /lib/crypto/c_src/crypto_callback.h | |
parent | f78daeeccbf6de61b9e5dae4dd70f12fba03a2ff (diff) | |
parent | 26dffbeec17226a25c00d4072cb0f5c29ed48cea (diff) | |
download | otp-c228ceb941e26a04317bd2f66a2ee64687f0f869.tar.gz otp-c228ceb941e26a04317bd2f66a2ee64687f0f869.tar.bz2 otp-c228ceb941e26a04317bd2f66a2ee64687f0f869.zip |
Merge branch 'fredrik/ssh/fix-idle-tests' into fredrik/ssh/rekeying
* fredrik/ssh/fix-idle-tests: (50 commits)
Modifications to idle_time testcase
Teach Win installer to handle redist on w2012/w8
ssl: Receive port EXIT-message so that it does not get mixed up with the protocol-error message we are expecting
ssl: Add and enhance tests
ssl: Consider new server options when resuming a session
Prepare release
ssl: Add dependencies to Makefile
Simplify the code for the generated info/0 function
Don't try to work around a non-loadable NIF library
Fix BER encoding when multiple levels of typedefs are used
Update megaco documentation
Update documentation for the asn1 application
Fix other applications
Fix use of asn1 in megaco
Remove the unused asn1ct_gen_ber module
Fix erroneous skipping for jinterface, erl_interface and ic
kernel: Heart port needs to be unregistered
Update preloaded modules
Update primary bootstrap
Update copyright years
...
Diffstat (limited to 'lib/crypto/c_src/crypto_callback.h')
-rw-r--r-- | lib/crypto/c_src/crypto_callback.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h new file mode 100644 index 0000000000..23ecba3e5d --- /dev/null +++ b/lib/crypto/c_src/crypto_callback.h @@ -0,0 +1,46 @@ +/* + * %CopyrightBegin% + * + * Copyright Ericsson AB 2012. All Rights Reserved. + * + * The contents of this file are subject to the Erlang Public License, + * Version 1.1, (the "License"); you may not use this file except in + * compliance with the License. You should have received a copy of the + * Erlang Public License along with this software. If not, it can be + * retrieved online at http://www.erlang.org/. + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + * the License for the specific language governing rights and limitations + * under the License. + * + * %CopyrightEnd% + */ + +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); + + /* openssl callbacks */ + #ifdef OPENSSL_THREADS + void (*locking_function)(int mode, int n, const char *file, int line); + unsigned long (*id_function)(void); + struct CRYPTO_dynlock_value* (*dyn_create_function)(const char *file, + int line); + void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value* ptr, + const char *file, int line); + void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *ptr, + const char *file, int line); + #endif /* OPENSSL_THREADS */ +}; + +typedef struct crypto_callbacks* get_crypto_callbacks_t(int nlocks); + +#ifndef HAVE_DYNAMIC_CRYPTO_LIB +struct crypto_callbacks* get_crypto_callbacks(int nlocks); +#endif + |