Skip to content

Avoid reusing object handles after logout

Jakub Jelen requested to merge jjelen/libcacard:master into master

During implementation of the smart cards CI, I noticed this issue when the SoftHSM is used as a pkcs11 module in NSS DB.

It looks like reusing the SECPrivateKey objects after logout is not valid so we should handle this problem appropriately in the attempt to sign data as described in the mozilla bug [1].

This is nothing that should prevent libcacard working in general use cases, but this is preventing using libcacard for testing OpenSC (and vice versa).

This MR contains also a minimal reproduced, which correctly fails before the fix is applied.


Merge request reports