jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java
changeset 40975 680639c9b307
parent 35379 1e8e336ef66b
child 42693 6645de32a866
equal deleted inserted replaced
40974:42921b893642 40975:680639c9b307
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
       
    24 /*
       
    25  * @test
       
    26  * @bug 8048622 8134232
       
    27  * @summary Checks that PKCS#11 keystore can't be loaded with wrong password
       
    28  * @library ../
       
    29  * @modules jdk.crypto.pkcs11
       
    30  * @run main/othervm LoadKeystore
       
    31  * @run main/othervm LoadKeystore sm policy
       
    32  */
       
    33 
    24 import java.io.File;
    34 import java.io.File;
    25 import java.io.IOException;
    35 import java.io.IOException;
    26 import java.security.KeyStore;
    36 import java.security.KeyStore;
    27 import java.security.KeyStoreException;
    37 import java.security.KeyStoreException;
    28 import java.security.Provider;
    38 import java.security.Provider;
    29 import java.security.Security;
    39 import java.security.Security;
    30 import java.security.UnrecoverableKeyException;
    40 import java.security.UnrecoverableKeyException;
    31 import java.util.Collections;
    41 import java.util.Collections;
    32 
    42 
    33 /*
       
    34  * @test
       
    35  * @bug 8048622 8134232
       
    36  * @summary Checks that PKCS#11 keystore can't be loaded with wrong password
       
    37  * @library ../
       
    38  * @run main/othervm LoadKeystore
       
    39  * @run main/othervm LoadKeystore sm policy
       
    40  */
       
    41 public class LoadKeystore extends SecmodTest {
    43 public class LoadKeystore extends SecmodTest {
    42 
    44 
    43     public static void main(String[] args) throws Exception {
    45     public static void main(String[] args) throws Exception {
    44         if (!initSecmod()) {
    46         if (!initSecmod()) {
    45             return;
    47             return;