PKCS#11 tests should not use CRYPTO_INVALID_SESSION

Review Request #1126 - Created July 7, 2018 and submitted

Information
Jason King
illumos-gate
9643
Reviewers
general

PKCS#11 defines a different value (0) than the kernel crypto framework (-1) for an invalid session. Using CRYPTO_INVALID_SESSION can cause the pkcs11 libraries to segfault (as seen if any of the current crypto tests fail).

Prior to this change, the PKCS#11 aes_ccm and aes_gcm tests could segfault in C_DestroyObject (as the PKCS#11 softtoken does not yet support those modes) w/ the first argument 0xffffffff (-1). With this change, the tests no longer segfault and merely fail (as expected due to CCM and GCM not being supported).

Toomas Soome
Andy Fiddaman
Yuri Pankov
Jason King
Review request changed

Status: Closed (submitted)

Loading...