diff options
-rw-r--r-- | src/slot.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -345,20 +345,20 @@ test_slot_mechanisms(void) for(j = 0; j < mech_count; ++j) { - rv = (p11t_module_funcs->C_GetMechanismInfo)(slot_id, mech_list[i], &mech_info[i]); + rv = (p11t_module_funcs->C_GetMechanismInfo)(slot_id, mech_list[j], &mech_info[j]); P11T_CHECK_RV("Normal call", rv, CKR_OK); P11T_SECTION("CK_MECHANISM_INFO"); - if(mech_info[i].ulMinKeySize > mech_info[i].ulMaxKeySize) + if(mech_info[j].ulMinKeySize > mech_info[j].ulMaxKeySize) P11T_CHECK_FAIL("Mechanism min key size should not be greater than max"); - P11T_CHECK_MASK("flags", mech_info[i].flags, + P11T_CHECK_MASK("flags", mech_info[j].flags, CKF_HW | CKF_ENCRYPT | CKF_DECRYPT | CKF_DIGEST | CKF_SIGN | CKF_SIGN_RECOVER | CKF_VERIFY | CKF_VERIFY_RECOVER | CKF_GENERATE | CKF_GENERATE_KEY_PAIR | CKF_WRAP | CKF_UNWRAP | CKF_DERIVE); - P11T_CHECK_NFLAG("flags", mech_info[i].flags, CKF_EXTENSION); + P11T_CHECK_NFLAG("flags", mech_info[j].flags, CKF_EXTENSION); } } |