0N/A * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 809N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 809N/A * This code is free software; you can redistribute it and/or modify it 809N/A * under the terms of the GNU General Public License version 2 only, as 809N/A * published by the Free Software Foundation. Oracle designates this 809N/A * particular file as subject to the "Classpath" exception as provided 809N/A * by Oracle in the LICENSE file that accompanied this code. 809N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 809N/A * 2 along with this work; if not, write to the Free Software Foundation, 809N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 809N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 809N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class instantiates implementations of JCE engine classes from 809N/A * providers registered with the java.security.Security object. 809N/A // The defaultPolicy and exemptPolicy will be set up 0N/A // in the static initializer. 809N/A // Map<Provider,?> of the providers we already have verified 809N/A // value == PROVIDER_VERIFIED is successfully verified 0N/A // value is failure cause Exception in error case 5713N/A // Map<Provider,?> of the providers currently being verified 809N/A // Set the default value. May be changed in the static initializer. 809N/A * Don't let anyone instantiate this. 809N/A "Can not initialize cryptographic mechanism");
0N/A // allow only signed providers 809N/A * Verify if the JAR at URL codeBase is a signed exempt application 0N/A * JAR file and returns the permissions bundled with the JAR. 0N/A * @throws Exception on error 809N/A * Verify if the JAR at URL codeBase is a signed provider JAR file. 809N/A * @throws Exception on error 809N/A // Verify the provider JAR file and all 0N/A // supporting JAR files if there are any. 0N/A * Verify that the provider JAR files are signed properly, which 809N/A * means the signer's certificate can be traced back to a 809N/A * Return null if ok, failure Exception if verification failed. 809N/A // this method is static synchronized, must be recursion 809N/A // return failure now but do not save the result 809N/A // Verified ok, cache result 809N/A // return whether this provider is properly signed and can be used by JCE 0N/A // dummy object to represent null 809N/A // reference to a Map we use as a cache for codebases * Retuns the CodeBase for the given class. (
"Cannot locate policy or framework files!");
// Read jurisdiction policies. // Merge the export and import policies for default applications. // Merge the export and import policies for exempt applications. * Load the policies from the specified file. Also checks that the * policies are correctly signed. // Enforce the signer restraint, i.e. signer of JCE framework // jar should also be the signer of the two jurisdiction policy // Close and nullify the JarFile reference to help GC.