9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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 * @test
25 * @bug 7044060 8042967
26 * @run main/othervm/timeout=250 TestDSA2
27 * @summary verify that DSA signature works using SHA and SHA-224 and
28 * SHA-256 digests.
29 */
30
31
32 import java.security.*;
33 import java.security.spec.*;
34 import java.security.interfaces.*;
35
36 public class TestDSA2 {
37
38 // NOTE: need to explictly specify provider since the more
39 // preferred provider SunPKCS11 provider only supports up
40 // 1024 bits.
41 private static final String PROV = "SUN";
42
43 private static final String[] SIG_ALGOS = {
44 "NONEwithDSA",
45 "SHA1withDSA",
46 "SHA224withDSA",
47 "SHA256withDSA",
48 "NONEwithDSAinP1363Format",
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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 * @test
25 * @bug 7044060 8042967
26 * @run main/othervm/timeout=250 TestDSA2
27 * @summary verify that DSA signature works using SHA and SHA-224 and
28 * SHA-256 digests.
29 * @key randomness
30 */
31
32
33 import java.security.*;
34 import java.security.spec.*;
35 import java.security.interfaces.*;
36
37 public class TestDSA2 {
38
39 // NOTE: need to explictly specify provider since the more
40 // preferred provider SunPKCS11 provider only supports up
41 // 1024 bits.
42 private static final String PROV = "SUN";
43
44 private static final String[] SIG_ALGOS = {
45 "NONEwithDSA",
46 "SHA1withDSA",
47 "SHA224withDSA",
48 "SHA256withDSA",
49 "NONEwithDSAinP1363Format",
|