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

Andrew Dinn adinn at redhat.com
Thu Dec 11 11:29:08 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 1Xz0ls-0008Ts-TV
	for aarch64-port-dev at openjdk.java.net; Thu, 11 Dec 2014 10:14:57 +0000
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date: Thu, 11 Dec 2014 10:14:56 +0000
Subject: /hg/icedtea7-forest-aarch64/jdk: 3 new changesets
From: adinn at icedtea.classpath.org
X-Hg-Notification: changeset 610eb1b5fd0b
Message-Id:
<hg.610eb1b5fd0b.1418292896.-5107281755808049882 at icedtea.classpath.org>
To: aarch64-port-dev at openjdk.java.net

changeset 610eb1b5fd0b in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=610eb1b5fd0b
author: andrew
date: Tue Dec 09 18:04:39 2014 +0000

	PR2135: Race condition in SunEC provider with system NSS


changeset ccdc37cdfaa8 in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=ccdc37cdfaa8
author: andrew
date: Tue Dec 09 18:55:00 2014 +0000

	Bump to icedtea-2.6.0pre14


changeset 0799319cc6be in /hg/icedtea7-forest-aarch64/jdk
details:
http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/jdk?cmd=changeset;node=0799319cc6be
author: andrew
date: Wed Dec 10 06:03:01 2014 +0000

	Added tag icedtea-2.6pre14 for changeset ccdc37cdfaa8


diffstat:

 .hgtags                                      |   1 +
 make/jdk_generic_profile.sh                  |   2 +-
 make/sun/security/ec/Makefile                |   3 +-
 make/sun/security/ec/mapfile-vers            |   2 +
 src/share/classes/sun/security/ec/SunEC.java |  19 +++++++
 src/share/native/sun/security/ec/ECC_JNI.cpp |  70
++++++++-------------------
 6 files changed, 47 insertions(+), 50 deletions(-)

diffs (213 lines):

diff -r 9ed0bdd5de2a -r 0799319cc6be .hgtags
--- a/.hgtags	Fri Dec 05 09:52:04 2014 +0000
+++ b/.hgtags	Wed Dec 10 06:03:01 2014 +0000
@@ -534,3 +534,4 @@
 3796111298d5b013e46d5ce49f17c16fc3197be8 jdk7u80-b03
 3620a98d0295f2b5ba4483483e61bfc386e734c1 icedtea-2.6pre12
 13bd267f397d41749dcd08576a80f368cf3aaad7 icedtea-2.6pre13
+ccdc37cdfaa891e3c14174378a8e7a5871e8893b icedtea-2.6pre14
diff -r 9ed0bdd5de2a -r 0799319cc6be make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh	Fri Dec 05 09:52:04 2014 +0000
+++ b/make/jdk_generic_profile.sh	Wed Dec 10 06:03:01 2014 +0000
@@ -625,7 +625,7 @@

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

diff -r 9ed0bdd5de2a -r 0799319cc6be make/sun/security/ec/Makefile
--- a/make/sun/security/ec/Makefile	Fri Dec 05 09:52:04 2014 +0000
+++ b/make/sun/security/ec/Makefile	Wed Dec 10 06:03:01 2014 +0000
@@ -158,7 +158,8 @@
   FILES_export = \
       $(PKGDIR)/ECDHKeyAgreement.java \
       $(PKGDIR)/ECDSASignature.java \
-      $(PKGDIR)/ECKeyPairGenerator.java
+      $(PKGDIR)/ECKeyPairGenerator.java \
+      $(PKGDIR)/SunEC.java

   JAVAHFLAGS = -bootclasspath \
     "$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)$(JCE_PATH)"
diff -r 9ed0bdd5de2a -r 0799319cc6be make/sun/security/ec/mapfile-vers
--- a/make/sun/security/ec/mapfile-vers	Fri Dec 05 09:52:04 2014 +0000
+++ b/make/sun/security/ec/mapfile-vers	Wed Dec 10 06:03:01 2014 +0000
@@ -31,6 +31,8 @@
 		Java_sun_security_ec_ECDSASignature_signDigest;
 		Java_sun_security_ec_ECDSASignature_verifySignedDigest;
 		Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
+		Java_sun_security_ec_SunEC_initialize;
+		Java_sun_security_ec_SunEC_cleanup;
         local:
                 *;
 };
diff -r 9ed0bdd5de2a -r 0799319cc6be
src/share/classes/sun/security/ec/SunEC.java
--- a/src/share/classes/sun/security/ec/SunEC.java	Fri Dec 05 09:52:04
2014 +0000
+++ b/src/share/classes/sun/security/ec/SunEC.java	Wed Dec 10 06:03:01
2014 +0000
@@ -58,6 +58,7 @@
             AccessController.doPrivileged(new PrivilegedAction<Void>() {
                 public Void run() {
                     System.loadLibrary("sunec"); // check for native
library
+                    initialize();
                     return null;
                 }
             });
@@ -81,4 +82,22 @@
         }
     }

+    /**
+     * Cleanup native resources during finalisation.
+     */
+    @Override
+    protected void finalize() {
+        cleanup();
+    }
+
+    /**
+     * Initialize the native code.
+     */
+    private static native void initialize();
+
+    /**
+     * Cleanup in the native layer.
+     */
+    private static native void cleanup();
+
 }
diff -r 9ed0bdd5de2a -r 0799319cc6be
src/share/native/sun/security/ec/ECC_JNI.cpp
--- a/src/share/native/sun/security/ec/ECC_JNI.cpp	Fri Dec 05 09:52:04
2014 +0000
+++ b/src/share/native/sun/security/ec/ECC_JNI.cpp	Wed Dec 10 06:03:01
2014 +0000
@@ -116,13 +116,6 @@
     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 */
@@ -178,11 +171,6 @@
         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) {
@@ -246,13 +234,6 @@
     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 */
@@ -294,11 +275,6 @@
         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) {
@@ -367,13 +343,6 @@
     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 */
@@ -397,11 +366,6 @@
         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)
@@ -451,13 +415,6 @@
     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 */
@@ -499,11 +456,6 @@
         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)
@@ -513,4 +465,26 @@
     return jSecret;
 }

+JNIEXPORT void
+JNICALL Java_sun_security_ec_SunEC_initialize
+  (JNIEnv *env, jclass UNUSED(clazz))
+{
+#ifdef SYSTEM_NSS
+    if (SECOID_Init() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+    }
+#endif
+}
+
+JNIEXPORT void
+JNICALL Java_sun_security_ec_SunEC_cleanup
+  (JNIEnv *env, jclass UNUSED(clazz))
+{
+#ifdef SYSTEM_NSS
+    if (SECOID_Shutdown() != SECSuccess) {
+	ThrowException(env, INTERNAL_ERROR);
+    }
+#endif
+}
+
 } /* extern "C" */




More information about the aarch64-port-dev mailing list