diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-12-20 17:04:40 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-12-20 17:04:40 +0000 |
commit | 70531c147c2d38b03f109312a270ccc0af6cf8d6 (patch) | |
tree | 0ef375be374bef4018aa0a2c560aaec44c9e6464 /ssl/ssl_ciph.c | |
parent | 75bbf6e14c14583a7fd3c1ca03888d4eb5568d4f (diff) |
Make no-engine work again.
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 1990fccf2f..02cf181aad 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -143,7 +143,9 @@ #include <stdio.h> #include <openssl/objects.h> #include <openssl/comp.h> +#ifndef OPENSSL_NO_ENGINE #include <openssl/engine.h> +#endif #include "ssl_locl.h" #define SSL_ENC_DES_IDX 0 @@ -314,20 +316,38 @@ static const SSL_CIPHER cipher_aliases[]={ /* Search for public key algorithm with given name and * return its pkey_id if it is available. Otherwise return 0 */ +#ifdef OPENSSL_NO_ENGINE + static int get_optional_pkey_id(const char *pkey_name) { const EVP_PKEY_ASN1_METHOD *ameth; - ENGINE *tmpeng = NULL; int pkey_id=0; - ameth = EVP_PKEY_asn1_find_str(&tmpeng,pkey_name,-1); + ameth = EVP_PKEY_asn1_find_str(NULL,pkey_name,-1); if (ameth) { EVP_PKEY_asn1_get0_info(&pkey_id, NULL,NULL,NULL,NULL,ameth); } - if (tmpeng) ENGINE_finish(tmpeng); return pkey_id; } +#else + +static int get_optional_pkey_id(const char *pkey_name) + { + const EVP_PKEY_ASN1_METHOD *ameth; + ENGINE *tmpeng = NULL; + int pkey_id=0; + ameth = EVP_PKEY_asn1_find_str(&tmpeng,pkey_name,-1); + if (ameth) + { + EVP_PKEY_asn1_get0_info(&pkey_id, NULL,NULL,NULL,NULL,ameth); + } + if (tmpeng) ENGINE_finish(tmpeng); + return pkey_id; + } + +#endif + void ssl_load_ciphers(void) { ssl_cipher_methods[SSL_ENC_DES_IDX]= |