diff options
Diffstat (limited to 'src/lib/libcrypto/engine/eng_openssl.c')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_openssl.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/libcrypto/engine/eng_openssl.c b/src/lib/libcrypto/engine/eng_openssl.c index 54579eea2e..7c139ae2ef 100644 --- a/src/lib/libcrypto/engine/eng_openssl.c +++ b/src/lib/libcrypto/engine/eng_openssl.c | |||
| @@ -55,6 +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 | */ | ||
| 58 | 63 | ||
| 59 | 64 | ||
| 60 | #include <stdio.h> | 65 | #include <stdio.h> |
| @@ -64,6 +69,16 @@ | |||
| 64 | #include <openssl/dso.h> | 69 | #include <openssl/dso.h> |
| 65 | #include <openssl/pem.h> | 70 | #include <openssl/pem.h> |
| 66 | #include <openssl/evp.h> | 71 | #include <openssl/evp.h> |
| 72 | #include <openssl/rand.h> | ||
| 73 | #ifndef OPENSSL_NO_RSA | ||
| 74 | #include <openssl/rsa.h> | ||
| 75 | #endif | ||
| 76 | #ifndef OPENSSL_NO_DSA | ||
| 77 | #include <openssl/dsa.h> | ||
| 78 | #endif | ||
| 79 | #ifndef OPENSSL_NO_DH | ||
| 80 | #include <openssl/dh.h> | ||
| 81 | #endif | ||
| 67 | 82 | ||
| 68 | /* This testing gunk is implemented (and explained) lower down. It also assumes | 83 | /* This testing gunk is implemented (and explained) lower down. It also assumes |
| 69 | * the application explicitly calls "ENGINE_load_openssl()" because this is no | 84 | * the application explicitly calls "ENGINE_load_openssl()" because this is no |
| @@ -125,6 +140,12 @@ static int bind_helper(ENGINE *e) | |||
| 125 | #ifndef OPENSSL_NO_DSA | 140 | #ifndef OPENSSL_NO_DSA |
| 126 | || !ENGINE_set_DSA(e, DSA_get_default_method()) | 141 | || !ENGINE_set_DSA(e, DSA_get_default_method()) |
| 127 | #endif | 142 | #endif |
| 143 | #ifndef OPENSSL_NO_ECDH | ||
| 144 | || !ENGINE_set_ECDH(e, ECDH_OpenSSL()) | ||
| 145 | #endif | ||
| 146 | #ifndef OPENSSL_NO_ECDSA | ||
| 147 | || !ENGINE_set_ECDSA(e, ECDSA_OpenSSL()) | ||
| 148 | #endif | ||
| 128 | #ifndef OPENSSL_NO_DH | 149 | #ifndef OPENSSL_NO_DH |
| 129 | || !ENGINE_set_DH(e, DH_get_default_method()) | 150 | || !ENGINE_set_DH(e, DH_get_default_method()) |
| 130 | #endif | 151 | #endif |
| @@ -236,6 +257,7 @@ static const EVP_CIPHER test_r4_cipher= | |||
| 236 | sizeof(TEST_RC4_KEY), | 257 | sizeof(TEST_RC4_KEY), |
| 237 | NULL, | 258 | NULL, |
| 238 | NULL, | 259 | NULL, |
| 260 | NULL, | ||
| 239 | NULL | 261 | NULL |
| 240 | }; | 262 | }; |
| 241 | static const EVP_CIPHER test_r4_40_cipher= | 263 | static const EVP_CIPHER test_r4_40_cipher= |
| @@ -249,6 +271,7 @@ static const EVP_CIPHER test_r4_40_cipher= | |||
| 249 | sizeof(TEST_RC4_KEY), | 271 | sizeof(TEST_RC4_KEY), |
| 250 | NULL, | 272 | NULL, |
| 251 | NULL, | 273 | NULL, |
| 274 | NULL, | ||
| 252 | NULL | 275 | NULL |
| 253 | }; | 276 | }; |
| 254 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | 277 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, |
| @@ -290,7 +313,7 @@ static int test_sha1_init(EVP_MD_CTX *ctx) | |||
| 290 | #endif | 313 | #endif |
| 291 | return SHA1_Init(ctx->md_data); | 314 | return SHA1_Init(ctx->md_data); |
| 292 | } | 315 | } |
| 293 | static int test_sha1_update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | 316 | static int test_sha1_update(EVP_MD_CTX *ctx,const void *data,size_t count) |
| 294 | { | 317 | { |
| 295 | #ifdef TEST_ENG_OPENSSL_SHA_P_UPDATE | 318 | #ifdef TEST_ENG_OPENSSL_SHA_P_UPDATE |
| 296 | fprintf(stderr, "(TEST_ENG_OPENSSL_SHA) test_sha1_update() called\n"); | 319 | fprintf(stderr, "(TEST_ENG_OPENSSL_SHA) test_sha1_update() called\n"); |
