1 /* |
|
2 * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Sun designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Sun in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 * have any questions. |
|
24 */ |
|
25 |
|
26 package sun.security.pkcs11; |
|
27 |
|
28 // NOTE: this class is duplicated amongst SunJCE, SunPKCS11, and SunMSCAPI. |
|
29 // All files should be kept in sync. |
|
30 |
|
31 import java.io.*; |
|
32 import java.util.*; |
|
33 import java.util.jar.*; |
|
34 import java.net.URL; |
|
35 import java.net.JarURLConnection; |
|
36 import java.net.MalformedURLException; |
|
37 |
|
38 import java.security.*; |
|
39 import java.security.cert.*; |
|
40 import java.security.cert.Certificate; |
|
41 |
|
42 /** |
|
43 * This class verifies JAR files (and any supporting JAR files), and |
|
44 * determines whether they may be used in this implementation. |
|
45 * |
|
46 * The JCE in OpenJDK has an open cryptographic interface, meaning it |
|
47 * does not restrict which providers can be used. Compliance with |
|
48 * United States export controls and with local law governing the |
|
49 * import/export of products incorporating the JCE in the OpenJDK is |
|
50 * the responsibility of the licensee. |
|
51 * |
|
52 * @since 1.7 |
|
53 */ |
|
54 final class JarVerifier { |
|
55 |
|
56 private static final boolean debug = false; |
|
57 |
|
58 /** |
|
59 * Verify the JAR file is signed by an entity which has a certificate |
|
60 * issued by a trusted CA. |
|
61 * |
|
62 * Note: this is a temporary method and will change soon to use the |
|
63 * exception chaining mechanism, which can provide more details |
|
64 * as to why the verification failed. |
|
65 * |
|
66 * @param c the class to be verified. |
|
67 * @return true if verification is successful. |
|
68 */ |
|
69 static boolean verify(final Class c) { |
|
70 return true; |
|
71 } |
|
72 } |
|