[aarch64-port-dev ] /hg/icedtea7-forest-aarch64/jdk: 3 new changesets

Andrew Dinn adinn at redhat.com
Fri Dec 5 13:36:48 UTC 2014


[forwarding bounced check-in message from icedtea7-forest-aarch64 repo]
------ This is a copy of the message, including all the headers. ------

Return-path: <adinn at icedtea.classpath.org>
Received: from localhost ([127.0.0.1] helo=icedtea.classpath.org)
	by icedtea.classpath.org with esmtp (Exim 4.69)
	(envelope-from <adinn at icedtea.classpath.org>)
	id 1Xwr03-0006sA-27
	for aarch64-port-dev at openjdk.java.net; Fri, 05 Dec 2014 11:24:39 +0000
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date: Fri, 05 Dec 2014 11:24:39 +0000
Subject: /hg/icedtea7-forest-aarch64/jdk: 3 new changesets
From: adinn at icedtea.classpath.org
X-Hg-Notification: changeset 9665966de2e7
Message-Id:
<hg.9665966de2e7.1417778679.-5107281755808049882 at icedtea.classpath.org>
To: aarch64-port-dev at openjdk.java.net

changeset 9665966de2e7 in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=9665966de2e7
author: andrew
date: Fri Dec 05 02:53:29 2014 +0000

	PR2123: SunEC provider crashes when built using system NSS


changeset 13bd267f397d in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=13bd267f397d
author: andrew
date: Fri Dec 05 03:19:01 2014 +0000

	Bump to icedtea-2.6pre13


changeset 9ed0bdd5de2a in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=9ed0bdd5de2a
author: andrew
date: Fri Dec 05 09:52:04 2014 +0000

	Added tag icedtea-2.6pre13 for changeset 13bd267f397d


diffstat:

 .hgtags                                      |   1 +
 make/jdk_generic_profile.sh                  |   2 +-
 src/share/native/sun/security/ec/ECC_JNI.cpp |  75
++++++++++++++++++++++++++-
 3 files changed, 73 insertions(+), 5 deletions(-)

diffs (191 lines):

diff -r 899ad74ad303 -r 9ed0bdd5de2a .hgtags
--- a/.hgtags	Thu Dec 04 20:38:07 2014 +0000
+++ b/.hgtags	Fri Dec 05 09:52:04 2014 +0000
@@ -533,3 +533,4 @@
 8a445d1b5af50e8628b8b1367f734d4e5741d12a icedtea-2.6pre11
 3796111298d5b013e46d5ce49f17c16fc3197be8 jdk7u80-b03
 3620a98d0295f2b5ba4483483e61bfc386e734c1 icedtea-2.6pre12
+13bd267f397d41749dcd08576a80f368cf3aaad7 icedtea-2.6pre13
diff -r 899ad74ad303 -r 9ed0bdd5de2a make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh	Thu Dec 04 20:38:07 2014 +0000
+++ b/make/jdk_generic_profile.sh	Fri Dec 05 09:52:04 2014 +0000
@@ -625,7 +625,7 @@

 # IcedTea versioning
 export ICEDTEA_NAME="IcedTea"
-export PACKAGE_VERSION="2.6pre11"
+export PACKAGE_VERSION="2.6pre13"
 export DERIVATIVE_ID="${ICEDTEA_NAME} ${PACKAGE_VERSION}"
 echo "Building ${DERIVATIVE_ID}"

diff -r 899ad74ad303 -r 9ed0bdd5de2a
src/share/native/sun/security/ec/ECC_JNI.cpp
--- a/src/share/native/sun/security/ec/ECC_JNI.cpp	Thu Dec 04 20:38:07
2014 +0000
+++ b/src/share/native/sun/security/ec/ECC_JNI.cpp	Fri Dec 05 09:52:04
2014 +0000
@@ -32,6 +32,13 @@
 #define INVALID_PARAMETER_EXCEPTION \
         "java/security/InvalidParameterException"
 #define KEY_EXCEPTION   "java/security/KeyException"
+#define INTERNAL_ERROR "java/lang/InternalError"
+
+#ifdef SYSTEM_NSS
+#define SYSTEM_UNUSED(x) UNUSED(x)
+#else
+#define SYSTEM_UNUSED(x) x
+#endif

 extern "C" {

@@ -47,8 +54,13 @@
 /*
  * Deep free of the ECParams struct
  */
-void FreeECParams(ECParams *ecparams, jboolean freeStruct)
+void FreeECParams(ECParams *ecparams, jboolean SYSTEM_UNUSED(freeStruct))
 {
+#ifdef SYSTEM_NSS
+    // Needs to be freed using the matching method to the one
+    // that allocated it. PR_TRUE means the memory is zeroed.
+    PORT_FreeArena(ecparams->arena, PR_TRUE);
+#else
     // Use B_FALSE to free the SECItem->data element, but not the
SECItem itself
     // Use B_TRUE to free both

@@ -62,7 +74,7 @@
     SECITEM_FreeItem(&ecparams->curveOID, B_FALSE);
     if (freeStruct)
         free(ecparams);
-
+#endif
 }

 jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem)
