changeset 10841:d359a9bb2d3a

8059315: KeyStore and keytool tests failing with KeyStoreException 8059316: closed/com/sun/crypto/provider/KeyStore/BackwardCompatibility.java failing in jigsaw/m2
author mchung
date Fri, 17 Oct 2014 12:16:57 -0700
parents 810edba2fefc
children c831b5913a36
files src/java.base/share/classes/javax/crypto/JceSecurityManager.java src/java.base/share/classes/javax/crypto/ProviderVerifier.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/javax/crypto/JceSecurityManager.java	Fri Oct 17 16:33:40 2014 +0200
+++ b/src/java.base/share/classes/javax/crypto/JceSecurityManager.java	Fri Oct 17 12:16:57 2014 -0700
@@ -229,6 +229,11 @@
 
     // See  bug 4341369 & 4334690 for more info.
     boolean isCallerTrusted(Provider provider) {
+        if (ProviderVerifier.isTrustedCryptoProvider(provider)) {
+            // fast path
+            return true;
+        }
+
         // Get the caller and its codebase.
         Class<?>[] context = getClassContext();
         URL callerCodeBase = null;
--- a/src/java.base/share/classes/javax/crypto/ProviderVerifier.java	Fri Oct 17 16:33:40 2014 +0200
+++ b/src/java.base/share/classes/javax/crypto/ProviderVerifier.java	Fri Oct 17 12:16:57 2014 -0700
@@ -157,6 +157,14 @@
     }
 
     /**
+     * Returns true if the given provider is JDK trusted crypto provider
+     * if the implementation supports fast-path verification.
+     */
+    static boolean isTrustedCryptoProvider(Provider provider) {
+        return false;
+    }
+
+    /**
      * Returns the permissions which are bundled with the JAR file,
      * aka the "cryptoperms" file.
      *