Blame SOURCES/openssl-ibmca-2.0.0-rsa.patch

2f38c5
From a0e23d4063bf897dd9136c491d2201de5fbba653 Mon Sep 17 00:00:00 2001
2f38c5
From: Patrick Steuer <patrick.steuer@de.ibm.com>
2f38c5
Date: Thu, 22 Nov 2018 18:47:11 +0100
2f38c5
Subject: [PATCH] Fix doing rsa-me, altough rsa-crt would be possible
2f38c5
2f38c5
rsa-crt is preferred to rsa-me when possible for performance reason.
2f38c5
This bug was introduced with commit dc8465b (ibmca >= 1.3.1) for
2f38c5
openssl >= 1.1.0. Commit ed496f6 (ibmca >= 2.0.0) introduced the bug
2f38c5
also for openssl versions < 1.1.0.
2f38c5
2f38c5
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
2f38c5
---
2f38c5
 src/ibmca_rsa.c | 2 +-
2f38c5
 1 file changed, 1 insertion(+), 1 deletion(-)
2f38c5
2f38c5
diff --git a/src/ibmca_rsa.c b/src/ibmca_rsa.c
2f38c5
index a4dd194..d1a95ed 100644
2f38c5
--- a/src/ibmca_rsa.c
2f38c5
+++ b/src/ibmca_rsa.c
2f38c5
@@ -309,7 +309,7 @@ static int ibmca_rsa_mod_exp(BIGNUM * r0, const BIGNUM * I, RSA * rsa,
2f38c5
     RSA_get0_key(rsa, &n, NULL, &d);
2f38c5
     RSA_get0_factors(rsa, &p, &q);
2f38c5
     RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
2f38c5
-    if (!p || !q || !dmp1 || !dmq1 || iqmp) {
2f38c5
+    if (!p || !q || !dmp1 || !dmq1 || !iqmp) {
2f38c5
         if (!d || !n) {
2f38c5
             IBMCAerr(IBMCA_F_IBMCA_RSA_MOD_EXP, IBMCA_R_MISSING_KEY_COMPONENTS);
2f38c5
             goto err;
2f38c5
-- 
2f38c5
1.8.3.1
2f38c5