jdk/src/windows/classes/sun/security/mscapi/JarVerifier.java
changeset 3499 dd9363188303
parent 3498 dbd1b49d341b
parent 3384 bca2225b66d7
child 3500 44c8157997f5
equal deleted inserted replaced
3498:dbd1b49d341b 3499:dd9363188303
     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 
       
    27 package sun.security.mscapi;
       
    28 
       
    29 // NOTE: this class is duplicated amongst SunJCE, SunPKCS11, and SunMSCAPI.
       
    30 // All files should be kept in sync.
       
    31 
       
    32 import java.io.*;
       
    33 import java.util.*;
       
    34 import java.util.jar.*;
       
    35 import java.net.URL;
       
    36 import java.net.JarURLConnection;
       
    37 import java.net.MalformedURLException;
       
    38 
       
    39 import java.security.*;
       
    40 import java.security.cert.*;
       
    41 import java.security.cert.Certificate;
       
    42 
       
    43 /**
       
    44  * This class verifies JAR files (and any supporting JAR files), and
       
    45  * determines whether they may be used in this implementation.
       
    46  *
       
    47  * The JCE in OpenJDK has an open cryptographic interface, meaning it
       
    48  * does not restrict which providers can be used.  Compliance with
       
    49  * United States export controls and with local law governing the
       
    50  * import/export of products incorporating the JCE in the OpenJDK is
       
    51  * the responsibility of the licensee.
       
    52  *
       
    53  * @since 1.7
       
    54  */
       
    55 final class JarVerifier {
       
    56 
       
    57     private static final boolean debug = false;
       
    58 
       
    59     /**
       
    60      * Verify the JAR file is signed by an entity which has a certificate
       
    61      * issued by a trusted CA.
       
    62      *
       
    63      * Note: this is a temporary method and will change soon to use the
       
    64      * exception chaining mechanism, which can provide more details
       
    65      * as to why the verification failed.
       
    66      *
       
    67      * @param c the class to be verified.
       
    68      * @return true if verification is successful.
       
    69      */
       
    70     static boolean verify(final Class c) {
       
    71         return true;
       
    72     }
       
    73 }