From: Dr. Stephen Henson Date: Fri, 23 Oct 2015 17:46:58 +0000 (+0100) Subject: ENGINE fixes X-Git-Tag: OpenSSL_1_1_0-pre1~61 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5196641617ceef00af51128eb1db0083097d95e7;p=oweals%2Fopenssl.git ENGINE fixes Reviewed-by: Richard Levitte --- diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 477d4a26ba..cb6bcdcbf2 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -65,6 +65,9 @@ #include #include "ec_lcl.h" #include +#ifndef OPENSSSL_NO_ENGINE +# include +#endif EC_KEY *EC_KEY_new(void) { @@ -104,6 +107,11 @@ void EC_KEY_free(EC_KEY *r) } #endif +#ifndef OPENSSL_NO_ENGINE + if (r->engine) + ENGINE_finish(r->engine); +#endif + EC_GROUP_free(r->group); EC_POINT_free(r->pub_key); BN_clear_free(r->priv_key); diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c index 6be99c2265..4904989d63 100644 --- a/crypto/ec/ec_kmeth.c +++ b/crypto/ec/ec_kmeth.c @@ -53,7 +53,9 @@ */ #include -#include +#ifndef OPENSSL_NO_ENGINE +# include +#endif #include #include "ec_lcl.h"