test/jdk/security/infra/java/security/cert/CertPathValidator/certification/DTrustCA.java
author lancea
Thu, 14 Nov 2019 10:54:32 -0500
changeset 59083 3e4d8b5856f3
parent 48256 472f74fb6c6b
permissions -rw-r--r--
8234080: jdk/nio/zipfs/CRCWriteTest.java fails Reviewed-by: clanger, amlu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48256
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     1
/*
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     2
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     4
 *
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     7
 * published by the Free Software Foundation.
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     8
 *
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    13
 * accompanied this code).
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    14
 *
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    18
 *
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    21
 * questions.
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    22
 */
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    23
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    24
 /*
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    25
 * @test
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    26
 * @bug 8189131
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    27
 * @summary Interoperability tests with "D-Trust Root Class 3 CA 2 2009" and
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    28
 *          "D-Trust Root Class 3 CA 2 EV 2009" CAs
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    29
 * @build ValidatePathWithParams
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    30
 * @run main/othervm -Djava.security.debug=certpath DTrustCA OCSP
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    31
 * @run main/othervm -Djava.security.debug=certpath DTrustCA CRL
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    32
 */
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    33
public class DTrustCA {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    34
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    35
    public static void main(String[] args) throws Exception {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    36
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    37
        ValidatePathWithParams pathValidator = new ValidatePathWithParams(null);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    38
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    39
        boolean ocspEnabled = true;
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    40
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    41
        if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    42
            pathValidator.enableCRLCheck();
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    43
            ocspEnabled = false;
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    44
        } else {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    45
            // OCSP check by default
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    46
            pathValidator.enableOCSPCheck();
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    47
        }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    48
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    49
        new RootClass3CA2().runTest(pathValidator, ocspEnabled);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    50
        new RootClass3CA2EV().runTest(pathValidator, ocspEnabled);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    51
    }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    52
}
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    53
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    54
class RootClass3CA2 {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    55
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    56
    // Owner: CN=D-TRUST SSL Class 3 CA 1 2009, O=D-Trust GmbH, C=DE
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    57
    private static final String INT = "-----BEGIN CERTIFICATE-----\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    58
            + "MIIFMjCCBBqgAwIBAgIDCZBjMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    59
            + "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    60
            + "bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMTIxMjQ2NTVaFw0yOTExMDUwODM1NTha\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    61
            + "MEwxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJjAkBgNVBAMM\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    62
            + "HUQtVFJVU1QgU1NMIENsYXNzIDMgQ0EgMSAyMDA5MIIBIjANBgkqhkiG9w0BAQEF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    63
            + "AAOCAQ8AMIIBCgKCAQEAoal0SyLSijE0JkuhHJmOCbmQznyxuSY7DaEwhUsdUpI+\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    64
            + "2llkDLz6s9BWQe1zCVXDhrt3qz5U5H4h6jxm5Ec+ZbFiU3Gv2yxpI5cRPrqj9mJU\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    65
            + "1CGgy1+29khuUnoopzSq66HPuGZGh06I7bJkXTQ7AQ92z1MdL2wATj1UWdNid3sQ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    66
            + "NiWIm+69nURHY6tmCNenNcG6aV4qjHMUPsjpCRabNY9nUO12rsmiDW2mbAC3gcxQ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    67
            + "lqLgLYur9HvB8cW0xu2JZ/B3PXmNphVuWskp3Y1u0SvIYzuEsE7lWDbBmtWZtabB\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    68
            + "hzThkDQvd+3keQ1sU/beq1NeXfgKzQ5G+4Ql2PUY/wIDAQABo4ICGjCCAhYwHwYD\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    69
            + "VR0jBBgwFoAU/doUxJ8w3iG9HkI5/KtjI0ng8YQwRAYIKwYBBQUHAQEEODA2MDQG\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    70
            + "CCsGAQUFBzABhihodHRwOi8vcm9vdC1jMy1jYTItMjAwOS5vY3NwLmQtdHJ1c3Qu\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    71
            + "bmV0MF8GA1UdIARYMFYwVAYEVR0gADBMMEoGCCsGAQUFBwIBFj5odHRwOi8vd3d3\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    72
            + "LmQtdHJ1c3QubmV0L2ludGVybmV0L2ZpbGVzL0QtVFJVU1RfUm9vdF9QS0lfQ1BT\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    73
            + "LnBkZjAzBgNVHREELDAqgRBpbmZvQGQtdHJ1c3QubmV0hhZodHRwOi8vd3d3LmQt\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    74
            + "dHJ1c3QubmV0MIHTBgNVHR8EgcswgcgwgYCgfqB8hnpsZGFwOi8vZGlyZWN0b3J5\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    75
            + "LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    76
            + "MjAyJTIwMjAwOSxPPUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZv\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    77
            + "Y2F0aW9ubGlzdDBDoEGgP4Y9aHR0cDovL3d3dy5kLXRydXN0Lm5ldC9jcmwvZC10\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    78
            + "cnVzdF9yb290X2NsYXNzXzNfY2FfMl8yMDA5LmNybDAdBgNVHQ4EFgQUUBkylJrE\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    79
            + "tQRNVtDAgyHVNVWwsXowDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8C\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    80
            + "AQAwDQYJKoZIhvcNAQELBQADggEBABM5QRHX/yInsmZLWVlvmWmKb3c4IB3hAIVR\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    81
            + "sAGhkvQJ/RD1GZjZUBBYMWkD1P37fTQxlqTOe3NecVvElkYZuCq7HSM6o7awzb3m\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    82
            + "yLn1kN+hDCsxX0EYbVSNjEjkW3QEkqJH9owH4qeMDxf7tfXB7BVKO+rarYPa2PR8\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    83
            + "Wz2KhjFDmAeFg2J89YcpeJJEEJXoweAkgJEEwwEIfJ2yLjYo78RD0Rvij/+zkfj9\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    84
            + "+dSvTiZTuqicyo37qNoYHgchuqXnKodhWkW89oo2NKhfeNHHbqvXEJmx0PbI6YyQ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    85
            + "50GnYECZRHNKhgbPEtNy/QetU53aWlTlvu4NIwLW5XVsrxlQ2Zw=\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    86
            + "-----END CERTIFICATE-----";
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    87
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    88
    // Owner: CN=certdemo-ov-valid.ssl.d-trust.net, O=D-Trust GmbH, OU=IT,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    89
    // L=Berlin, ST=Berlin, C=DE, SERIALNUMBER=DTRWS354803406304201, DNQ=7223150018
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    90
    private static final String VALID = "-----BEGIN CERTIFICATE-----\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    91
            + "MIIF1jCCBL6gAwIBAgIDD07RMA0GCSqGSIb3DQEBCwUAMEwxCzAJBgNVBAYTAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    92
            + "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJjAkBgNVBAMMHUQtVFJVU1QgU1NMIENs\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    93
            + "YXNzIDMgQ0EgMSAyMDA5MB4XDTEyMTIxMTEwMTgzN1oXDTE1MTIyMTExMTgwOVow\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    94
            + "gbMxEzARBgNVBC4TCjcyMjMxNTAwMTgxHTAbBgNVBAUTFERUUldTMzU0ODAzNDA2\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    95
            + "MzA0MjAxMQswCQYDVQQGEwJERTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZC\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    96
            + "ZXJsaW4xCzAJBgNVBAsMAklUMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    97
            + "BAMMIWNlcnRkZW1vLW92LXZhbGlkLnNzbC5kLXRydXN0Lm5ldDCCASIwDQYJKoZI\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    98
            + "hvcNAQEBBQADggEPADCCAQoCggEBAMbo9ih0Bo4zKaKwl+mClCxhedC3YOpBzrun\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
    99
            + "zbqYJuy6vbHuZdMtU3nO7ziTPbnoVFboKmyEtAMwJ+qudHdWaa/nA4Hlhmg5+CWZ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   100
            + "OolX3VmMlrZ+LpaeajduOgDa7DQDcixZ+ndd24Xc/u9L83CH7ziQDs4XNJxx63Wf\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   101
            + "lSMKBKkmvry7CfCXcsR4dYW8tTBm1PESJZVNqOKkOiwHwMA69knpXwghmDbKgZro\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   102
            + "01chjeyYb39ZhwHNWlxh5rgd2HZpgrl8kUY3yV9PrQcjFPbKT6ZgHfRiHlax4vbX\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   103
            + "qiHHcHRr7iVPruyCf0DU3BqhDVUhnrJ+vqTyg+m/OJduznF2nXcCAwEAAaOCAlcw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   104
            + "ggJTMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRQ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   105
            + "GTKUmsS1BE1W0MCDIdU1VbCxejBDBggrBgEFBQcBAQQ3MDUwMwYIKwYBBQUHMAGG\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   106
            + "J2h0dHA6Ly9zc2wtYzMtY2ExLTIwMDkub2NzcC5kLXRydXN0Lm5ldDBmBgNVHSAE\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   107
            + "XzBdMFsGCysGAQQBpTQCgUgBMEwwSgYIKwYBBQUHAgEWPmh0dHA6Ly93d3cuZC10\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   108
            + "cnVzdC5uZXQvaW50ZXJuZXQvZmlsZXMvRC1UUlVTVF9Sb290X1BLSV9DUFMucGRm\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   109
            + "MIHRBgNVHR8EgckwgcYwgcOggcCggb2GeWxkYXA6Ly9kaXJlY3RvcnkuZC10cnVz\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   110
            + "dC5uZXQvQ049RC1UUlVTVCUyMFNTTCUyMENsYXNzJTIwMyUyMENBJTIwMSUyMDIw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   111
            + "MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxp\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   112
            + "c3SGQGh0dHA6Ly9jcmwuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfc3NsX2NsYXNz\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   113
            + "XzNfY2FfMV8yMDA5LmRlci5jcmwwMwYDVR0SBCwwKoEQaW5mb0BkLXRydXN0Lm5l\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   114
            + "dIYWaHR0cDovL3d3dy5kLXRydXN0Lm5ldDAdBgNVHQ4EFgQUHjGMR/EdDBRf+Ejf\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   115
            + "WW5a8beoBrwwDgYDVR0PAQH/BAQDAgSwMCwGA1UdEQQlMCOCIWNlcnRkZW1vLW92\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   116
            + "LXZhbGlkLnNzbC5kLXRydXN0Lm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAGN4yxyF3\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   117
            + "sszODgDSkCNX1s4R874jmBmMYy4Af9/kwKNp2GtqPPhnDu8VFtq0bqs1e06XZ4/W\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   118
            + "6pUPRZIlynjPASkQl+aJGzyZlaH+K0Al80M/7FRRmLCW9Do/RszRihdhcjeyG+Bi\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   119
            + "2k+A35aVqKMAWzoH4M7TCPg4+ECltaFgJ+25loXl3j0yiP/DmBwATO80Nx78ILl5\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   120
            + "D6cDyftMKUwdKKlUsB2RMOJsVBcotBMGTB1i/YoSKIu6t7QnoVFMHEia2wZegPCj\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   121
            + "hBKhLf/Zde/VrSN3IIft93XRabqXWqjpDCvpb/b06/0o5aZIycrj+Kya54dsdXMO\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   122
            + "FRy9N0HZYzvt9g==\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   123
            + "-----END CERTIFICATE-----";
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   124
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   125
    // Owner: CN=certdemo-ov-revoked.ssl.d-trust.net, O=D-Trust GmbH, OU=IT,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   126
    // L=Berlin, ST=Berlin, C=DE, DNQ=5562882417
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   127
    private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   128
            + "MIIFuzCCBKOgAwIBAgIDExFnMA0GCSqGSIb3DQEBCwUAMEwxCzAJBgNVBAYTAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   129
            + "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJjAkBgNVBAMMHUQtVFJVU1QgU1NMIENs\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   130
            + "YXNzIDMgQ0EgMSAyMDA5MB4XDTE0MDYyNjE2MTg1NloXDTE1MDYyOTE2MTg1Nlow\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   131
            + "gZYxEzARBgNVBC4TCjU1NjI4ODI0MTcxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIEwZC\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   132
            + "ZXJsaW4xDzANBgNVBAcTBkJlcmxpbjELMAkGA1UECxMCSVQxFTATBgNVBAoTDEQt\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   133
            + "VHJ1c3QgR21iSDEsMCoGA1UEAxMjY2VydGRlbW8tb3YtcmV2b2tlZC5zc2wuZC10\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   134
            + "cnVzdC5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtdH2wqHgG\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   135
            + "tqlekrfRQzJuhMzRllfYcmmsxr7jsnwgPe0+zib+GeTDm9U5+XKjT1uYETL501ov\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   136
            + "HfKsZ/aK+k58iFF5evEtdHic/2v868uwxcm/Kcn+zt2uX9QvfSUzJPQkW/Ynu3w2\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   137
            + "IhuBNBlFAJgxjYr2xMUmDrVDx1/ZfBc0ddyo87MccLZOdmqLhef8bJQ+3q6DA+Z1\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   138
            + "bGk1wHl9KgFNtOjlKws5nKzCzyugy+MhLo+4wPxi0UhUA7QA7fk7lWBwJ9fZRTT/\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   139
            + "cKfP4lUucXdQBS2ZhvpEZggjjBDhTHtZLwdfEUlf1GZ+GwD8IB9whlwqT2cS9WUR\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   140
            + "XI9b14TJM2zfAgMBAAGjggJZMIICVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   141
            + "BQUHAwIwHwYDVR0jBBgwFoAUUBkylJrEtQRNVtDAgyHVNVWwsXowQwYIKwYBBQUH\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   142
            + "AQEENzA1MDMGCCsGAQUFBzABhidodHRwOi8vc3NsLWMzLWNhMS0yMDA5Lm9jc3Au\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   143
            + "ZC10cnVzdC5uZXQwZgYDVR0gBF8wXTBbBgsrBgEEAaU0AoFIATBMMEoGCCsGAQUF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   144
            + "BwIBFj5odHRwOi8vd3d3LmQtdHJ1c3QubmV0L2ludGVybmV0L2ZpbGVzL0QtVFJV\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   145
            + "U1RfUm9vdF9QS0lfQ1BTLnBkZjCB0QYDVR0fBIHJMIHGMIHDoIHAoIG9hnlsZGFw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   146
            + "Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBTU0wlMjBDbGFz\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   147
            + "cyUyMDMlMjBDQSUyMDElMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   148
            + "aWZpY2F0ZXJldm9jYXRpb25saXN0hkBodHRwOi8vY3JsLmQtdHJ1c3QubmV0L2Ny\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   149
            + "bC9kLXRydXN0X3NzbF9jbGFzc18zX2NhXzFfMjAwOS5kZXIuY3JsMDMGA1UdEgQs\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   150
            + "MCqBEGluZm9AZC10cnVzdC5uZXSGFmh0dHA6Ly93d3cuZC10cnVzdC5uZXQwHQYD\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   151
            + "VR0OBBYEFC4+5qwI2S+t/TaZ/kMADTR7FjdOMA4GA1UdDwEB/wQEAwIEsDAuBgNV\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   152
            + "HREEJzAlgiNjZXJ0ZGVtby1vdi1yZXZva2VkLnNzbC5kLXRydXN0Lm5ldDANBgkq\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   153
            + "hkiG9w0BAQsFAAOCAQEAO3sbXee7GbEyXSRZOgwk2LloPNIFriFGP8WAWnsaf056\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   154
            + "jxHRnjjPQRyqhBmGQAGwrEp3a3uF+6gbM2XuoKPjNFqjqnQNR2+lVRs8pVTTjJ+r\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   155
            + "SekcOUbCx6nIe98OBheAljAxfeal3e8bBrP3VA+QvOscaLJiC1ZsGfqvrGYJDt6b\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   156
            + "UFMKbNuwDcfpKkrB0AyW0NvYALwgTPr+SgbxB0Xrp0W+dg6XfHmpuRSSPUkZqzEY\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   157
            + "uPTmIgs7qCtVEIpV91gDFBDNfr4QbFVCNvDmMIZNMnXUEmTW81N1KUVTNdz8k5TY\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   158
            + "HO/7TeeAi2u0m3ERrLXE9SKtNwUMJujEOQ/UmQkIQw==\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   159
            + "-----END CERTIFICATE-----";
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   160
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   161
    public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled)
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   162
            throws Exception {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   163
        // Validate valid
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   164
        pathValidator.validate(new String[]{VALID, INT},
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   165
                ValidatePathWithParams.Status.GOOD, null, System.out);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   166
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   167
        // Validate Revoked
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   168
        if (ocspEnabled) {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   169
            // Test certificates are expired in 2015
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   170
            // and backdated revocation check is only possible with OCSP
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   171
            pathValidator.setValidationDate("Jan 01, 2015");
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   172
        }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   173
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   174
        pathValidator.validate(new String[]{REVOKED, INT},
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   175
                ValidatePathWithParams.Status.REVOKED,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   176
                "Thu Jun 26 09:28:39 PDT 2014", System.out);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   177
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   178
        // reset validation date back to current date
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   179
        pathValidator.resetValidationDate();
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   180
    }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   181
}
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   182
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   183
class RootClass3CA2EV {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   184
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   185
    // Owner: CN=D-TRUST SSL Class 3 CA 1 EV 2009, O=D-Trust GmbH, C=DE
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   186
    private static final String INT = "-----BEGIN CERTIFICATE-----\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   187
            + "MIIFRTCCBC2gAwIBAgIDCZBkMA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   188
            + "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   189
            + "bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMTIxMjUyNDNaFw0yOTExMDUwODUw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   190
            + "NDZaME8xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKTAnBgNV\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   191
            + "BAMMIEQtVFJVU1QgU1NMIENsYXNzIDMgQ0EgMSBFViAyMDA5MIIBIjANBgkqhkiG\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   192
            + "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAygp+ZziakFyPq80fk1QIT9UCcPy0R3UIyq56\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   193
            + "hXA6lhgfs1l9R9wRM9/DIVX2olb0gHCXdpnHRm+jwzeL3dHJO8Im5Om/c24ZfSVE\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   194
            + "zBcgKxS5X7X5e7oCYb9tozd9xs04WqYd5kWrvCJsSQf5gtv5gAeJt+QiU7dtXs3A\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   195
            + "YDflWv4g9eEaDExxM0VQmceEAo5qc7I7dk5ry356G14zQmr29cxie6YS0kH+7qn5\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   196
            + "g+c21M01sENle0tBPxIfkv+nV95Ih3JkpHSPm/wgFKfCtwRtG+5VehUoMEpgfi0X\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   197
            + "fmVkag558aQpaaeQCtYZnXuq6g1D1LAcjIqMpOP4wNRp1ldLzQIDAQABo4ICJzCC\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   198
            + "AiMwHwYDVR0jBBgwFoAU05SKTGITKhkuzK9yin0215oc3GcwRwYIKwYBBQUHAQEE\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   199
            + "OzA5MDcGCCsGAQUFBzABhitodHRwOi8vcm9vdC1jMy1jYTItZXYtMjAwOS5vY3Nw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   200
            + "LmQtdHJ1c3QubmV0MF8GA1UdIARYMFYwVAYEVR0gADBMMEoGCCsGAQUFBwIBFj5o\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   201
            + "dHRwOi8vd3d3LmQtdHJ1c3QubmV0L2ludGVybmV0L2ZpbGVzL0QtVFJVU1RfUm9v\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   202
            + "dF9QS0lfQ1BTLnBkZjAzBgNVHREELDAqgRBpbmZvQGQtdHJ1c3QubmV0hhZodHRw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   203
            + "Oi8vd3d3LmQtdHJ1c3QubmV0MIHdBgNVHR8EgdUwgdIwgYeggYSggYGGf2xkYXA6\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   204
            + "Ly9kaXJlY3RvcnkuZC10cnVzdC5uZXQvQ049RC1UUlVTVCUyMFJvb3QlMjBDbGFz\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   205
            + "cyUyMDMlMjBDQSUyMDIlMjBFViUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   206
            + "P2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwRqBEoEKGQGh0dHA6Ly93d3cuZC10\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   207
            + "cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfZXZfMjAwOS5j\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   208
            + "cmwwHQYDVR0OBBYEFKztpZ16orZD8RiKJWpsscyo8lrUMA4GA1UdDwEB/wQEAwIB\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   209
            + "BjASBgNVHRMBAf8ECDAGAQH/AgEAMA0GCSqGSIb3DQEBCwUAA4IBAQA6I3sGyvb4\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   210
            + "MdTyEZFBBWBN/5Kx1SVkkPsll8DvgosJiuuK4I7mD6FFKDjKgogr407EoDSS2t1+\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   211
            + "pSmQCb0rNXoJT3YIlpZGqPYU2rcwrelabJQZWAfoRnbkDx2aqofhp5u45dyQpM2t\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   212
            + "R93/oA36iuHYc9Ewq8CaLGolrpT138RD7i4nN7sZFuFH0IseNz0+EZm88NHi9WeJ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   213
            + "UyshWFKBKARi+589Y4P/G2XnbckxFKUxa7uEroZcMwvKBy469K0Au0zVTxs1zNtf\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   214
            + "Ol3QkNgPwzOPeHhOnpzcenyPgNEm+HQ0FPTnB4HeKBqTeLpkM7h4gq5MZ2TPmfuX\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   215
            + "KDz3AHrWLLdH\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   216
            + "-----END CERTIFICATE-----";
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   217
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   218
    // Owner: CN=certdemo-ev-revoked.ssl.d-trust.net, O=D-Trust GmbH, OU=IT,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   219
    // STREET=Berlin, OID.2.5.4.17=10969, L=Berlin, ST=Berlin, C=DE,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   220
    // SERIALNUMBER=HRB74346, OID.2.5.4.15=Private Organization,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   221
    // OID.1.3.6.1.4.1.311.60.2.1.1=Berlin, OID.1.3.6.1.4.1.311.60.2.1.2=Berlin,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   222
    // OID.1.3.6.1.4.1.311.60.2.1.3=DE, DNQ=4028175542
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   223
    private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   224
            + "MIIGZDCCBUygAwIBAgIDExFtMA0GCSqGSIb3DQEBCwUAME8xCzAJBgNVBAYTAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   225
            + "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKTAnBgNVBAMMIEQtVFJVU1QgU1NMIENs\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   226
            + "YXNzIDMgQ0EgMSBFViAyMDA5MB4XDTE0MDYyNjE2NDMyOFoXDTE1MDYyOTE2NDMy\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   227
            + "OFowggEwMRMwEQYDVQQuEwo0MDI4MTc1NTQyMRMwEQYLKwYBBAGCNzwCAQMMAkRF\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   228
            + "MRcwFQYLKwYBBAGCNzwCAQIMBkJlcmxpbjEXMBUGCysGAQQBgjc8AgEBDAZCZXJs\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   229
            + "aW4xHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMREwDwYDVQQFEwhIUkI3\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   230
            + "NDM0NjELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJlcmxpbjEPMA0GA1UEBxMGQmVy\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   231
            + "bGluMQ4wDAYDVQQRDAUxMDk2OTEPMA0GA1UECRMGQmVybGluMQswCQYDVQQLEwJJ\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   232
            + "VDEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSwwKgYDVQQDEyNjZXJ0ZGVtby1ldi1y\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   233
            + "ZXZva2VkLnNzbC5kLXRydXN0Lm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   234
            + "AQoCggEBAMjX4zZxaSl+7eLXXVyO1HzQTymgsI4WlMpVMczyA21kXnx4iBZ9JeHW\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   235
            + "W3Jv4SxxqtHut98eCq30r7yniCy7zGX35iuSy2zMf0u0tRraP5b2c590UMRgKOSU\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   236
            + "DvahC+SlyJWGimt2Dtej2T1kcQvhUmonUkIimQOpM0MOIFxB5d494TzkQAYOV6yb\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   237
            + "AHoIsMWMeMm24Rr6o8QnJqhb9A13keYRK8t0u7F5+fvONlFT2YnjbCoRlxa48i1b\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   238
            + "PZwtE/NZ4bpZmv765tyfl9R5FatANnuja04Dd9StbTbjDezYzilF4qpSWtSKwmEl\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   239
            + "J6fRxJ1kNAEThyzNZMnFjh8htZ7PL18CAwEAAaOCAmQwggJgMB0GA1UdJQQWMBQG\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   240
            + "CCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSs7aWdeqK2Q/EYiiVqbLHM\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   241
            + "qPJa1DBGBggrBgEFBQcBAQQ6MDgwNgYIKwYBBQUHMAGGKmh0dHA6Ly9zc2wtYzMt\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   242
            + "Y2ExLWV2LTIwMDkub2NzcC5kLXRydXN0Lm5ldDBmBgNVHSAEXzBdMFsGCysGAQQB\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   243
            + "pTQCgUoBMEwwSgYIKwYBBQUHAgEWPmh0dHA6Ly93d3cuZC10cnVzdC5uZXQvaW50\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   244
            + "ZXJuZXQvZmlsZXMvRC1UUlVTVF9Sb290X1BLSV9DUFMucGRmMIHZBgNVHR8EgdEw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   245
            + "gc4wgcuggciggcWGfmxkYXA6Ly9kaXJlY3RvcnkuZC10cnVzdC5uZXQvQ049RC1U\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   246
            + "UlVTVCUyMFNTTCUyMENsYXNzJTIwMyUyMENBJTIwMSUyMEVWJTIwMjAwOSxPPUQt\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   247
            + "VHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdIZDaHR0\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   248
            + "cDovL2NybC5kLXRydXN0Lm5ldC9jcmwvZC10cnVzdF9zc2xfY2xhc3NfM19jYV8x\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   249
            + "X2V2XzIwMDkuZGVyLmNybDAzBgNVHRIELDAqgRBpbmZvQGQtdHJ1c3QubmV0hhZo\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   250
            + "dHRwOi8vd3d3LmQtdHJ1c3QubmV0MB0GA1UdDgQWBBTFei056yoNM1HWYbBCixQw\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   251
            + "wXnf0TAOBgNVHQ8BAf8EBAMCBLAwLgYDVR0RBCcwJYIjY2VydGRlbW8tZXYtcmV2\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   252
            + "b2tlZC5zc2wuZC10cnVzdC5uZXQwDQYJKoZIhvcNAQELBQADggEBALv0OA+x401T\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   253
            + "CvGQL1Ah7rclRgtxT3UjmphiLs9EE1YbweIUrN3R4tZuryyv9xslAoLCfMrHUe+f\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   254
            + "jv1hsKqw+gGlrA8d5VnAqKfUR+KCiZivdlQ2sl4PDTZWpUQYlBnjQrD8h6UrcgTA\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   255
            + "g1zUpDnioAKAQSWWxHVpcOX0IXCl3RgRz0GqUIZQ0Q8ZwYbIDEI+JzDEJgKkTzet\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   256
            + "uzin8P54PjuJO801gENp43z++xHVuBcEWkU0TMDbmdL9vPZqnxsaoL5e/llGzor5\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   257
            + "6JbU6Fc0MkuziaLPUsIxVVx3ZhZ6UFdv34swKyq6ycvKW2fgccwsQCFMrVjIo6HR\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   258
            + "qiZC9Z+23vM=\n"
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   259
            + "-----END CERTIFICATE-----";
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   260
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   261
    public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled)
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   262
            throws Exception {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   263
        // Validate valid
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   264
        // Valid cert received as test artifact was revoked so remove test
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   265
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   266
        // Validate Revoked
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   267
        if (ocspEnabled) {
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   268
            // Revoked certificates are expired in 2015
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   269
            // and backdated revocation check is only possible with OCSP
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   270
            pathValidator.setValidationDate("Jan 01, 2015");
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   271
        }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   272
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   273
        pathValidator.validate(new String[]{REVOKED, INT},
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   274
                ValidatePathWithParams.Status.REVOKED,
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   275
                "Thu Jun 26 09:45:14 PDT 2014", System.out);
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   276
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   277
        // reset validation date back to current date
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   278
        pathValidator.resetValidationDate();
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   279
    }
472f74fb6c6b 8189131: Open-source the Oracle JDK Root Certificates
rhalade
parents:
diff changeset
   280
}