Skip to content

Commit

Permalink
Disable useNormativeMechFirst for JDK17.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealMDoerr committed Jun 10, 2024
1 parent be04de8 commit 3451197
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,8 @@ private void initialize() throws PKCS11Exception {
}

if (type == Transformation.AES_GCM) {
CK_VERSION cryptokiVersion = token.p11.getVersion();
boolean useNormativeMechFirst = cryptokiVersion.major > 2 ||
(cryptokiVersion.major == 2 && cryptokiVersion.minor >= 40);
// JDK-8255409 allows using useNormativeMechFirst dependent on token.p11.getVersion();
boolean useNormativeMechFirst = false;
if (encrypt) {
token.p11.C_GCMEncryptInitWithRetry(session.id(), mechWithParams,
p11KeyID, useNormativeMechFirst);
Expand Down

0 comments on commit 3451197

Please sign in to comment.