diff options
author | bcook <> | 2018-11-11 06:41:28 +0000 |
---|---|---|
committer | bcook <> | 2018-11-11 06:41:28 +0000 |
commit | c3082ab78ba758ef51c552b6a91bdf1236de0cf8 (patch) | |
tree | 6d18ff101148258c403e820ff423d10a65fba89e /src/lib/libcrypto/engine/engine.h | |
parent | 32ccc9aa9f3dd1c0efa02d4b21376521a91e4705 (diff) | |
download | openbsd-c3082ab78ba758ef51c552b6a91bdf1236de0cf8.tar.gz openbsd-c3082ab78ba758ef51c552b6a91bdf1236de0cf8.tar.bz2 openbsd-c3082ab78ba758ef51c552b6a91bdf1236de0cf8.zip |
Add automatic threading initialization for libcrypto.
This implements automatic thread support initialization in libcrypto.
This does not remove any functions from the ABI, but does turn them into
no-ops. Stub implementations of pthread_mutex_(init|lock|unlock) are
provided for ramdisks.
This does not implement the new OpenSSL 1.1 thread API internally,
keeping the original CRYTPO_lock / CRYPTO_add_lock functions for library
locking. For -portable, crypto_lock.c can be reimplemented with
OS-specific primitives as needed.
ok beck@, tb@, looks sane guenther@
Diffstat (limited to 'src/lib/libcrypto/engine/engine.h')
-rw-r--r-- | src/lib/libcrypto/engine/engine.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h index 30d1bde4ae..0f603feaaf 100644 --- a/src/lib/libcrypto/engine/engine.h +++ b/src/lib/libcrypto/engine/engine.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: engine.h,v 1.31 2015/07/19 22:34:27 doug Exp $ */ | 1 | /* $OpenBSD: engine.h,v 1.32 2018/11/11 06:41:28 bcook Exp $ */ |
2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -686,11 +686,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, | |||
686 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ | 686 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ |
687 | fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ | 687 | fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ |
688 | return 0; \ | 688 | return 0; \ |
689 | CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ | ||
690 | CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ | ||
691 | CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ | ||
692 | CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ | ||
693 | CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ | ||
694 | if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ | 689 | if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ |
695 | return 0; \ | 690 | return 0; \ |
696 | if(!ERR_set_implementation(fns->err_fns)) return 0; \ | 691 | if(!ERR_set_implementation(fns->err_fns)) return 0; \ |