test/sun/security/rsa/TestSignatures.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -21,11 +21,11 @@
* questions.
*/
/**
* @test
- * @bug 4853305
+ * @bug 4853305 4963723
* @summary Test signing/verifying using all the signature algorithms
* @author Andreas Sterbenz
*/
import java.io.*;
@@ -78,10 +78,11 @@
private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception {
testSignature("MD2withRSA", privateKey, publicKey);
testSignature("MD5withRSA", privateKey, publicKey);
testSignature("SHA1withRSA", privateKey, publicKey);
+ testSignature("SHA224withRSA", privateKey, publicKey);
testSignature("SHA256withRSA", privateKey, publicKey);
RSAPublicKey rsaKey = (RSAPublicKey)publicKey;
if (rsaKey.getModulus().bitLength() > 512) {
// for SHA384 and SHA512 the data is too long for 512 bit keys
testSignature("SHA384withRSA", privateKey, publicKey);