pointer passed into pReserved of CK_C_INITIALIZE_ARGS passed to C_Initialize
Closed this issue · 2 comments
Hi there,
I've just ran your test suite and have found it passes a value in the reserved member of the C_Initialize args.
The library I'm testing with makes use of this reserved pointer if set for internal testing data (perhaps it shouldn't) and the test makes the library segfault.
What is the expected behaviour for a well formed library? Can I easily turn this off?
Is this specifically just the Init.InitArgsBadReserved
test?
That test is checking that the PKCS#11 library complies with the text in section 11.4 of the spec, which says:
"For this version of Cryptoki, the value of pReserved
thereby obtained must be NULL_PTR
; if it's not, then C_Initialize
should return with the value CKR_ARGUMENTS_BAD
."
As a quick workaround, you should be able to skip that particular test by using a command-line argument like --gtest_filter=-Init.InitArgsBadReserved
(or you could just disable that test locally by changing its name to DISABLED_InitArgsBadReserved
).
Many thanks!