Blame SOURCES/opencryptoki-openssl3-376e664f082b66de970b62a81588b034fd560d27.patch

2c1758
commit 376e664f082b66de970b62a81588b034fd560d27
2c1758
Author: Ingo Franzki <ifranzki@linux.ibm.com>
2c1758
Date:   Fri Aug 13 10:54:44 2021 +0200
2c1758
2c1758
    TESTCASES: Remove RSA public exponent restriction for Soft token
2c1758
    
2c1758
    Since commit "Allow small RSA exponents in the default provider"
2c1758
    https://github.com/openssl/openssl/commit/254957f768a61c91c14d89566224173d0831c2ce
2c1758
    in OpenSSL 3.0, we do no longer need to restrict the tests for the Soft
2c1758
    token to RSA public exponents of 3 and 65537 only.
2c1758
    
2c1758
    Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
2c1758
2c1758
diff --git a/testcases/common/common.c b/testcases/common/common.c
2c1758
index 0a64ecf2..abbe354f 100644
2c1758
--- a/testcases/common/common.c
2c1758
+++ b/testcases/common/common.c
2c1758
@@ -16,6 +16,8 @@
2c1758
 #include "pkcs11types.h"
2c1758
 #include "regress.h"
2c1758
 
2c1758
+#define UNUSED(var)            ((void)(var))
2c1758
+
2c1758
 CK_FUNCTION_LIST *funcs;
2c1758
 CK_FUNCTION_LIST_3_0 *funcs3;
2c1758
 CK_INTERFACE *ifs;
2c1758
@@ -879,11 +881,10 @@ int is_valid_cca_pubexp(CK_BYTE pubexp[], CK_ULONG pubexp_len)
2c1758
 /** Returns true if pubexp is valid for Soft Tokens **/
2c1758
 int is_valid_soft_pubexp(CK_BYTE pubexp[], CK_ULONG pubexp_len)
2c1758
 {
2c1758
-    CK_BYTE exp3[] = { 0x03 };  // 3
2c1758
-    CK_BYTE exp65537[] = { 0x01, 0x00, 0x01 };  // 65537
2c1758
+    UNUSED(pubexp);
2c1758
+    UNUSED(pubexp_len);
2c1758
 
2c1758
-    return (pubexp_len == 1 && (!memcmp(pubexp, exp3, 1)))
2c1758
-        || (pubexp_len == 3 && (!memcmp(pubexp, exp65537, 3)));
2c1758
+    return TRUE;
2c1758
 }
2c1758
 
2c1758
 /** Returns true if slot_id is an ICSF token