Index: net/data/parse_ocsp_unittest/ocsp_extra_certs.pem |
diff --git a/net/data/parse_ocsp_unittest/ocsp_extra_certs.pem b/net/data/parse_ocsp_unittest/ocsp_extra_certs.pem |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cfdad7bb3eec5535ec94f04c7af5ab0e3d978b8b |
--- /dev/null |
+++ b/net/data/parse_ocsp_unittest/ocsp_extra_certs.pem |
@@ -0,0 +1,205 @@ |
+Includes extra certs |
+$ openssl asn1parse -i < [OCSP RESPONSE] |
+ 0:d=0 hl=4 l=1165 cons: SEQUENCE |
+ 4:d=1 hl=2 l= 1 prim: ENUMERATED :00 |
+ 7:d=1 hl=4 l=1158 cons: cont [ 0 ] |
+ 11:d=2 hl=4 l=1154 cons: SEQUENCE |
+ 15:d=3 hl=2 l= 9 prim: OBJECT :Basic OCSP Response |
+ 26:d=3 hl=4 l=1139 prim: OCTET STRING |
+ 0:d=0 hl=4 l=1135 cons: SEQUENCE |
+ 4:d=1 hl=2 l= 120 cons: SEQUENCE |
+ 6:d=2 hl=2 l= 20 cons: cont [ 1 ] |
+ 8:d=3 hl=2 l= 18 cons: SEQUENCE |
+ 10:d=4 hl=2 l= 16 cons: SET |
+ 12:d=5 hl=2 l= 14 cons: SEQUENCE |
+ 14:d=6 hl=2 l= 3 prim: OBJECT :commonName |
+ 19:d=6 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 28:d=2 hl=2 l= 15 prim: GENERALIZEDTIME :20160304164002Z |
+ 45:d=2 hl=2 l= 79 cons: SEQUENCE |
+ 47:d=3 hl=2 l= 77 cons: SEQUENCE |
+ 49:d=4 hl=2 l= 56 cons: SEQUENCE |
+ 51:d=5 hl=2 l= 7 cons: SEQUENCE |
+ 53:d=6 hl=2 l= 5 prim: OBJECT :sha1 |
+ 60:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:02FF75DA24DE8ADD150FAB689DCCE6E6636D0901 |
+ 82:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:7735ACB4DFE7B9DC8259381B7EEDF0882B973534 |
+ 104:d=5 hl=2 l= 1 prim: INTEGER :03 |
+ 107:d=4 hl=2 l= 0 prim: cont [ 0 ] |
+ 109:d=4 hl=2 l= 15 prim: GENERALIZEDTIME :20160304164002Z |
+ 126:d=1 hl=2 l= 13 cons: SEQUENCE |
+ 128:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 139:d=2 hl=2 l= 0 prim: NULL |
+ 141:d=1 hl=3 l= 129 prim: BIT STRING |
+ 273:d=1 hl=4 l= 862 cons: cont [ 0 ] |
+ 277:d=2 hl=4 l= 858 cons: SEQUENCE |
+ 281:d=3 hl=4 l= 408 cons: SEQUENCE |
+ 285:d=4 hl=4 l= 257 cons: SEQUENCE |
+ 289:d=5 hl=2 l= 3 cons: cont [ 0 ] |
+ 291:d=6 hl=2 l= 1 prim: INTEGER :02 |
+ 294:d=5 hl=2 l= 1 prim: INTEGER :00 |
+ 297:d=5 hl=2 l= 13 cons: SEQUENCE |
+ 299:d=6 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 310:d=6 hl=2 l= 0 prim: NULL |
+ 312:d=5 hl=2 l= 18 cons: SEQUENCE |
+ 314:d=6 hl=2 l= 16 cons: SET |
+ 316:d=7 hl=2 l= 14 cons: SEQUENCE |
+ 318:d=8 hl=2 l= 3 prim: OBJECT :commonName |
+ 323:d=8 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 332:d=5 hl=2 l= 30 cons: SEQUENCE |
+ 334:d=6 hl=2 l= 13 prim: UTCTIME :160304214002Z |
+ 349:d=6 hl=2 l= 13 prim: UTCTIME :260302214002Z |
+ 364:d=5 hl=2 l= 18 cons: SEQUENCE |
+ 366:d=6 hl=2 l= 16 cons: SET |
+ 368:d=7 hl=2 l= 14 cons: SEQUENCE |
+ 370:d=8 hl=2 l= 3 prim: OBJECT :commonName |
+ 375:d=8 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 384:d=5 hl=3 l= 159 cons: SEQUENCE |
+ 387:d=6 hl=2 l= 13 cons: SEQUENCE |
+ 389:d=7 hl=2 l= 9 prim: OBJECT :rsaEncryption |
+ 400:d=7 hl=2 l= 0 prim: NULL |
+ 402:d=6 hl=3 l= 141 prim: BIT STRING |
+ 546:d=4 hl=2 l= 13 cons: SEQUENCE |
+ 548:d=5 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 559:d=5 hl=2 l= 0 prim: NULL |
+ 561:d=4 hl=3 l= 129 prim: BIT STRING |
+ 693:d=3 hl=4 l= 442 cons: SEQUENCE |
+ 697:d=4 hl=4 l= 291 cons: SEQUENCE |
+ 701:d=5 hl=2 l= 3 cons: cont [ 0 ] |
+ 703:d=6 hl=2 l= 1 prim: INTEGER :02 |
+ 706:d=5 hl=2 l= 1 prim: INTEGER :01 |
+ 709:d=5 hl=2 l= 13 cons: SEQUENCE |
+ 711:d=6 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 722:d=6 hl=2 l= 0 prim: NULL |
+ 724:d=5 hl=2 l= 18 cons: SEQUENCE |
+ 726:d=6 hl=2 l= 16 cons: SET |
+ 728:d=7 hl=2 l= 14 cons: SEQUENCE |
+ 730:d=8 hl=2 l= 3 prim: OBJECT :commonName |
+ 735:d=8 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 744:d=5 hl=2 l= 30 cons: SEQUENCE |
+ 746:d=6 hl=2 l= 13 prim: UTCTIME :160304214002Z |
+ 761:d=6 hl=2 l= 13 prim: UTCTIME :260302214002Z |
+ 776:d=5 hl=2 l= 27 cons: SEQUENCE |
+ 778:d=6 hl=2 l= 25 cons: SET |
+ 780:d=7 hl=2 l= 23 cons: SEQUENCE |
+ 782:d=8 hl=2 l= 3 prim: OBJECT :commonName |
+ 787:d=8 hl=2 l= 16 prim: PRINTABLESTRING :Test OCSP Signer |
+ 805:d=5 hl=3 l= 159 cons: SEQUENCE |
+ 808:d=6 hl=2 l= 13 cons: SEQUENCE |
+ 810:d=7 hl=2 l= 9 prim: OBJECT :rsaEncryption |
+ 821:d=7 hl=2 l= 0 prim: NULL |
+ 823:d=6 hl=3 l= 141 prim: BIT STRING |
+ 967:d=5 hl=2 l= 23 cons: cont [ 3 ] |
+ 969:d=6 hl=2 l= 21 cons: SEQUENCE |
+ 971:d=7 hl=2 l= 19 cons: SEQUENCE |
+ 973:d=8 hl=2 l= 3 prim: OBJECT :X509v3 Extended Key Usage |
+ 978:d=8 hl=2 l= 12 prim: OCTET STRING [HEX DUMP]:300A06082B06010505070309 |
+ 992:d=4 hl=2 l= 13 cons: SEQUENCE |
+ 994:d=5 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 1005:d=5 hl=2 l= 0 prim: NULL |
+ 1007:d=4 hl=3 l= 129 prim: BIT STRING |
+-----BEGIN OCSP RESPONSE----- |
+MIIEjQoBAKCCBIYwggSCBgkrBgEFBQcwAQEEggRzMIIEbzB4oRQwEjEQMA4GA1UEAxMHVGVzdCB |
+DQRgPMjAxNjAzMDQxNjQwMDJaME8wTTA4MAcGBSsOAwIaBBQC/3XaJN6K3RUPq2idzObmY20JAQ |
+QUdzWstN/nudyCWTgbfu3wiCuXNTQCAQOAABgPMjAxNjAzMDQxNjQwMDJaMA0GCSqGSIb3DQEBB |
+QUAA4GBAEaH8xtlTUtrtKBa/dKPjWhP5dl+FQMVmCpKVGYVkh+mq/mltWcFgqmVr2uMuCngTIXg |
+xXd9xzvdjl3Y8PqbFXd2267ZQ5JWLkyU1FFxOYRQsjNZD45AnPmXUeHTJ+KqvmIoduFMc2O42RK |
+/bUfjrcMZcpbblnbPReAfYUsUaiCEoIIDXjCCA1owggGYMIIBAaADAgECAgEAMA0GCSqGSIb3DQ |
+EBBQUAMBIxEDAOBgNVBAMTB1Rlc3QgQ0EwHhcNMTYwMzA0MjE0MDAyWhcNMjYwMzAyMjE0MDAyW |
+jASMRAwDgYDVQQDEwdUZXN0IENBMIGfMA0GCSqGSIb3DQ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i < [CA CERTIFICATE] |
+ 0:d=0 hl=4 l= 408 cons: SEQUENCE |
+ 4:d=1 hl=4 l= 257 cons: SEQUENCE |
+ 8:d=2 hl=2 l= 3 cons: cont [ 0 ] |
+ 10:d=3 hl=2 l= 1 prim: INTEGER :02 |
+ 13:d=2 hl=2 l= 1 prim: INTEGER :00 |
+ 16:d=2 hl=2 l= 13 cons: SEQUENCE |
+ 18:d=3 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 29:d=3 hl=2 l= 0 prim: NULL |
+ 31:d=2 hl=2 l= 18 cons: SEQUENCE |
+ 33:d=3 hl=2 l= 16 cons: SET |
+ 35:d=4 hl=2 l= 14 cons: SEQUENCE |
+ 37:d=5 hl=2 l= 3 prim: OBJECT :commonName |
+ 42:d=5 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 51:d=2 hl=2 l= 30 cons: SEQUENCE |
+ 53:d=3 hl=2 l= 13 prim: UTCTIME :160304214002Z |
+ 68:d=3 hl=2 l= 13 prim: UTCTIME :260302214002Z |
+ 83:d=2 hl=2 l= 18 cons: SEQUENCE |
+ 85:d=3 hl=2 l= 16 cons: SET |
+ 87:d=4 hl=2 l= 14 cons: SEQUENCE |
+ 89:d=5 hl=2 l= 3 prim: OBJECT :commonName |
+ 94:d=5 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 103:d=2 hl=3 l= 159 cons: SEQUENCE |
+ 106:d=3 hl=2 l= 13 cons: SEQUENCE |
+ 108:d=4 hl=2 l= 9 prim: OBJECT :rsaEncryption |
+ 119:d=4 hl=2 l= 0 prim: NULL |
+ 121:d=3 hl=3 l= 141 prim: BIT STRING |
+ 265:d=1 hl=2 l= 13 cons: SEQUENCE |
+ 267:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 278:d=2 hl=2 l= 0 prim: NULL |
+ 280:d=1 hl=3 l= 129 prim: BIT STRING |
+-----BEGIN CA CERTIFICATE----- |
+MIIBmDCCAQGgAwIBAgIBADANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwdUZXN0IENBMB4XDTE |
+2MDMwNDIxNDAwMloXDTI2MDMwMjIxNDAwMlowEjEQMA4GA1UEAxMHVGVzdCBDQTCBnzANBgkqhk |
+iG9w0BAQEFAAOBjQAwgYkCgYEAxN8IR7ey6jTVUyS6kkCqt2x9/mxnRz77Py6Kwdm3P9jqIwqrC |
+RuqAXfC5QcyeyUaXKCc49bmL7cy64UowTrnIjyqiYOX0VO6t3ZdKcy2/8U2uwdL5oZPlBkpI6mU |
+7vl+3rKbKkNPNPLv8apwFF1zIHUm1tund152PlMAWQu6rmUCAwEAATANBgkqhkiG9w0BAQUFAAO |
+BgQCYaWdjhx0ARGhs1Dj1N6RXIf0U669nJcx0XkuC/yL5Ji16cjI1s76arVjGK7OPZ011x4/gNM |
+RLj31wyxKsfg3qQdlYkVl89CwtA+KxghQoRhD8cSWY1aOQcm4hM11HE5t5VyNbheSOBVwoOb8wO |
+cgZFERfCNWbcx2a3WYVJCGoUw== |
+-----END CA CERTIFICATE----- |
+ |
+$ openssl asn1parse -i < [CERTIFICATE] |
+ 0:d=0 hl=4 l= 410 cons: SEQUENCE |
+ 4:d=1 hl=4 l= 259 cons: SEQUENCE |
+ 8:d=2 hl=2 l= 3 cons: cont [ 0 ] |
+ 10:d=3 hl=2 l= 1 prim: INTEGER :02 |
+ 13:d=2 hl=2 l= 1 prim: INTEGER :03 |
+ 16:d=2 hl=2 l= 13 cons: SEQUENCE |
+ 18:d=3 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 29:d=3 hl=2 l= 0 prim: NULL |
+ 31:d=2 hl=2 l= 18 cons: SEQUENCE |
+ 33:d=3 hl=2 l= 16 cons: SET |
+ 35:d=4 hl=2 l= 14 cons: SEQUENCE |
+ 37:d=5 hl=2 l= 3 prim: OBJECT :commonName |
+ 42:d=5 hl=2 l= 7 prim: PRINTABLESTRING :Test CA |
+ 51:d=2 hl=2 l= 30 cons: SEQUENCE |
+ 53:d=3 hl=2 l= 13 prim: UTCTIME :160304214002Z |
+ 68:d=3 hl=2 l= 13 prim: UTCTIME :260302214002Z |
+ 83:d=2 hl=2 l= 20 cons: SEQUENCE |
+ 85:d=3 hl=2 l= 18 cons: SET |
+ 87:d=4 hl=2 l= 16 cons: SEQUENCE |
+ 89:d=5 hl=2 l= 3 prim: OBJECT :commonName |
+ 94:d=5 hl=2 l= 9 prim: PRINTABLESTRING :Test Cert |
+ 105:d=2 hl=3 l= 159 cons: SEQUENCE |
+ 108:d=3 hl=2 l= 13 cons: SEQUENCE |
+ 110:d=4 hl=2 l= 9 prim: OBJECT :rsaEncryption |
+ 121:d=4 hl=2 l= 0 prim: NULL |
+ 123:d=3 hl=3 l= 141 prim: BIT STRING |
+ 267:d=1 hl=2 l= 13 cons: SEQUENCE |
+ 269:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption |
+ 280:d=2 hl=2 l= 0 prim: NULL |
+ 282:d=1 hl=3 l= 129 prim: BIT STRING |
+-----BEGIN CERTIFICATE----- |
+MIIBmjCCAQOgAwIBAgIBAzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwdUZXN0IENBMB4XDTE |
+2MDMwNDIxNDAwMloXDTI2MDMwMjIxNDAwMlowFDESMBAGA1UEAxMJVGVzdCBDZXJ0MIGfMA0GCS |
+qGSIb3DQEBAQUAA4GNADCBiQKBgQCynU7qbknY0uuN2uYvVj9/UeLaZ+GTuIICagyaSvwhDdEFI |
+ieSELYv5c3TlrIzAzuMlx78eOuhyxyL5SqDe1+YrD4tsHTMoWhSsmjRmKHpxfVScPwgBvnZ3i5d |
+jS/iLKlvoTnH8qPE2QC+B2GgoU8HFEaVg5jI1NACo5gh75ZAawIDAQABMA0GCSqGSIb3DQEBBQU |
+AA4GBAHSL52wcNMvGbcbSI3fZd9ckcx2Kgor0/FZOcjWFaI877E9ok7TGk1uwy5QsTcRZdEuCsl |
+3Ph9kpZYkiB6JIGrEzvmE5Nmv8VmYtEAX4F1JX6WPETlRR95fA4D4WmHNb2bxBy8bP9wLpced2V |
+42JEeS36VZs/yhLupvaLx9PcRwM |
+-----END CERTIFICATE----- |