11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6414980
27 * @summary Test that the PKCS#11 KeyStore handles RSA, DSA, and EC keys
28 * @author Andreas Sterbenz
29 * @library ..
30 * @run main/othervm AddPrivateKey
31 */
32
33 import java.io.*;
34 import java.util.*;
35
36 import java.security.*;
37 import java.security.KeyStore.*;
38 import java.security.cert.*;
39
40 // this test is currently only run for the NSS KeyStore provider, but it
41 // is really a generic KeyStore test so it should be modified to run for
42 // all providers.
43 public class AddPrivateKey extends SecmodTest {
44
45 public static void main(String[] args) throws Exception {
46 if (initSecmod() == false) {
47 return;
48 }
49
50 String configName = BASE + SEP + "nss.cfg";
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6414980
27 * @summary Test that the PKCS#11 KeyStore handles RSA, DSA, and EC keys
28 * @author Andreas Sterbenz
29 * @library ..
30 * @run main/othervm AddPrivateKey
31 * @key randomness
32 */
33
34 import java.io.*;
35 import java.util.*;
36
37 import java.security.*;
38 import java.security.KeyStore.*;
39 import java.security.cert.*;
40
41 // this test is currently only run for the NSS KeyStore provider, but it
42 // is really a generic KeyStore test so it should be modified to run for
43 // all providers.
44 public class AddPrivateKey extends SecmodTest {
45
46 public static void main(String[] args) throws Exception {
47 if (initSecmod() == false) {
48 return;
49 }
50
51 String configName = BASE + SEP + "nss.cfg";
|