test/jdk/sun/security/pkcs11/KeyStore/Basic.java
changeset 54333 2a29e62446bd
parent 47216 71c04702a3d5
equal deleted inserted replaced
54332:9a8fe0bc38c3 54333:2a29e62446bd
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, 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.
   109     public void main(Provider p) throws Exception {
   109     public void main(Provider p) throws Exception {
   110 
   110 
   111         this.provider = p;
   111         this.provider = p;
   112 
   112 
   113         // get private keys
   113         // get private keys
   114         KeyFactory kf = KeyFactory.getInstance("RSA", "SunJSSE");
   114         KeyFactory kf = KeyFactory.getInstance("RSA");
   115         KeyFactory dsaKf = KeyFactory.getInstance("DSA", "SUN");
   115         KeyFactory dsaKf = KeyFactory.getInstance("DSA", "SUN");
   116 
   116 
   117         ObjectInputStream ois1 = new ObjectInputStream
   117         ObjectInputStream ois1 = new ObjectInputStream
   118                         (new FileInputStream(new File(DIR, "pk1.key")));
   118                         (new FileInputStream(new File(DIR, "pk1.key")));
   119         byte[] keyBytes = (byte[])ois1.readObject();
   119         byte[] keyBytes = (byte[])ois1.readObject();