Blob Blame History Raw
commit 376e664f082b66de970b62a81588b034fd560d27
Author: Ingo Franzki <ifranzki@linux.ibm.com>
Date:   Fri Aug 13 10:54:44 2021 +0200

    TESTCASES: Remove RSA public exponent restriction for Soft token
    
    Since commit "Allow small RSA exponents in the default provider"
    https://github.com/openssl/openssl/commit/254957f768a61c91c14d89566224173d0831c2ce
    in OpenSSL 3.0, we do no longer need to restrict the tests for the Soft
    token to RSA public exponents of 3 and 65537 only.
    
    Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>

diff --git a/testcases/common/common.c b/testcases/common/common.c
index 0a64ecf2..abbe354f 100644
--- a/testcases/common/common.c
+++ b/testcases/common/common.c
@@ -16,6 +16,8 @@
 #include "pkcs11types.h"
 #include "regress.h"
 
+#define UNUSED(var)            ((void)(var))
+
 CK_FUNCTION_LIST *funcs;
 CK_FUNCTION_LIST_3_0 *funcs3;
 CK_INTERFACE *ifs;
@@ -879,11 +881,10 @@ int is_valid_cca_pubexp(CK_BYTE pubexp[], CK_ULONG pubexp_len)
 /** Returns true if pubexp is valid for Soft Tokens **/
 int is_valid_soft_pubexp(CK_BYTE pubexp[], CK_ULONG pubexp_len)
 {
-    CK_BYTE exp3[] = { 0x03 };  // 3
-    CK_BYTE exp65537[] = { 0x01, 0x00, 0x01 };  // 65537
+    UNUSED(pubexp);
+    UNUSED(pubexp_len);
 
-    return (pubexp_len == 1 && (!memcmp(pubexp, exp3, 1)))
-        || (pubexp_len == 3 && (!memcmp(pubexp, exp65537, 3)));
+    return TRUE;
 }
 
 /** Returns true if slot_id is an ICSF token