jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java
changeset 24863 bf6df3caafe4
parent 21596 0e3a39f29dbc
child 37779 7c84df693837
equal deleted inserted replaced
24862:9d0d8cc7c348 24863:bf6df3caafe4
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   137             System.out.println("\tVALUE=n/a");
   137             System.out.println("\tVALUE=n/a");
   138         }
   138         }
   139     }
   139     }
   140 
   140 
   141     private static void doTest() throws Exception {
   141     private static void doTest() throws Exception {
       
   142         // Make sure both NSS libraries are the same version.
       
   143         if (isNSS(provider) &&
       
   144                 (getLibsoftokn3Version() != getLibnss3Version())) {
       
   145             System.out.println("libsoftokn3 and libnss3 versions do not match.  Aborting test...");
       
   146             return;
       
   147         }
       
   148 
   142         if (ks == null) {
   149         if (ks == null) {
   143             ks = KeyStore.getInstance(KS_TYPE, provider);
   150             ks = KeyStore.getInstance(KS_TYPE, provider);
   144             ks.load(null, tokenPwd);
   151             ks.load(null, tokenPwd);
   145         }
   152         }
   146 
   153