test/jdk/sun/security/rsa/SignedObjectChain.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.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8050374
    26  * @bug 8050374 8146293
    27  * @summary Verify a chain of signed objects
    27  * @library /test/lib
       
    28  * @build jdk.test.lib.SigTestUtil
    28  * @compile ../../../java/security/SignedObject/Chain.java
    29  * @compile ../../../java/security/SignedObject/Chain.java
    29  * @run main SignedObjectChain
    30  * @run main SignedObjectChain
       
    31  * @summary Verify a chain of signed objects
    30  */
    32  */
    31 public class SignedObjectChain {
    33 public class SignedObjectChain {
    32 
    34 
    33     private static class Test extends Chain.Test {
    35     private static class Test extends Chain.Test {
    34 
    36 
    43         new Test(Chain.SigAlg.SHA1withRSA),
    45         new Test(Chain.SigAlg.SHA1withRSA),
    44         new Test(Chain.SigAlg.SHA224withRSA),
    46         new Test(Chain.SigAlg.SHA224withRSA),
    45         new Test(Chain.SigAlg.SHA256withRSA),
    47         new Test(Chain.SigAlg.SHA256withRSA),
    46         new Test(Chain.SigAlg.SHA384withRSA),
    48         new Test(Chain.SigAlg.SHA384withRSA),
    47         new Test(Chain.SigAlg.SHA512withRSA),
    49         new Test(Chain.SigAlg.SHA512withRSA),
       
    50         new Test(Chain.SigAlg.SHA512_224withRSA),
       
    51         new Test(Chain.SigAlg.SHA512_256withRSA),
    48     };
    52     };
    49 
    53 
    50     public static void main(String argv[]) {
    54     public static void main(String argv[]) {
    51         boolean resutl = java.util.Arrays.stream(tests).allMatch(
    55         boolean resutl = java.util.Arrays.stream(tests).allMatch(
    52                 (test) -> Chain.runTest(test));
    56                 (test) -> Chain.runTest(test));