diff options
author | markus <> | 2004-04-08 08:03:15 +0000 |
---|---|---|
committer | markus <> | 2004-04-08 08:03:15 +0000 |
commit | 40d673554117d24c9f46be721235d3e302c06e04 (patch) | |
tree | 341e7f38b840f3e503afb6e471123c0f2ba082c3 /src/lib/libcrypto/engine/engine.h | |
parent | cbf88de39286be06cd20e0c65b6cb7633dce25a5 (diff) | |
download | openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.gz openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.bz2 openbsd-40d673554117d24c9f46be721235d3e302c06e04.zip |
merge 0.9.7d
Diffstat (limited to 'src/lib/libcrypto/engine/engine.h')
-rw-r--r-- | src/lib/libcrypto/engine/engine.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h index 9c3ab182d3..900f75ce8d 100644 --- a/src/lib/libcrypto/engine/engine.h +++ b/src/lib/libcrypto/engine/engine.h | |||
@@ -513,7 +513,7 @@ ENGINE *ENGINE_get_digest_engine(int nid); | |||
513 | * structure will have had its reference count up'd so the caller | 513 | * structure will have had its reference count up'd so the caller |
514 | * should still free their own reference 'e'. */ | 514 | * should still free their own reference 'e'. */ |
515 | int ENGINE_set_default_RSA(ENGINE *e); | 515 | int ENGINE_set_default_RSA(ENGINE *e); |
516 | int ENGINE_set_default_string(ENGINE *e, const char *list); | 516 | int ENGINE_set_default_string(ENGINE *e, const char *def_list); |
517 | /* Same for the other "methods" */ | 517 | /* Same for the other "methods" */ |
518 | int ENGINE_set_default_DSA(ENGINE *e); | 518 | int ENGINE_set_default_DSA(ENGINE *e); |
519 | int ENGINE_set_default_DH(ENGINE *e); | 519 | int ENGINE_set_default_DH(ENGINE *e); |
@@ -616,17 +616,20 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, | |||
616 | const dynamic_fns *fns); | 616 | const dynamic_fns *fns); |
617 | #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ | 617 | #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ |
618 | int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ | 618 | int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ |
619 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ | 619 | if (ERR_get_implementation() != fns->err_fns) \ |
620 | fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ | 620 | { \ |
621 | return 0; \ | 621 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ |
622 | CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ | 622 | fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ |
623 | CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ | 623 | return 0; \ |
624 | CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ | 624 | CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ |
625 | CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ | 625 | CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ |
626 | CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ | 626 | CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ |
627 | if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ | 627 | CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ |
628 | return 0; \ | 628 | CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ |
629 | if(!ERR_set_implementation(fns->err_fns)) return 0; \ | 629 | if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ |
630 | return 0; \ | ||
631 | if(!ERR_set_implementation(fns->err_fns)) return 0; \ | ||
632 | } \ | ||
630 | if(!fn(e,id)) return 0; \ | 633 | if(!fn(e,id)) return 0; \ |
631 | return 1; } | 634 | return 1; } |
632 | 635 | ||