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 4856966
27 * @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed)
28 * @author Andreas Sterbenz
29 * @library ..
30 * @library /test/lib
31 * @modules jdk.crypto.cryptoki
32 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
33 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
34 * sm TestKeyPairGenerator.policy
35 * @key randomness
36 */
37
38 import java.math.BigInteger;
39 import java.security.KeyPair;
40 import java.security.KeyPairGenerator;
41 import java.security.PrivateKey;
42 import java.security.Provider;
43 import java.security.PublicKey;
44 import java.security.Signature;
45 import java.security.interfaces.RSAPrivateCrtKey;
46 import java.security.interfaces.RSAPublicKey;
47 import java.security.spec.RSAKeyGenParameterSpec;
48 import jdk.test.lib.RandomFactory;
49
50 public class TestKeyPairGenerator extends PKCS11Test {
51
|
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 4856966
27 * @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed)
28 * @author Andreas Sterbenz
29 * @library ..
30 * @library /test/lib
31 * @modules jdk.crypto.cryptoki
32 * @build jdk.test.lib.RandomFactory
33 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
34 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
35 * sm TestKeyPairGenerator.policy
36 * @key randomness
37 */
38
39 import java.math.BigInteger;
40 import java.security.KeyPair;
41 import java.security.KeyPairGenerator;
42 import java.security.PrivateKey;
43 import java.security.Provider;
44 import java.security.PublicKey;
45 import java.security.Signature;
46 import java.security.interfaces.RSAPrivateCrtKey;
47 import java.security.interfaces.RSAPublicKey;
48 import java.security.spec.RSAKeyGenParameterSpec;
49 import jdk.test.lib.RandomFactory;
50
51 public class TestKeyPairGenerator extends PKCS11Test {
52
|