summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-02-15 15:28:18 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-02-15 15:28:18 +0000
commita63bf2c53c74723d06da144fe15736c0a709ee43 (patch)
tree6ec3ae10c5838b9d70a83c1e493b8fb9f67ede7f
parentb3f3407850d5e4b2a91aa7c7db39302bb9e80405 (diff)
downloadopenssl-new-a63bf2c53c74723d06da144fe15736c0a709ee43.tar.gz
Make no-engine work again.
-rwxr-xr-xConfigure1
-rw-r--r--crypto/evp/pmeth_lib.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/Configure b/Configure
index e046673ca5..3fabec567f 100755
--- a/Configure
+++ b/Configure
@@ -1423,6 +1423,7 @@ while (<IN>)
}
}
$sdirs = 0 unless /\\$/;
+ s/engines // if (/^DIRS=/ && $disabled{"engine"});
s/^VERSION=.*/VERSION=$version/;
s/^MAJOR=.*/MAJOR=$major/;
s/^MINOR=.*/MINOR=$minor/;
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 928770df63..9a85f60737 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -125,6 +125,7 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
return NULL;
id = pkey->ameth->pkey_id;
}
+#ifndef OPENSSL_NO_ENGINE
/* Try to find an ENGINE which implements this method */
if (e)
{
@@ -144,6 +145,7 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
if (e)
pmeth = ENGINE_get_pkey_meth(e, id);
else
+#endif
pmeth = EVP_PKEY_meth_find(id);
if (pmeth == NULL)
@@ -155,8 +157,10 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
ret = OPENSSL_malloc(sizeof(EVP_PKEY_CTX));
if (!ret)
{
+#ifndef OPENSSL_NO_ENGINE
if (e)
ENGINE_finish(e);
+#endif
EVPerr(EVP_F_INT_CTX_NEW,ERR_R_MALLOC_FAILURE);
return NULL;
}