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 import java.security.InvalidKeyException;
25 import java.security.NoSuchAlgorithmException;
26 import java.security.SignatureException;
27
28 /*
29 * @test
30 * @bug 8050374
31 * @key randomness intermittent
32 * @summary This test validates signature verification
33 * Signature.verify(byte[], int, int). The test uses RandomFactory to
34 * get random set of clear text data to sign. After the signature
35 * generation, the test tries to verify signature with the above API
36 * and passing in different signature offset (0, 33, 66, 99).
37 * @library /test/lib
38 * @compile ../../../java/security/Signature/Offsets.java
39 * @requires os.family == "windows"
40 * @run main SignatureOffsets SunMSCAPI NONEwithRSA
41 * @run main SignatureOffsets SunMSCAPI MD2withRSA
42 * @run main SignatureOffsets SunMSCAPI MD5withRSA
43 * @run main SignatureOffsets SunMSCAPI SHA1withRSA
44 * @run main SignatureOffsets SunMSCAPI SHA256withRSA
45 * @run main SignatureOffsets SunMSCAPI SHA384withRSA
46 * @run main SignatureOffsets SunMSCAPI SHA512withRSA
47 */
48 public class SignatureOffsets {
49
50 public static void main(String[] args) throws NoSuchAlgorithmException,
51 InvalidKeyException, SignatureException {
52 Offsets.main(args);
53 }
54 }
|
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 import java.security.InvalidKeyException;
25 import java.security.NoSuchAlgorithmException;
26 import java.security.SignatureException;
27
28 /*
29 * @test
30 * @bug 8050374
31 * @key randomness intermittent
32 * @summary This test validates signature verification
33 * Signature.verify(byte[], int, int). The test uses RandomFactory to
34 * get random set of clear text data to sign. After the signature
35 * generation, the test tries to verify signature with the above API
36 * and passing in different signature offset (0, 33, 66, 99).
37 * @library /test/lib
38 * @build jdk.test.lib.RandomFactory
39 * @compile ../../../java/security/Signature/Offsets.java
40 * @requires os.family == "windows"
41 * @run main SignatureOffsets SunMSCAPI NONEwithRSA
42 * @run main SignatureOffsets SunMSCAPI MD2withRSA
43 * @run main SignatureOffsets SunMSCAPI MD5withRSA
44 * @run main SignatureOffsets SunMSCAPI SHA1withRSA
45 * @run main SignatureOffsets SunMSCAPI SHA256withRSA
46 * @run main SignatureOffsets SunMSCAPI SHA384withRSA
47 * @run main SignatureOffsets SunMSCAPI SHA512withRSA
48 */
49 public class SignatureOffsets {
50
51 public static void main(String[] args) throws NoSuchAlgorithmException,
52 InvalidKeyException, SignatureException {
53 Offsets.main(args);
54 }
55 }
|