diff options
Diffstat (limited to 'src/slot.c')
-rw-r--r-- | src/slot.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -437,6 +437,24 @@ p11t_slot_get_token_info(CK_SLOT_ID slot) return NULL; } +CK_MECHANISM_INFO_PTR +p11t_slot_get_mech_info(CK_SLOT_ID slot, CK_MECHANISM_TYPE mech) +{ + int i; + CK_ULONG j; + + i = get_slot_index(slot); + assert(i >= 0); + + for(j = 0; j < slot_mech_count[i]; ++j) + { + if(mech == slot_mech_type[i][j]) + return &slot_mech_info[i][j]; + } + + return CK_FALSE; +} + void p11t_slot_for_each_mech(CK_MECHANISM_TYPE mech_type, P11tSlotMechCallback callback) |