eid-viewer
eid-viewer library
Loading...
Searching...
No Matches
p11.h
1#ifndef EID_VWR_P11_H
2#define EID_VWR_P11_H
3
4
5
6
7
8
9#ifdef WIN32
10#include <win32.h>
11#pragma pack(push, cryptoki, 1)
12#include <pkcs11t.h>
13#pragma pack(pop, cryptoki)
14#else
15#include <unix.h>
16#include <pkcs11t.h>
17#endif
18
19#include <eid-util/utftranslate.h>
20
21#define EIDV_RV_OK 0
22#define EIDV_RV_FAIL -1
23#define EIDV_RV_TERMINATE -2
24#define EIDV_RV_MEM_FAIL -3
25
26#ifdef WIN32
27//event waited for by the mainloop, before checking the reader states
28HANDLE readerCheckEvent;
29//event set by the mainloop, to notify it completed checking the reader states
30HANDLE readerContinueWaitEvent;
31DWORD WINAPI eid_wait_for_pkcs11event(void* val);
32int eid_vwr_p11_check_reader_list(void* slot_ID);
33int eid_vwr_p11_update_slot_list_ui(CK_SLOT_ID_PTR slotlist, CK_ULONG slotCount);
34int eid_vwr_p11_reset_slot_list(CK_SLOT_ID_PTR *ppcurrentSlotList, CK_ULONG *pcurrentReaderCount, CK_SLOT_ID *pcurrentCardSlotID);
35int eid_vwr_p11_find_eid_card(CK_SLOT_ID_PTR slotID);
36int eid_vwr_p11_token_supported(CK_SLOT_ID_PTR slotID);
37int eid_vwr_p11_wait_for_slot_event(BOOLEAN blocking, CK_SLOT_ID_PTR pSlotID);
38#else
39int eid_vwr_p11_find_first_slot(CK_BBOOL with_token, CK_SLOT_ID_PTR loc, CK_ULONG_PTR slots_found);
40#endif
41
42struct _slotdesc;
43
44int eid_vwr_p11_init(void);
45int eid_vwr_p11_read_id(void *);
46int eid_vwr_p11_read_certs(void *);
47int eid_vwr_p11_open_session(void *slot);
48int eid_vwr_p11_close_session(void);
49int eid_vwr_p11_finalize_find(void);
50int eid_vwr_p11_do_pinop(void *);
51int eid_vwr_p11_do_challenge(void* data);
52int eid_vwr_p11_leave_pinop(void);
53int eid_vwr_p11_select_slot(CK_BBOOL automatic, CK_SLOT_ID manualslot);
54int eid_vwr_p11_name_slots(struct _slotdesc *slots, CK_ULONG_PTR len);
55int eid_vwr_p11_check_version(void *data);
56
57#ifdef __cplusplus
58extern "C"
59{
60#endif
61 void eid_vwr_p11_to_ui(const EID_CHAR *, const void *, int);
62#ifdef __cplusplus
63}
64#endif
65
66#endif
Definition oslayer.h:24
unsigned long slot
The number of the slot, to be used with eid_vwr_be_select_slot()
Definition oslayer.h:25