Blame SOURCES/opencryptoki-openssl3-2c116d49359a5eb91ad7f1483c64650c7874a513.patch

2c1758
commit 2c116d49359a5eb91ad7f1483c64650c7874a513
2c1758
Author: Ingo Franzki <ifranzki@linux.ibm.com>
2c1758
Date:   Wed Jun 30 14:08:03 2021 +0200
2c1758
2c1758
    TESTCASES: Skip test if operation state is not savable
2c1758
    
2c1758
    The sess_opstate testcase now handles the return code of CKR_STATE_UNSAVEABLE
2c1758
    from C_GetOperationState() and skips the test if that return code is
2c1758
    encountered.
2c1758
    
2c1758
    Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
2c1758
2c1758
diff --git a/testcases/pkcs11/sess_opstate.c b/testcases/pkcs11/sess_opstate.c
2c1758
index 3235b450..3d1ab9d7 100644
2c1758
--- a/testcases/pkcs11/sess_opstate.c
2c1758
+++ b/testcases/pkcs11/sess_opstate.c
2c1758
@@ -123,6 +123,10 @@ int sess_opstate_funcs(int loops)
2c1758
         opstatelen = 0;
2c1758
         rc = funcs->C_GetOperationState(s2, NULL, &opstatelen);
2c1758
         if (rc != CKR_OK) {
2c1758
+            if (rc == CKR_STATE_UNSAVEABLE) {
2c1758
+                testcase_skip("Get/SetOperationState digest test: state unsavable");
2c1758
+                goto out;
2c1758
+            }
2c1758
             testcase_error("C_GetOperationState rc=%s", p11_get_ckr(rc));
2c1758
             goto out;
2c1758
         }
2c1758
@@ -135,6 +139,10 @@ int sess_opstate_funcs(int loops)
2c1758
 
2c1758
         rc = funcs->C_GetOperationState(s2, opstate, &opstatelen);
2c1758
         if (rc != CKR_OK) {
2c1758
+            if (rc == CKR_STATE_UNSAVEABLE) {
2c1758
+                testcase_skip("Get/SetOperationState digest test: state unsavable");
2c1758
+                goto out;
2c1758
+            }
2c1758
             testcase_error("C_GetOperationState rc=%s", p11_get_ckr(rc));
2c1758
             goto out;
2c1758
         }