From 1220a0745cb8674e5ce0506a1ad298fe08b0f745 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 3 Jan 2009 14:15:06 +0000 Subject: Active operations can be cancelled by starting another operation. --- src/crypto.c | 12 ------------ src/object.c | 6 ------ 2 files changed, 18 deletions(-) diff --git a/src/crypto.c b/src/crypto.c index 0f946d8..bef8a1e 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -372,9 +372,6 @@ p11t_crypto_test_encrypt (CK_SESSION_HANDLE session, CK_MECHANISM_TYPE mech) rv = (p11t_module_funcs->C_EncryptInit)(session, &mechanism, handle); P11T_CHECK_RV ("A normal call", rv, CKR_OK); - rv = (p11t_module_funcs->C_EncryptInit)(session, &mechanism, handle); - P11T_CHECK_RV ("Double call", rv, CKR_OPERATION_ACTIVE); - /* All other crypto operations shouldn't be valid */ test_without_init (session, CKA_ENCRYPT); @@ -574,9 +571,6 @@ p11t_crypto_test_decrypt (CK_SESSION_HANDLE session, CK_MECHANISM_TYPE mech) rv = (p11t_module_funcs->C_DecryptInit)(session, &mechanism, handle); P11T_CHECK_RV ("A normal call", rv, CKR_OK); - rv = (p11t_module_funcs->C_DecryptInit)(session, &mechanism, handle); - P11T_CHECK_RV ("Double call", rv, CKR_OPERATION_ACTIVE); - /* All other crypto operations shouldn't be valid */ test_without_init (session, CKA_DECRYPT); @@ -738,9 +732,6 @@ p11t_crypto_test_sign (CK_SESSION_HANDLE session, CK_MECHANISM_TYPE mech) rv = (p11t_module_funcs->C_SignInit)(session, &mechanism, handle); P11T_CHECK_RV ("A normal call", rv, CKR_OK); - rv = (p11t_module_funcs->C_SignInit)(session, &mechanism, handle); - P11T_CHECK_RV ("Double call", rv, CKR_OPERATION_ACTIVE); - /* All other crypto operations shouldn't be valid */ test_without_init (session, CKA_SIGN); @@ -962,9 +953,6 @@ p11t_crypto_test_verify (CK_SESSION_HANDLE session, CK_MECHANISM_TYPE mech) rv = (p11t_module_funcs->C_VerifyInit)(session, &mechanism, handle); P11T_CHECK_RV ("A normal call", rv, CKR_OK); - rv = (p11t_module_funcs->C_VerifyInit)(session, &mechanism, handle); - P11T_CHECK_RV ("Double call", rv, CKR_OPERATION_ACTIVE); - /* All other crypto operations shouldn't be valid */ test_without_init (session, CKA_VERIFY); diff --git a/src/object.c b/src/object.c index accb444..9b36b93 100644 --- a/src/object.c +++ b/src/object.c @@ -108,12 +108,6 @@ test_find_objects(CK_SESSION_HANDLE session) rv = (p11t_module_funcs->C_FindObjectsInit)(session, &attr, 0); P11T_CHECK_RV("Find all objects", rv, CKR_OK); - if(p11t_test_unexpected) - { - rv = (p11t_module_funcs->C_FindObjectsInit)(session, &attr, 0); - P11T_CHECK_RV("Double call", rv, CKR_OPERATION_ACTIVE); - - } P11T_SECTION("C_FindObjects"); -- cgit v1.2.3