#ifndef P11TESTST_H_ #define P11TESTST_H_ #include "pkcs11/pkcs11.h" #include #include /* ------------------------------------------------------------------- * msg.c */ const char* p11t_msg_rv(CK_RV rv); void p11t_msg_va(const char *message, va_list va); void p11t_msg_print(const char *message, ...); void p11t_msg_fatal(const char *message, ...); void p11t_msg_prefix(const char *prefix); #define p11t_msg_here() \ (__func__ "() at " __FILE__ ":" __LINE__) /* ------------------------------------------------------------------- * check.c */ int p11t_check_returns(const char *message, CK_RV have, CK_RV want); #define p11t_check_padded(msg, padded) \ (p11t_check_padded_len((msg), (padded), sizeof(padded))) int p11t_check_padded_len(const char *message, const CK_UTF8CHAR_PTR padded, CK_ULONG length); int p11t_check_ulong(const char *message, CK_ULONG have, CK_ULONG want); int p11t_check_mask(const char *message, CK_ULONG flags, CK_ULONG mask); int p11t_check_flag(const char *message, CK_ULONG flags, CK_ULONG flag); int p11t_check_nflag(const char *message, CK_ULONG flags, CK_ULONG nflag); /* ------------------------------------------------------------------- * slot.c */ extern CK_INFO p11t_slot_global; extern CK_ULONG p11t_slot_count; extern CK_SLOT_ID_PTR p11t_slot_ids; extern CK_SLOT_INFO_PTR p11t_slot_info; extern CK_TOKEN_INFO_PTR p11t_slot_token_info; extern CK_ULONG* p11t_slot_mech_count; extern CK_MECHANISM_INFO_PTR* p11t_slot_mech_info; void p11t_slot_tests(void); /* ------------------------------------------------------------------- * module.c */ extern CK_FUNCTION_LIST_PTR p11t_module_funcs; void p11t_module_load(const char *filename); void p11t_module_unload(void); void p11t_module_initialize(const char *initstr); void p11t_module_finalize(void); #endif /* P11TESTST_H_ */