libp11
libp11 copied to clipboard
p11_key: do not assume a key handle relate to a previously loaded key
Do not assume the PKCS#11 handle value stored in libp11 key cache still relates to the very same object previously loaded. Maybe the client application has modified the PKCS#11 token content using an interface that does not go through the OpenSSL pkcs11 engine. This change addresses the issue by reloading the object attributes from the token when the PKCS#11 handle value is present in the engine cache.