Integrated: 8350661: PKCS11 HKDF throws ProviderException when requesting a 31-byte AES key
Martin Balao
mbalao at openjdk.org
Tue Apr 22 14:39:49 UTC 2025
On Tue, 8 Apr 2025 20:02:56 GMT, Martin Balao <mbalao at openjdk.org> wrote:
> Hi,
>
> I would like to request a review for the fix of JDK-8350661. In this fix, we translate the native PKCS 11 error code into an `InvalidAlgorithmParameterException`, as documented in the `KDF::deriveKey` API. With that said, different PKCS 11 libraries may throw different errors and may even (in theory) delay the error until the key is used, as _SunJCE_ does. I believe that this is an improvement but further adjustments may be needed in the future.
>
> No regressions observed in `test/jdk/sun/security/pkcs11/KDF/TestHKDF.java`.
>
> Thanks,
> Martin.-
This pull request has now been integrated.
Changeset: 5264d80b
Author: Martin Balao <mbalao at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5264d80bea25a1ef98dae4633b04b16e8de6120f
Stats: 222 lines in 5 files changed: 150 ins; 22 del; 50 mod
8350661: PKCS11 HKDF throws ProviderException when requesting a 31-byte AES key
Reviewed-by: fferrari, valeriep, djelinski
-------------
PR: https://git.openjdk.org/jdk/pull/24526
More information about the security-dev
mailing list