diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-08 20:05:57 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-08 20:05:57 +0000 |
commit | 921f76ee4de8242ed95672c560976bb2d9f7b894 (patch) | |
tree | 456887c6c95632bf95d09fe6956ee7233a83d0a3 /src | |
parent | b3dc22cab68bae938eac238c6f673e564d6b1182 (diff) |
When loading mechanisms, use the correct one.
Diffstat (limited to 'src')
-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); } } |