RFR: JDK-8290532: Adjust PKCS11Exception and handle more PKCS11 error codes

Matthias Baesken mbaesken at openjdk.org
Tue Jul 19 14:10:59 UTC 2022

On Tue, 19 Jul 2022 13:14:17 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> The issue https://bugs.openjdk.org/browse/JDK-8282538 gave an example of the following PKCS11 exception (see attached jtr files of that bug) :
> .... Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0xCE534351
> Unfortunately the error code 0xCE534351 is currently not in the RV/errorMap table of PKCS11Exception, That's why we get this
> hex code and no more descriptive output, this could be improved.

Btw.  there are for most (all?)  pkcs11 error/return codes good  error descriptions available here http://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/os/pkcs11-base-v3.0-os.html   (5.1 Function return values) ; should we maybe extend the exception message with a short text


PR: https://git.openjdk.org/jdk/pull/9555

More information about the security-dev mailing list