diff options
Diffstat (limited to 'src/slot.c')
-rw-r--r-- | src/slot.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -393,3 +393,26 @@ p11t_slot_tests(void) slot_events(); slot_mechanisms(); } + +CK_TOKEN_INFO_PTR +p11t_slot_get_token_info(CK_SLOT_ID slot) +{ + CK_ULONG i; + + for(i = 0; i < p11t_slot_count; ++i) + { + if(slot == p11t_slot_ids[i]) + { + if(p11t_slot_info[i].flags & CKF_TOKEN_PRESENT) + { + return &p11t_slot_token_info[i]; + } + else + { + return NULL; + } + } + } + + return NULL; +} |