Skip to content

Commit cd94606

Browse files
author
Valerie Peng
committed
8258186: Replace use of JNI_COMMIT mode with mode 0
Reviewed-by: xuelei, alanb
1 parent e46edb5 commit cd94606

File tree

1 file changed

+7
-7
lines changed
  • src/jdk.crypto.cryptoki/share/native/libj2pkcs11

1 file changed

+7
-7
lines changed

src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
33
*/
44

55
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
@@ -173,7 +173,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1Encrypt
173173
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
174174
}
175175
if (directOut == 0 && outBufP != NULL) {
176-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
176+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
177177
}
178178
return ckEncryptedLen;
179179
}
@@ -239,7 +239,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptUpdate
239239
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
240240
}
241241
if (directOut == 0 && outBufP != NULL) {
242-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
242+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
243243
}
244244
return ckEncryptedPartLen;
245245
}
@@ -284,7 +284,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptFinal
284284
&ckLastEncryptedPartLen);
285285

286286
if (directOut == 0) {
287-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
287+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
288288
}
289289

290290
ckAssertReturnValueOK(env, rv);
@@ -408,7 +408,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1Decrypt
408408
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
409409
}
410410
if (directOut == 0 && outBufP != NULL) {
411-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
411+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
412412
}
413413
return ckOutLen;
414414
}
@@ -472,7 +472,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptUpdate
472472
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
473473
}
474474
if (directOut == 0 && outBufP != NULL) {
475-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
475+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
476476
}
477477
return ckDecryptedPartLen;
478478
}
@@ -518,7 +518,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptFinal
518518
&ckLastPartLen);
519519

520520
if (directOut == 0) {
521-
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
521+
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
522522

523523
}
524524

0 commit comments

Comments
 (0)