equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2014, 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. |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
|
24 // |
|
25 // Security properties, once set, cannot revert to unset. To avoid |
|
26 // conflicts with tests running in the same VM isolate this test by |
|
27 // running it in otherVM mode. |
|
28 // |
|
29 |
24 /** |
30 /** |
25 * @test |
31 * @test |
26 * @bug 6383095 |
32 * @bug 6383095 |
27 * @summary CRL revoked certificate failures masked by OCSP failures |
33 * @summary CRL revoked certificate failures masked by OCSP failures |
28 * |
34 * @run main/othervm FailoverToCRL |
|
35 * @author Xuelei Fan |
|
36 */ |
|
37 |
|
38 /* |
29 * Note that the certificate validity is from Mar 16 14:55:35 2009 GMT to |
39 * Note that the certificate validity is from Mar 16 14:55:35 2009 GMT to |
30 * Dec 1 14:55:35 2028 GMT, please update it with newer certificate if |
40 * Dec 1 14:55:35 2028 GMT, please update it with newer certificate if |
31 * expires. |
41 * expires. |
32 * |
|
33 * @author Xuelei Fan |
|
34 */ |
42 */ |
35 |
43 |
36 /* |
44 /* |
37 * Certificates used in the test. |
45 * Certificates used in the test. |
38 * |
46 * |
227 return CertStore.getInstance("Collection", |
235 return CertStore.getInstance("Collection", |
228 new CollectionCertStoreParameters(crls)); |
236 new CollectionCertStoreParameters(crls)); |
229 } |
237 } |
230 |
238 |
231 public static void main(String args[]) throws Exception { |
239 public static void main(String args[]) throws Exception { |
|
240 // MD5 is used in this test case, don't disable MD5 algorithm. |
|
241 Security.setProperty( |
|
242 "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); |
|
243 |
232 CertPath path = generateCertificatePath(); |
244 CertPath path = generateCertificatePath(); |
233 Set<TrustAnchor> anchors = generateTrustAnchors(); |
245 Set<TrustAnchor> anchors = generateTrustAnchors(); |
234 CertStore crls = generateCertificateStore(); |
246 CertStore crls = generateCertificateStore(); |
235 |
247 |
236 PKIXParameters params = new PKIXParameters(anchors); |
248 PKIXParameters params = new PKIXParameters(anchors); |