@@ -104,6 +116,13 @@
     params_item.data =
         (unsigned char *) env->GetByteArrayElements(encodedParams, 0);

+#ifdef SYSTEM_NSS
+    if (SECOID_Init() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+	goto cleanup;
+    }
+#endif
+
     // Fill a new ECParams using the supplied OID
     if (EC_DecodeParams(&params_item, &ecparams, 0) != SECSuccess) {
         /* bad curve OID */
@@ -159,6 +178,11 @@
         if (params_item.data) {
             env->ReleaseByteArrayElements(encodedParams,
                 (jbyte *) params_item.data, JNI_ABORT);
+#ifdef SYSTEM_NSS
+	    if (SECOID_Shutdown() != SECSuccess) {
+		ThrowException(env, INTERNAL_ERROR);
+	    }
+#endif
         }

         if (ecparams) {
@@ -167,10 +191,15 @@

         if (privKey) {
             FreeECParams(&privKey->ecParams, false);
+#ifndef SYSTEM_NSS
+	    // The entire ECPrivateKey is allocated in the arena
+	    // when using system NSS, so only the in-tree version
+	    // needs to clear these manually.
             SECITEM_FreeItem(&privKey->version, B_FALSE);
             SECITEM_FreeItem(&privKey->privateValue, B_FALSE);
             SECITEM_FreeItem(&privKey->publicValue, B_FALSE);
             free(privKey);
+#endif
         }

         if (pSeedBuffer) {
@@ -217,6 +246,13 @@
     params_item.data =
         (unsigned char *) env->GetByteArrayElements(encodedParams, 0);

+#ifdef SYSTEM_NSS
+    if (SECOID_Init() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+	goto cleanup;
+    }
+#endif
+
     // Fill a new ECParams using the supplied OID
     if (EC_DecodeParams(&params_item, &ecparams, 0) != SECSuccess) {
         /* bad curve OID */
@@ -258,6 +294,11 @@
         if (params_item.data) {
             env->ReleaseByteArrayElements(encodedParams,
                 (jbyte *) params_item.data, JNI_ABORT);
+#ifdef SYSTEM_NSS
+	    if (SECOID_Shutdown() != SECSuccess) {
+		ThrowException(env, INTERNAL_ERROR);
+	    }
+#endif
         }

         if (privKey.privateValue.data) {
@@ -326,6 +367,13 @@
     params_item.data =
         (unsigned char *) env->GetByteArrayElements(encodedParams, 0);

+#ifdef SYSTEM_NSS
+    if (SECOID_Init() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+	goto cleanup;
+    }
+#endif
+
     // Fill a new ECParams using the supplied OID
     if (EC_DecodeParams(&params_item, &ecparams, 0) != SECSuccess) {
         /* bad curve OID */
@@ -346,9 +394,15 @@

 cleanup:
     {
-        if (params_item.data)
+        if (params_item.data) {
             env->ReleaseByteArrayElements(encodedParams,
                 (jbyte *) params_item.data, JNI_ABORT);
+#ifdef SYSTEM_NSS
+	    if (SECOID_Shutdown() != SECSuccess) {
+		ThrowException(env, INTERNAL_ERROR);
+	    }
+#endif
+	}

         if (pubKey.publicValue.data)
             env->ReleaseByteArrayElements(publicKey,
@@ -397,6 +451,13 @@
     params_item.data =
         (unsigned char *) env->GetByteArrayElements(encodedParams, 0);

+#ifdef SYSTEM_NSS
+    if (SECOID_Init() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+	goto cleanup;
+    }
+#endif
+
     // Fill a new ECParams using the supplied OID
     if (EC_DecodeParams(&params_item, &ecparams, 0) != SECSuccess) {
         /* bad curve OID */
@@ -435,9 +496,15 @@
             env->ReleaseByteArrayElements(publicKey,
                 (jbyte *) publicValue_item.data, JNI_ABORT);

-        if (params_item.data)
+        if (params_item.data) {
             env->ReleaseByteArrayElements(encodedParams,
                 (jbyte *) params_item.data, JNI_ABORT);
+#ifdef SYSTEM_NSS
+	    if (SECOID_Shutdown() != SECSuccess) {
+		ThrowException(env, INTERNAL_ERROR);
+	    }
+#endif
+	}

         if (ecparams)
             FreeECParams(ecparams, true);



More information about the aarch64-port-dev mailing list