From 91d28a736abc1e1cd04b453f5c16f343feb91a3d Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 4 Dec 2008 22:53:12 +0000 Subject: Add coverage generation into make file. --- doc/Makefile.am | 7 ++++++ doc/pkcs11-coverage.txt | 65 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 doc/Makefile.am (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..55ef7cb --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,7 @@ + +EXTRA_DIST = \ + pkcs11-coverage.py \ + pkcs11-coverage.txt + +coverage: + python pkcs11-coverage.py > pkcs11-coverage.txt diff --git a/doc/pkcs11-coverage.txt b/doc/pkcs11-coverage.txt index 39aa5dc..692af76 100644 --- a/doc/pkcs11-coverage.txt +++ b/doc/pkcs11-coverage.txt @@ -1,30 +1,55 @@ -C_Initialize - - - - Checks various locking styles. - - Checks double initialization. - - Various mutex functions have checks. -C_Finalize - - Checks double calls. +PKCS#11 COVERAGE -C_GetInfo - - Checks NULL argument. - - Space padding in CK_INFO strings. - - Cryptoki version matches that in CK_FUNCTION_LIST table. - - +This is the test coverage of the p11-tests tool of the PKCS#11 interface. +We're anxious to complete this, if you have patches please do contribute. + + +C_Finalize +- Normal call +- Double finalize in a row C_GetFunctionList - - Checks NULL arguments. - - Checks that results match library exported C_GetFunctionList. +- See if returns same data as library entry point -C_GetSlotList - - Calling with NULL arguments. - - Calling with extra memory. - - Calling with too little memory. +C_GetInfo +- NULL argument +- Normal call +- Cryptoki version matches that in library entry point data +- Space padded strings in CK_INFO +- No flags set C_GetSlotInfo - - Calling with NULL arguments. - - Padding +- NULL argument +- Normal call +- Space padded CK_SLOT_INFO fields +- CK_SLOT_INFO flags are from valid set +- Track CKF_TOKEN_PRESENT flag and compare to C_GetSlotList(TRUE) +C_GetSlotList +- NULL arguments +- Retrieving the count +- Passing buffer space along with zero count. +- Passing buffer space along with low count. +- Passing too much buffer space. + +C_GetTokenInfo +- Null arguments +- Normal call +- Space padded CK_TOKEN_INFO fields +- CK_TOKEN_INFO flags are from valid set +- Validate token time when CKF_CLOCK_ON_TOKEN +- Calling on slot without token + +C_Initialize +- Normal call +- Locking: no threads +- Locking: os locking +- Locking: app locking +- Locking: either locking +- Calls without initializing +- NULL argument +- Multiple initialize with C_Finalize between +- Double initialize in a row -- cgit v1.2.3