diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-09 17:13:39 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-09 17:13:39 +0000 |
commit | c99cd6c23327788196dd96eb7b6a1718546a4cf0 (patch) | |
tree | a90768fa7c54d2734176aaf366d558c62473d31f /src/slot.c | |
parent | d44882432b1534c8cfca3057ad59765a949adacc (diff) |
Add testing of key objects.
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) |