diff options
Diffstat (limited to 'src/lib/libcrypto/engine/eng_list.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index bd511944ba..1cc3217f4c 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
@@ -55,13 +55,11 @@ | |||
55 | * Hudson (tjh@cryptsoft.com). | 55 | * Hudson (tjh@cryptsoft.com). |
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | /* ==================================================================== | ||
59 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
60 | * ECDH support in OpenSSL originally developed by | ||
61 | * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. | ||
62 | */ | ||
63 | 58 | ||
59 | #include <openssl/crypto.h> | ||
60 | #include "cryptlib.h" | ||
64 | #include "eng_int.h" | 61 | #include "eng_int.h" |
62 | #include <openssl/engine.h> | ||
65 | 63 | ||
66 | /* The linked-list of pointers to engine types. engine_list_head | 64 | /* The linked-list of pointers to engine types. engine_list_head |
67 | * incorporates an implicit structural reference but engine_list_tail | 65 | * incorporates an implicit structural reference but engine_list_tail |
@@ -326,14 +324,7 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src) | |||
326 | #ifndef OPENSSL_NO_DH | 324 | #ifndef OPENSSL_NO_DH |
327 | dest->dh_meth = src->dh_meth; | 325 | dest->dh_meth = src->dh_meth; |
328 | #endif | 326 | #endif |
329 | #ifndef OPENSSL_NO_ECDH | ||
330 | dest->ecdh_meth = src->ecdh_meth; | ||
331 | #endif | ||
332 | #ifndef OPENSSL_NO_ECDSA | ||
333 | dest->ecdsa_meth = src->ecdsa_meth; | ||
334 | #endif | ||
335 | dest->rand_meth = src->rand_meth; | 327 | dest->rand_meth = src->rand_meth; |
336 | dest->store_meth = src->store_meth; | ||
337 | dest->ciphers = src->ciphers; | 328 | dest->ciphers = src->ciphers; |
338 | dest->digests = src->digests; | 329 | dest->digests = src->digests; |
339 | dest->destroy = src->destroy; | 330 | dest->destroy = src->destroy; |
@@ -349,7 +340,6 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src) | |||
349 | ENGINE *ENGINE_by_id(const char *id) | 340 | ENGINE *ENGINE_by_id(const char *id) |
350 | { | 341 | { |
351 | ENGINE *iterator; | 342 | ENGINE *iterator; |
352 | char *load_dir = NULL; | ||
353 | if(id == NULL) | 343 | if(id == NULL) |
354 | { | 344 | { |
355 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | 345 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, |
@@ -383,7 +373,6 @@ ENGINE *ENGINE_by_id(const char *id) | |||
383 | } | 373 | } |
384 | } | 374 | } |
385 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | 375 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
386 | #if 0 | ||
387 | if(iterator == NULL) | 376 | if(iterator == NULL) |
388 | { | 377 | { |
389 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | 378 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, |
@@ -391,32 +380,6 @@ ENGINE *ENGINE_by_id(const char *id) | |||
391 | ERR_add_error_data(2, "id=", id); | 380 | ERR_add_error_data(2, "id=", id); |
392 | } | 381 | } |
393 | return iterator; | 382 | return iterator; |
394 | #else | ||
395 | /* EEK! Experimental code starts */ | ||
396 | if(iterator) return iterator; | ||
397 | /* Prevent infinite recusrion if we're looking for the dynamic engine. */ | ||
398 | if (strcmp(id, "dynamic")) | ||
399 | { | ||
400 | #ifdef OPENSSL_SYS_VMS | ||
401 | if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = "SSLROOT:[ENGINES]"; | ||
402 | #else | ||
403 | if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = ENGINESDIR; | ||
404 | #endif | ||
405 | iterator = ENGINE_by_id("dynamic"); | ||
406 | if(!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || | ||
407 | !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) || | ||
408 | !ENGINE_ctrl_cmd_string(iterator, "DIR_ADD", | ||
409 | load_dir, 0) || | ||
410 | !ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0)) | ||
411 | goto notfound; | ||
412 | return iterator; | ||
413 | } | ||
414 | notfound: | ||
415 | ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE); | ||
416 | ERR_add_error_data(2, "id=", id); | ||
417 | return NULL; | ||
418 | /* EEK! Experimental code ends */ | ||
419 | #endif | ||
420 | } | 383 | } |
421 | 384 | ||
422 | int ENGINE_up_ref(ENGINE *e) | 385 | int ENGINE_up_ref(ENGINE *e) |