author | xuelei |
Mon, 13 Jan 2014 21:12:58 -0800 | |
changeset 22268 | d72c97c708ae |
parent 12693 | e3c056161305 |
permissions | -rw-r--r-- |
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
1 |
/* |
22268
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
2 |
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
4 |
* |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
8 |
* |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
13 |
* accompanied this code). |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
14 |
* |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
18 |
* |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
21 |
* questions. |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
22 |
*/ |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
23 |
|
22268
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
24 |
// |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
25 |
// Security properties, once set, cannot revert to unset. To avoid |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
26 |
// conflicts with tests running in the same VM isolate this test by |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
27 |
// running it in otherVM mode. |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
28 |
// |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
29 |
|
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
30 |
/* |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
31 |
* @test |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
32 |
* @bug 7167988 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
33 |
* @summary PKIX CertPathBuilder in reverse mode doesn't work if more than |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
34 |
* one trust anchor is specified |
22268
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
35 |
* @run main/othervm ReverseBuild |
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
36 |
*/ |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
37 |
import java.io.*; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
38 |
import java.util.*; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
39 |
import java.security.cert.*; |
22268
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
40 |
import java.security.Security; |
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
41 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
42 |
import sun.security.provider.certpath.SunCertPathBuilderParameters; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
43 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
44 |
public class ReverseBuild { |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
45 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
46 |
// Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
47 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
48 |
// Not Before: Dec 8 02:43:36 2008 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
49 |
// Not After : Aug 25 02:43:36 2028 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
50 |
// Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
51 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
52 |
// FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
53 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
54 |
// keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
55 |
// DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
56 |
// serial:00 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
57 |
static String NoiceTrusedCertStr = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
58 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
59 |
"MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
60 |
"MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
61 |
"EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
62 |
"BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
63 |
"dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
64 |
"gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
65 |
"4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
66 |
"7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
67 |
"A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
68 |
"hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
69 |
"U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
70 |
"DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
71 |
"ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
72 |
"LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSqbFNd4j9Wott+08qxHPLpsf3P\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
73 |
"6Mvf0r1PNTY2hwTJLJmKtg==\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
74 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
75 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
76 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
77 |
// Issuer: C=US, O=Java, OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
78 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
79 |
// Not Before: Aug 19 01:52:19 2011 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
80 |
// Not After : Jul 29 01:52:19 2032 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
81 |
// Subject: C=US, O=Java, OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
82 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
83 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
84 |
// B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
85 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
86 |
// keyid:B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
87 |
// DirName:/C=US/O=Java/OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
88 |
// serial:00 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
89 |
static String NoiceTrusedCertStr_2nd = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
90 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
91 |
"MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
92 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
93 |
"MTEwODE5MDE1MjE5WhcNMzIwNzI5MDE1MjE5WjA7MQswCQYDVQQGEwJVUzENMAsG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
94 |
"A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
95 |
"KoZIhvcNAQEBBQADgY0AMIGJAoGBAM8orG08DtF98TMSscjGsidd1ZoN4jiDpi8U\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
96 |
"ICz+9dMm1qM1d7O2T+KH3/mxyox7Rc2ZVSCaUD0a3CkhPMnlAx8V4u0H+E9sqso6\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
97 |
"iDW3JpOyzMExvZiRgRG/3nvp55RMIUV4vEHOZ1QbhuqG4ebN0Vz2DkRft7+flthf\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
98 |
"vDld6f5JAgMBAAGjgaUwgaIwHQYDVR0OBBYEFLl81dnfp0wDrv0OJ1sxlWzH83Xh\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
99 |
"MGMGA1UdIwRcMFqAFLl81dnfp0wDrv0OJ1sxlWzH83XhoT+kPTA7MQswCQYDVQQG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
100 |
"EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
101 |
"Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEE\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
102 |
"BQADgYEALlgaH1gWtoBZ84EW8Hu6YtGLQ/L9zIFmHonUPZwn3Pr//icR9Sqhc3/l\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
103 |
"pVTxOINuFHLRz4BBtEylzRIOPzK3tg8XwuLb1zd0db90x3KBCiAL6E6cklGEPwLe\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
104 |
"XYMHDn9eDsaq861Tzn6ZwzMgw04zotPMoZN0mVd/3Qca8UJFucE=\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
105 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
106 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
107 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
108 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
109 |
// Issuer: C=US, O=Java, OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
110 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
111 |
// Not Before: May 5 02:40:50 2012 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
112 |
// Not After : Apr 15 02:40:50 2033 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
113 |
// Subject: C=US, O=Java, OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
114 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
115 |
// DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
116 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
117 |
// keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
118 |
// DirName:/C=US/O=Java/OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
119 |
// serial:00 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
120 |
static String trustedCertStr = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
121 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
122 |
"MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJVUzEN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
123 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
124 |
"MTIwNTA1MDI0MDUwWhcNMzMwNDE1MDI0MDUwWjA7MQswCQYDVQQGEwJVUzENMAsG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
125 |
"A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
126 |
"KoZIhvcNAQEBBQADgY0AMIGJAoGBANtiq0AIJK+iVRwFrqcD7fYXTCbMYC5Qz/k6\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
127 |
"AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwvzuURbc9+paOBWeHbN+Sc\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
128 |
"x3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStFhSHXATjtdbskNOAYGLTV\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
129 |
"x8uEy9GbAgMBAAGjgaUwgaIwHQYDVR0OBBYEFN1OjSoRwIMD8Kzror/58n3IaR+b\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
130 |
"MGMGA1UdIwRcMFqAFN1OjSoRwIMD8Kzror/58n3IaR+boT+kPTA7MQswCQYDVQQG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
131 |
"EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
132 |
"Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEC\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
133 |
"BQADgYEAjjkJesQrkbr36N40egybaIxw7RcqT6iy5fkAGS1JYlBDk8uSCK1o6bCH\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
134 |
"ls5EpYcGeEoabSS73WRdkO1lgeyWDduO4ef8cCCSpmpT6/YdZG0QS1PtcREeVig+\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
135 |
"Zr25jNemS4ADHX0aaXP4kiV/G80cR7nX5t5XCUm4bYdbwM07NgI=\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
136 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
137 |
static String trustedPrivateKey = // Private key in the format of PKCS#8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
138 |
"MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBANtiq0AIJK+iVRwF\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
139 |
"rqcD7fYXTCbMYC5Qz/k6AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwv\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
140 |
"zuURbc9+paOBWeHbN+Scx3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStF\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
141 |
"hSHXATjtdbskNOAYGLTVx8uEy9GbAgMBAAECgYEA2VjHkIiA0ABjkX+PqKeb+VLb\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
142 |
"fxS7tSca5C8zfdRhLxAWRui0/3ihst0eCJNrBDuxvAOACovsDWyLuaUjtI2v2ysz\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
143 |
"vz6SPyGy82PhQOFzyKQuQ814N6EpothpiZzF0yFchfKIGhUsdY89UrGs9nM7m6NT\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
144 |
"rztYvgIu4avg2VPR2AECQQD+pFAqipR2BplQRIuuRSZfHRxvoEyDjT1xnHJsC6WP\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
145 |
"I5hCLghL91MhQGWbP4EJMKYQOTRVukWlcp2Kycpf+P5hAkEA3I43gmVUAPEdyZdY\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
146 |
"fatW7OaLlbbYJb6qEtpCZ1Rwe/BIvm6H6E3qSi/lpz7Ia7WDulpbF6BawHH3pRFq\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
147 |
"CUY5ewJBAP3pUDqrRpBN0jB0uSeDslhjSciQ+dqvSpZv3rSYBHUvlBJhnkpJiy37\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
148 |
"7ZUZhIxqYxyIPgRBolLwb+FFh7OdL+ECQCtldDic9WVmC+VheRDpCKZ+SlK/8lGi\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
149 |
"7VXeShiIvcU1JysJFoa35fSI7hf1O3wt7+hX5PqGG7Un94EsJwACKEcCQQC1TWt6\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
150 |
"ArKH6tRxKjOxFtqfs8fgEVYUaOr3j1jF4KBUuX2mtQtddZe3VfJ2wPsuKMMxmhkB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
151 |
"e7xWWZnJsErt2e+E"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
152 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
153 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
154 |
// Issuer: C=US, O=Java, OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
155 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
156 |
// Not Before: May 5 02:40:53 2012 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
157 |
// Not After : Jan 21 02:40:53 2032 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
158 |
// Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
159 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
160 |
// 13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
161 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
162 |
// keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
163 |
// DirName:/C=US/O=Java/OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
164 |
// serial:00 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
165 |
static String caSignerStr = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
166 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
167 |
"MIICqDCCAhGgAwIBAgIBAjANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
168 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
169 |
"MTIwNTA1MDI0MDUzWhcNMzIwMTIxMDI0MDUzWjBOMQswCQYDVQQGEwJVUzENMAsG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
170 |
"A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAPBgNV\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
171 |
"BAMTCGNhc2lnbmVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+x8+o7oM0\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
172 |
"ct/LZmZLXBL4CQ8jrULD5P7NtEW0hg/zxBFZfBHf+44Oo2eMPYZj+7xaREOH5BmV\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
173 |
"KRYlzRtONAaC5Ng4Mrm5UKNPcMIIUjUOvm7vWM4oSTMSfoEcSX+vp99uUAkw3w7Z\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
174 |
"+frYDm1M4At/j0b+lLij71GFN2L8drpgPQIDAQABo4GoMIGlMB0GA1UdDgQWBBQT\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
175 |
"B+ARB9vrMyOHMdDbfhZWvhGQCjBjBgNVHSMEXDBagBTdTo0qEcCDA/Cs66K/+fJ9\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
176 |
"yGkfm6E/pD0wOzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsT\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
177 |
"FFN1bkpTU0UgVGVzdCBTZXJpdmNlggEAMBIGA1UdEwEB/wQIMAYBAf8CAQEwCwYD\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
178 |
"VR0PBAQDAgEGMA0GCSqGSIb3DQEBBAUAA4GBAI+LXA/UCPkTANablUkt80JNPWsl\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
179 |
"pS4XLNgPxWaN0bkRDs5oI4ooWAz1rwpeJ/nfetOvWlpmrVjSeovBFja5Hl+dUHTf\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
180 |
"VfuyzkxXbhuNiJIpo1mVBpNsjwu9YRxuwX6UA2LTUQpgvtVJEE012x3zRvxBCbu2\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
181 |
"Y/v1R5fZ4c+hXDfC\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
182 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
183 |
static String caSignerPrivateKey = // Private key in the format of PKCS#8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
184 |
"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAL7Hz6jugzRy38tm\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
185 |
"ZktcEvgJDyOtQsPk/s20RbSGD/PEEVl8Ed/7jg6jZ4w9hmP7vFpEQ4fkGZUpFiXN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
186 |
"G040BoLk2DgyublQo09wwghSNQ6+bu9YzihJMxJ+gRxJf6+n325QCTDfDtn5+tgO\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
187 |
"bUzgC3+PRv6UuKPvUYU3Yvx2umA9AgMBAAECgYBYvu30cW8LONyt62Zua9hPFTe7\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
188 |
"qt9B7QYyfkdmoG5PQMepTrOp84SzfoOukvgvDm0huFuJnSvhXQl2cCDhkgXskvFj\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
189 |
"Hh7KBCFViVXokGdq5YoS0/KYMyQV0TZfJUvILBl51uc4/siQ2tClC/N4sa+1JhgW\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
190 |
"a6dFGfRjiUKSSlmMwQJBAPWpIz3Q/c+DYMvoQr5OD8EaYwYIevlTdXb97RnJJh2b\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
191 |
"UnhB9jrqesJiHYVzPmP0ukyPOXOwlp2T5Am4Kw0LFOkCQQDGz150NoHOp28Mvyc4\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
192 |
"CTqz/zYzUhy2eCJESl196uyP4N65Y01VYQ3JDww4DlsXiU17tVSbgA9TCcfTYOzy\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
193 |
"vyw1AkARUky+1hafZCcWGZljK8PmnMKwsTZikCTvL/Zg5BMA8Wu+OQBwpQnk3OAy\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
194 |
"Aa87gw0DyvGFG8Vy9POWT9sRP1/JAkBqP0hrMvYMSs6+MSn0eHo2151PsAJIQcuO\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
195 |
"U2/Da1khSzu8N6WMi2GiobgV/RYRbf9KrY2ZzMZjykZQYOxAjopBAkEAghCu38cN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
196 |
"aOsW6ueo24uzsWI1FTdE+qWNVEi3RSP120xXBCyhaBjIq4WVSlJK9K2aBaJpit3j\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
197 |
"iQ5tl6zrLlxQhg=="; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
198 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
199 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
200 |
// Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
201 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
202 |
// Not Before: May 5 02:40:57 2012 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
203 |
// Not After : Jan 21 02:40:57 2032 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
204 |
// Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
205 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
206 |
// 39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
207 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
208 |
// keyid:13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
209 |
// DirName:/C=US/O=Java/OU=SunJSSE Test Serivce |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
210 |
// serial:02 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
211 |
static String certIssuerStr = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
212 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
213 |
"MIICvjCCAiegAwIBAgIBAzANBgkqhkiG9w0BAQQFADBOMQswCQYDVQQGEwJVUzEN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
214 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAP\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
215 |
"BgNVBAMTCGNhc2lnbmVyMB4XDTEyMDUwNTAyNDA1N1oXDTMyMDEyMTAyNDA1N1ow\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
216 |
"UDELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0Ug\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
217 |
"VGVzdCBTZXJpdmNlMRMwEQYDVQQDEwpjZXJ0aXNzdWVyMIGfMA0GCSqGSIb3DQEB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
218 |
"AQUAA4GNADCBiQKBgQCyz55zinU6kNL/LeiTNiBI0QWYmDG0YTotuC4D75liBNqs\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
219 |
"7Mmladsh2mTtQUAwmuGaGzaZV25a+cUax0DXZoyBwdbTI09u1bUYsZcaUUKbPoCC\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
220 |
"HH26e4jLFL4olW13Sv4ZAd57tIYevMw+Fp5f4fLPFGegCJTFlv2Qjpmic/cuvQID\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
221 |
"AQABo4GpMIGmMB0GA1UdDgQWBBQ5DsYzsVC8cwcx5dgE97uXVc+byDBjBgNVHSME\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
222 |
"XDBagBQTB+ARB9vrMyOHMdDbfhZWvhGQCqE/pD0wOzELMAkGA1UEBhMCVVMxDTAL\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
223 |
"BgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0UgVGVzdCBTZXJpdmNlggECMBMG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
224 |
"A1UdEwEB/wQJMAcBAf8CAgQAMAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQQFAAOB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
225 |
"gQCQTagenCdClT98C+oTJGJrw/dUBD9K3tE6ZJKPMc/2bUia8G5ei1C0eXj4mWG2\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
226 |
"lu9umR6C90/A6qB050QB2h50qtqxSrkpu+ym1yypauZpg7U3nUY9wZWJNI1vqrQZ\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
227 |
"pqUMRcXY3iQIVKx+Qj+4/Za1wwFQzpEoGmqRW31V1SdMEw==\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
228 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
229 |
static String certIssuerPrivateKey = // Private key in the format of PKCS#8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
230 |
"MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALLPnnOKdTqQ0v8t\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
231 |
"6JM2IEjRBZiYMbRhOi24LgPvmWIE2qzsyaVp2yHaZO1BQDCa4ZobNplXblr5xRrH\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
232 |
"QNdmjIHB1tMjT27VtRixlxpRQps+gIIcfbp7iMsUviiVbXdK/hkB3nu0hh68zD4W\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
233 |
"nl/h8s8UZ6AIlMWW/ZCOmaJz9y69AgMBAAECgYEAjtew2tgm4gxDojqIauF4VPM1\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
234 |
"pzsdqd1p3pAdomNLgrQiBLZ8N7oiph6TNb1EjA+OXc+ThFgF/oM9ZDD8qZZwcvjN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
235 |
"qDZlpTkFs2TaGcyEZfUaMB45NHVs6Nn+pSkagSNwwy3xeyAct7sQEzGNTDlEwVv5\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
236 |
"7V9LQutQtBd6xT48KzkCQQDpNRfv2OFNG/6GtzJoO68oJhpnpl2MsYNi4ntRkre/\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
237 |
"6uXpiCYaDskcrPMRwOOs0m7mxG+Ev+uKnLnSoEMm1GCbAkEAxEmDtiD0Psb8Z9BL\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
238 |
"ZRb83Jqho3xe2MCAh3xUfz9b/Mhae9dZ44o4OCgQZuwvW1mczF0NtpgZl93BmYa2\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
239 |
"hTwHhwJBAKHrEj6ep/fA6x0gD2idoATRR94VfbiU+7NpqtO9ecVP0+gsdr/66hn1\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
240 |
"3yLBeZLh3MxvMTrLgkAQh1i9m0JXjOcCQQClLXAHHegrw+u3uNMZeKTFR+Lp3sk6\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
241 |
"AZSnbvr0Me9I45kxSeG81x3ENALJecvIRbrrRws5MvmmkNhQR8rkh8WVAkEAk6b+\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
242 |
"aVtmBgUaTS5+FFlHGHJY9HFrfT1a1C/dwyMuqlmbC3YsBmZaMOlKli5TXNybLff8\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
243 |
"5KMeGEpXMzgC7AscGA=="; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
244 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
245 |
// Certificate information: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
246 |
// Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
247 |
// Validity |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
248 |
// Not Before: May 5 02:41:01 2012 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
249 |
// Not After : Jan 21 02:41:01 2032 GMT |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
250 |
// Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=localhost |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
251 |
// X509v3 Subject Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
252 |
// AD:C0:2C:4C:E4:C2:2E:A1:BB:5D:92:BE:66:E0:4E:E0:0D:2F:11:EF |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
253 |
// X509v3 Authority Key Identifier: |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
254 |
// keyid:39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
255 |
static String targetCertStr = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
256 |
"-----BEGIN CERTIFICATE-----\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
257 |
"MIICjTCCAfagAwIBAgIBBDANBgkqhkiG9w0BAQQFADBQMQswCQYDVQQGEwJVUzEN\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
258 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxEzAR\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
259 |
"BgNVBAMTCmNlcnRpc3N1ZXIwHhcNMTIwNTA1MDI0MTAxWhcNMzIwMTIxMDI0MTAx\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
260 |
"WjBPMQswCQYDVQQGEwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNT\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
261 |
"RSBUZXN0IFNlcml2Y2UxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0B\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
262 |
"AQEFAAOBjQAwgYkCgYEAvwaUd7wmBSKqycEstYLWD26vkU08DM39EtaT8wL9HnQ0\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
263 |
"fgPblwBFI4zdLa2cuYXRZcFUb04N8nrkcpR0D6kkE+AlFAoRWrrZF80B7JTbtEK4\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
264 |
"1PIeurihXvUT+4MpzGLOojIihMfvM4ufelblD56SInso4WFHm7t4qCln88J1gjkC\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
265 |
"AwEAAaN4MHYwCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBStwCxM5MIuobtdkr5m4E7g\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
266 |
"DS8R7zAfBgNVHSMEGDAWgBQ5DsYzsVC8cwcx5dgE97uXVc+byDAnBgNVHSUEIDAe\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
267 |
"BggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDMA0GCSqGSIb3DQEBBAUAA4GB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
268 |
"AGfwcfdvEG/nSCiAn2MGbYHp34mgF3OA1SJLWUW0LvWJhwm2cn4AXlSoyvbwrkaB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
269 |
"IDDCwhJvvc0vUyL2kTx7sqVaFTq3mDs+ktlB/FfH0Pb+i8FE+g+7T42Iw/j0qxHL\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
270 |
"YmgbrjBQf5WYN1AvBE/rrPt9aOtS3UsqtVGW574b0shW\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
271 |
"-----END CERTIFICATE-----"; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
272 |
static String targetPrivateKey = // Private key in the format of PKCS#8 |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
273 |
"MIICdAIBADANBgkqhkiG9w0BAQEFAASCAl4wggJaAgEAAoGBAL8GlHe8JgUiqsnB\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
274 |
"LLWC1g9ur5FNPAzN/RLWk/MC/R50NH4D25cARSOM3S2tnLmF0WXBVG9ODfJ65HKU\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
275 |
"dA+pJBPgJRQKEVq62RfNAeyU27RCuNTyHrq4oV71E/uDKcxizqIyIoTH7zOLn3pW\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
276 |
"5Q+ekiJ7KOFhR5u7eKgpZ/PCdYI5AgMBAAECf3CscOYvFD3zNMnMJ5LomVqA7w3F\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
277 |
"gKYM2jlCWAH+wU41PMEXhW6Lujw92jgXL1o+lERwxFzirVdZJWZwKgUSvzP1G0h3\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
278 |
"fkucq1/UWnToK+8NSXNM/yS8hXbBgSEoJo5f7LKcIi1Ev6doBVofMxs+njzyWKbM\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
279 |
"Nb7rOLHadghoon0CQQDgQzbzzSN8Dc1YmmylhI5v+0sQRHH0DL7D24k4Weh4vInG\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
280 |
"EAbt4x8M7ZKEo8/dv0s4hbmNmAnJl93/RRxIyEqLAkEA2g87DiswSQam2pZ8GlrO\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
281 |
"+w4Qg9mH8uxx8ou2rl0XlHzH1XiTNbkjfY0EZoL7L31BHFk9n11Fb2P85g6ws+Hy\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
282 |
"ywJAM/xgyLNM/nzUlS128geAXUULaYH0SHaL4isJ7B4rXZGW/mrIsGxtzjlkNYsj\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
283 |
"rGujrD6TfNc5rZmexIXowJZtcQJBAIww+pCzZ4mrgx5JXWQ8OZHiiu+ZrPOa2+9J\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
284 |
"r5sOMpi+WGN/73S8oHqZbNjTINZ5OqEVJq8MchWZPQBTNXuQql0CQHEjUzzkCQa3\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
285 |
"j6JTa2KAdqyvLOx0XF9zcc1gA069uNQI2gPUHS8V215z57f/gMGnDNhVfLs/vMKz\n" + |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
286 |
"sFkVZ3zg7As="; |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
287 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
288 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
289 |
public static void main(String args[]) throws Exception { |
22268
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
290 |
// MD5 is used in this test case, don't disable MD5 algorithm. |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
291 |
Security.setProperty( |
d72c97c708ae
8030829: Add MD5 to jdk.certpath.disabledAlgorithms security property
xuelei
parents:
12693
diff
changeset
|
292 |
"jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); |
12693
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
293 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
294 |
// generate certificate from cert string |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
295 |
CertificateFactory cf = CertificateFactory.getInstance("X.509"); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
296 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
297 |
// create a set of trust anchors |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
298 |
LinkedHashSet<TrustAnchor> trustAnchors = new LinkedHashSet<>(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
299 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
300 |
ByteArrayInputStream is = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
301 |
new ByteArrayInputStream(NoiceTrusedCertStr.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
302 |
Certificate trustedCert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
303 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
304 |
TrustAnchor anchor = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
305 |
new TrustAnchor((X509Certificate)trustedCert, null); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
306 |
trustAnchors.add(anchor); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
307 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
308 |
is = new ByteArrayInputStream(trustedCertStr.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
309 |
trustedCert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
310 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
311 |
anchor = new TrustAnchor((X509Certificate)trustedCert, null); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
312 |
trustAnchors.add(anchor); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
313 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
314 |
is = new ByteArrayInputStream(NoiceTrusedCertStr_2nd.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
315 |
trustedCert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
316 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
317 |
anchor = new TrustAnchor((X509Certificate)trustedCert, null); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
318 |
trustAnchors.add(anchor); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
319 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
320 |
// create a list of certificates |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
321 |
List<Certificate> chainList = new ArrayList<>(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
322 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
323 |
is = new ByteArrayInputStream(targetCertStr.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
324 |
Certificate cert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
325 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
326 |
chainList.add(cert); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
327 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
328 |
is = new ByteArrayInputStream(certIssuerStr.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
329 |
cert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
330 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
331 |
chainList.add(cert); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
332 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
333 |
is = new ByteArrayInputStream(caSignerStr.getBytes()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
334 |
cert = cf.generateCertificate(is); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
335 |
is.close(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
336 |
chainList.add(cert); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
337 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
338 |
// create a certificate selector |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
339 |
X509CertSelector xcs = new X509CertSelector(); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
340 |
X509Certificate eeCert = (X509Certificate)chainList.get(0); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
341 |
xcs.setSubject(eeCert.getSubjectX500Principal()); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
342 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
343 |
// reverse build |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
344 |
SunCertPathBuilderParameters params = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
345 |
new SunCertPathBuilderParameters(trustAnchors, xcs); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
346 |
params.setBuildForward(false); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
347 |
params.setRevocationEnabled(false); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
348 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
349 |
CollectionCertStoreParameters ccsp = |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
350 |
new CollectionCertStoreParameters(chainList); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
351 |
params.addCertStore(CertStore.getInstance("Collection", ccsp)); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
352 |
|
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
353 |
CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX"); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
354 |
CertPathBuilderResult res = cpb.build(params); |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
355 |
} |
e3c056161305
7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified
xuelei
parents:
diff
changeset
|
356 |
} |