PKCS#11 tests should not use CRYPTO_INVALID_SESSION
Upstream of Joyent OS-6600.
Currently usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c uses the kernel crypto API macro CRYPTO_INVALID_SESSION to identify an invalid PKCS#11 session handle. This is defined to -1, however CK_INVALID_HANDLE (which is the PKCS#11 value for any invalid handle – session, object, etc) is defined to 0. This mismatch causes much sadness for any PKCS#11 failures.
Updated by Electric Monk about 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 2cf2b01e17654840a521746eefea832fb41b79bd Author: Jason King <firstname.lastname@example.org> Date: 2018-07-11T17:18:10.000Z 9643 PKCS#11 tests should not use CRYPTO_INVALID_SESSION Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Dan McDonald <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Yuri Pankov <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>