const char *properties)
{
#ifndef OPENSSL_NO_ENGINE
+ ENGINE *eng;
+
/*
* If there is an Engine available for this cipher we use the "implicit"
* form to ensure we use that engine later.
*/
- if (ENGINE_get_cipher_engine(nid) != NULL)
+ eng = ENGINE_get_cipher_engine(nid);
+ if (eng != NULL) {
+ ENGINE_finish(eng);
return EVP_get_cipherbynid(nid);
+ }
#endif
/* Otherwise we do an explicit fetch */
const char *properties)
{
#ifndef OPENSSL_NO_ENGINE
+ ENGINE *eng;
+
/*
* If there is an Engine available for this digest we use the "implicit"
* form to ensure we use that engine later.
*/
- if (ENGINE_get_digest_engine(nid) != NULL)
+ eng = ENGINE_get_digest_engine(nid);
+ if (eng != NULL) {
+ ENGINE_finish(eng);
return EVP_get_digestbynid(nid);
+ }
#endif
/* Otherwise we do an explicit fetch */