From c6c858c0caa7ec7d1a7cc5ca75815b66d3881fbd Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 19 Apr 2016 13:40:14 -0500 Subject: [PATCH] Check HCRYPTO_FALLBACK in PKCS#11 backend --- lib/hcrypto/evp-pkcs11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hcrypto/evp-pkcs11.c b/lib/hcrypto/evp-pkcs11.c index 3118e7f5f..b648640c0 100644 --- a/lib/hcrypto/evp-pkcs11.c +++ b/lib/hcrypto/evp-pkcs11.c @@ -443,7 +443,7 @@ p11_md_cleanup(EVP_MD_CTX *ctx) const EVP_CIPHER *cipher; \ \ cipher = hc_EVP_pkcs11_ ##name(); \ - if (cipher == NULL) \ + if (cipher == NULL && HCRYPTO_FALLBACK) \ cipher = hc_EVP_hcrypto_ ##name(); \ \ *((const EVP_CIPHER **)context) = cipher; \ @@ -493,7 +493,7 @@ p11_md_cleanup(EVP_MD_CTX *ctx) const EVP_MD *md; \ \ md = hc_EVP_pkcs11_ ##name(); \ - if (md == NULL) \ + if (md == NULL && HCRYPTO_FALLBACK) \ md = hc_EVP_hcrypto_ ##name(); \ \ *((const EVP_MD **)context) = md; \