From 5196641617ceef00af51128eb1db0083097d95e7 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 23 Oct 2015 18:46:58 +0100 Subject: [PATCH] ENGINE fixes Reviewed-by: Richard Levitte --- crypto/ec/ec_key.c | 8 ++++++++ crypto/ec/ec_kmeth.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) 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" -- 2.25.1