8258186: Replace use of JNI_COMMIT mode with mode 0
Reviewed-by: xuelei, alanb
This commit is contained in:
parent
e46edb5528
commit
cd94606c0c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -173,7 +173,7 @@ cleanup:
|
|||||||
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
||||||
}
|
}
|
||||||
if (directOut == 0 && outBufP != NULL) {
|
if (directOut == 0 && outBufP != NULL) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
}
|
}
|
||||||
return ckEncryptedLen;
|
return ckEncryptedLen;
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ cleanup:
|
|||||||
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
||||||
}
|
}
|
||||||
if (directOut == 0 && outBufP != NULL) {
|
if (directOut == 0 && outBufP != NULL) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
}
|
}
|
||||||
return ckEncryptedPartLen;
|
return ckEncryptedPartLen;
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptFinal
|
|||||||
&ckLastEncryptedPartLen);
|
&ckLastEncryptedPartLen);
|
||||||
|
|
||||||
if (directOut == 0) {
|
if (directOut == 0) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ckAssertReturnValueOK(env, rv);
|
ckAssertReturnValueOK(env, rv);
|
||||||
@ -408,7 +408,7 @@ cleanup:
|
|||||||
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
||||||
}
|
}
|
||||||
if (directOut == 0 && outBufP != NULL) {
|
if (directOut == 0 && outBufP != NULL) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
}
|
}
|
||||||
return ckOutLen;
|
return ckOutLen;
|
||||||
}
|
}
|
||||||
@ -472,7 +472,7 @@ cleanup:
|
|||||||
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT);
|
||||||
}
|
}
|
||||||
if (directOut == 0 && outBufP != NULL) {
|
if (directOut == 0 && outBufP != NULL) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
}
|
}
|
||||||
return ckDecryptedPartLen;
|
return ckDecryptedPartLen;
|
||||||
}
|
}
|
||||||
@ -518,7 +518,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptFinal
|
|||||||
&ckLastPartLen);
|
&ckLastPartLen);
|
||||||
|
|
||||||
if (directOut == 0) {
|
if (directOut == 0) {
|
||||||
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, JNI_COMMIT);
|
(*env)->ReleasePrimitiveArrayCritical(env, jOut, outBufP, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user