test/jdk/sun/security/ssl/rsa/SignedObjectChain.java
changeset 54333 2a29e62446bd
parent 50204 3195a713e24d
equal deleted inserted replaced
54332:9a8fe0bc38c3 54333:2a29e62446bd
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, 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.
    28  * @library /test/lib
    28  * @library /test/lib
    29  * @build jdk.test.lib.SigTestUtil
    29  * @build jdk.test.lib.SigTestUtil
    30  * @compile ../../../../java/security/SignedObject/Chain.java
    30  * @compile ../../../../java/security/SignedObject/Chain.java
    31  * @run main SignedObjectChain
    31  * @run main SignedObjectChain
    32  */
    32  */
       
    33 
    33 public class SignedObjectChain {
    34 public class SignedObjectChain {
    34 
    35 
    35     private static class Test extends Chain.Test {
    36     private static class Test extends Chain.Test {
    36 
    37 
    37         public Test(Chain.SigAlg sigAlg) {
    38         public Test(Chain.SigAlg sigAlg) {
    38             super(sigAlg, Chain.KeyAlg.RSA, Chain.Provider.SunJSSE);
    39             super(sigAlg, Chain.KeyAlg.RSA, Chain.Provider.SunJSSE);
    39         }
    40         }
    40     }
    41     }
    41 
    42 
    42     private static final Test[] tests = {
    43     private static final Test[] tests = {
    43         new Test(Chain.SigAlg.MD2withRSA),
       
    44         new Test(Chain.SigAlg.MD5withRSA),
       
    45         new Test(Chain.SigAlg.SHA1withRSA),
       
    46         new Test(Chain.SigAlg.MD5andSHA1withRSA),
    44         new Test(Chain.SigAlg.MD5andSHA1withRSA),
    47     };
    45     };
    48 
    46 
    49     public static void main(String argv[]) {
    47     public static void main(String argv[]) {
    50         boolean resutl = java.util.Arrays.stream(tests).allMatch(
    48         boolean resutl = java.util.Arrays.stream(tests).allMatch(