diff options
Diffstat (limited to 'src/lib/libcrypto/engine/eng_fat.c')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_fat.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/lib/libcrypto/engine/eng_fat.c b/src/lib/libcrypto/engine/eng_fat.c index 7ccf7022ee..27c1662f62 100644 --- a/src/lib/libcrypto/engine/eng_fat.c +++ b/src/lib/libcrypto/engine/eng_fat.c | |||
| @@ -52,11 +52,13 @@ | |||
| 52 | * Hudson (tjh@cryptsoft.com). | 52 | * Hudson (tjh@cryptsoft.com). |
| 53 | * | 53 | * |
| 54 | */ | 54 | */ |
| 55 | /* ==================================================================== | ||
| 56 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
| 57 | * ECDH support in OpenSSL originally developed by | ||
| 58 | * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. | ||
| 59 | */ | ||
| 55 | 60 | ||
| 56 | #include <openssl/crypto.h> | ||
| 57 | #include "cryptlib.h" | ||
| 58 | #include "eng_int.h" | 61 | #include "eng_int.h" |
| 59 | #include <openssl/engine.h> | ||
| 60 | #include <openssl/conf.h> | 62 | #include <openssl/conf.h> |
| 61 | 63 | ||
| 62 | int ENGINE_set_default(ENGINE *e, unsigned int flags) | 64 | int ENGINE_set_default(ENGINE *e, unsigned int flags) |
| @@ -77,6 +79,14 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags) | |||
| 77 | if((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) | 79 | if((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) |
| 78 | return 0; | 80 | return 0; |
| 79 | #endif | 81 | #endif |
| 82 | #ifndef OPENSSL_NO_ECDH | ||
| 83 | if((flags & ENGINE_METHOD_ECDH) && !ENGINE_set_default_ECDH(e)) | ||
| 84 | return 0; | ||
| 85 | #endif | ||
| 86 | #ifndef OPENSSL_NO_ECDSA | ||
| 87 | if((flags & ENGINE_METHOD_ECDSA) && !ENGINE_set_default_ECDSA(e)) | ||
| 88 | return 0; | ||
| 89 | #endif | ||
| 80 | if((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e)) | 90 | if((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e)) |
| 81 | return 0; | 91 | return 0; |
| 82 | return 1; | 92 | return 1; |
| @@ -93,6 +103,10 @@ static int int_def_cb(const char *alg, int len, void *arg) | |||
| 93 | *pflags |= ENGINE_METHOD_RSA; | 103 | *pflags |= ENGINE_METHOD_RSA; |
| 94 | else if (!strncmp(alg, "DSA", len)) | 104 | else if (!strncmp(alg, "DSA", len)) |
| 95 | *pflags |= ENGINE_METHOD_DSA; | 105 | *pflags |= ENGINE_METHOD_DSA; |
| 106 | else if (!strncmp(alg, "ECDH", len)) | ||
| 107 | *pflags |= ENGINE_METHOD_ECDH; | ||
| 108 | else if (!strncmp(alg, "ECDSA", len)) | ||
| 109 | *pflags |= ENGINE_METHOD_ECDSA; | ||
| 96 | else if (!strncmp(alg, "DH", len)) | 110 | else if (!strncmp(alg, "DH", len)) |
| 97 | *pflags |= ENGINE_METHOD_DH; | 111 | *pflags |= ENGINE_METHOD_DH; |
| 98 | else if (!strncmp(alg, "RAND", len)) | 112 | else if (!strncmp(alg, "RAND", len)) |
| @@ -133,6 +147,12 @@ int ENGINE_register_complete(ENGINE *e) | |||
| 133 | #ifndef OPENSSL_NO_DH | 147 | #ifndef OPENSSL_NO_DH |
| 134 | ENGINE_register_DH(e); | 148 | ENGINE_register_DH(e); |
| 135 | #endif | 149 | #endif |
| 150 | #ifndef OPENSSL_NO_ECDH | ||
| 151 | ENGINE_register_ECDH(e); | ||
| 152 | #endif | ||
| 153 | #ifndef OPENSSL_NO_ECDSA | ||
| 154 | ENGINE_register_ECDSA(e); | ||
| 155 | #endif | ||
| 136 | ENGINE_register_RAND(e); | 156 | ENGINE_register_RAND(e); |
| 137 | return 1; | 157 | return 1; |
| 138 | } | 158 | } |
