test/jdk/sun/security/rsa/SignatureOffsets.java
branchJDK-8145252-TLS13-branch
changeset 56542 56aaa6cb3693
parent 47216 71c04702a3d5
equal deleted inserted replaced
56541:92cbbfc996f3 56542:56aaa6cb3693
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, 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.
    25 import java.security.NoSuchAlgorithmException;
    25 import java.security.NoSuchAlgorithmException;
    26 import java.security.SignatureException;
    26 import java.security.SignatureException;
    27 
    27 
    28 /*
    28 /*
    29  * @test
    29  * @test
    30  * @bug 8050374
    30  * @bug 8050374 8146293
    31  * @key randomness
    31  * @key randomness
    32  * @summary This test validates signature verification
    32  * @summary This test validates signature verification
    33  *          Signature.verify(byte[], int, int). The test uses RandomFactory to
    33  *          Signature.verify(byte[], int, int). The test uses RandomFactory to
    34  *          get random set of clear text data to sign. After the signature
    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
    35  *          generation, the test tries to verify signature with the above API
    42  * @run main SignatureOffsets SunRsaSign SHA1withRSA
    42  * @run main SignatureOffsets SunRsaSign SHA1withRSA
    43  * @run main SignatureOffsets SunRsaSign SHA224withRSA
    43  * @run main SignatureOffsets SunRsaSign SHA224withRSA
    44  * @run main SignatureOffsets SunRsaSign SHA256withRSA
    44  * @run main SignatureOffsets SunRsaSign SHA256withRSA
    45  * @run main SignatureOffsets SunRsaSign SHA384withRSA
    45  * @run main SignatureOffsets SunRsaSign SHA384withRSA
    46  * @run main SignatureOffsets SunRsaSign SHA512withRSA
    46  * @run main SignatureOffsets SunRsaSign SHA512withRSA
       
    47  * @run main SignatureOffsets SunRsaSign SHA512/224withRSA
       
    48  * @run main SignatureOffsets SunRsaSign SHA512/256withRSA
    47  */
    49  */
    48 public class SignatureOffsets {
    50 public class SignatureOffsets {
    49 
    51 
    50     public static void main(String[] args) throws NoSuchAlgorithmException,
    52     public static void main(String[] args) throws NoSuchAlgorithmException,
    51             InvalidKeyException, SignatureException {
    53             InvalidKeyException, SignatureException {