| Index: net/test/ct_test_util.cc
|
| diff --git a/net/test/ct_test_util.cc b/net/test/ct_test_util.cc
|
| index 1101eb77ebe3a4c3e9af2fcec25719f9fd272758..0e51bd2106c669e8c7a7a29f7160c798907ae85f 100644
|
| --- a/net/test/ct_test_util.cc
|
| +++ b/net/test/ct_test_util.cc
|
| @@ -101,6 +101,43 @@ const char kTestSCTPrecertSignatureData[] =
|
| "30450220482f6751af35dba65436be1fd6640f3dbf9a41429495924530288fa3e5e23e0602"
|
| "2100e4edc0db3ac572b1e2f5e8ab6a680653987dcf41027dfeffa105519d89edbf08";
|
|
|
| +// A well-formed OCSP response with fake SCT contents. Does not come from
|
| +// http://code.google.com/p/certificate-transparency, does not pertain to any
|
| +// of the test certs here, and is only used to test extracting the extension
|
| +// contents from the response.
|
| +const char kFakeOCSPResponse[] =
|
| + "308201710a0100a082016a3082016606092b060105050730010104820157308201533081bd"
|
| + "a21604144edfdf5ff9c90ffacfca66e7fbc436bc39ee3fc7180f3230313030313031303630"
|
| + "3030305a30819130818e3049300906052b0e03021a050004141833a1e6a4f09577cca0e64c"
|
| + "e7d145ca4b93700904144edfdf5ff9c90ffacfca66e7fbc436bc39ee3fc70210339c60c849"
|
| + "8a60b67812cad22988e8568000180f32303130303130313036303030305aa011180f323033"
|
| + "30303130313036303030305aa11b30193017060a2b06010401d67902040501010004060404"
|
| + "74657374300d06092a864886f70d01010505000381810013069b03ed74d1cb078cbfbf5e9b"
|
| + "c041867f1e4f8ae03eb49af183359303020a95858927a312fb8e909a0f4c4233cf2efc4427"
|
| + "c84c6eb50176f35124cffa5f148686f6ebda01f80d4c60b56709f7eab9e9a4e2b4432316fd"
|
| + "11de240fa3b741a28b432e186040d5af75583eb764b6ab353c09af07ee9fb5f51fdcea725d"
|
| + "1d665c";
|
| +
|
| +const char kFakeOCSPResponseCert[] =
|
| + "3082022930820192a0030201020210339c60c8498a60b67812cad22988e856300d06092a86"
|
| + "4886f70d01010505003015311330110603550403130a54657374696e67204341301e170d31"
|
| + "30303130313036303030305a170d3332313230313036303030305a30373112301006035504"
|
| + "0313093132372e302e302e31310b300906035504061302585831143012060355040a130b54"
|
| + "657374696e67204f726730819d300d06092a864886f70d010101050003818b003081870281"
|
| + "8100a71998f2930bfe73d031a87f133d2f378eeeeed52a77e44d0fc9ff6f07ff32cbf3da99"
|
| + "9de4ed65832afcb0807f98787506539d258a0ce3c2c77967653099a9034a9b115a876c39a8"
|
| + "c4e4ed4acd0c64095946fb39eeeb47a0704dbb018acf48c3a1c4b895fc409fb4a340a986b1"
|
| + "afc45519ab9eca47c30185c771c64aa5ecf07d020103a35a3058303a06082b060105050701"
|
| + "01010100042b3029302706082b06010505073001861b687474703a2f2f3132372e302e302e"
|
| + "313a34323239362f6f637370301a0603551d200101000410300e300c060a2b06010401d679"
|
| + "020401300d06092a864886f70d01010505000381810089cf4ad3888f2140f891a25b1e04a8"
|
| + "e4fd11f0d428eb76a85f95acb763eb289d82e287ac5e09b2bf80ca34e2ecd9866242b8d1dc"
|
| + "9cc75455e2fd209f7968bd5052cc970129e8d1def772420a1c656b28fd964736645358c159"
|
| + "a4c59d43bd61d7db9cab8da4de6dc6a59a676f4136fc9983bd53574551abb4d84771145acc"
|
| + "80c2";
|
| +
|
| +const char kFakeOCSPExtensionValue[] = "74657374"; // "test"
|
| +
|
| } // namespace
|
|
|
| void GetX509CertLogEntry(LogEntry* entry) {
|
| @@ -169,6 +206,18 @@ std::string GetDefaultIssuerKeyHash() {
|
| return HexToBytes(kDefaultIssuerKeyHash);
|
| }
|
|
|
| +std::string GetDerEncodedFakeOCSPResponse() {
|
| +return HexToBytes(kFakeOCSPResponse);
|
| +}
|
| +
|
| +std::string GetFakeOCSPExtensionValue() {
|
| + return HexToBytes(kFakeOCSPExtensionValue);
|
| +}
|
| +
|
| +std::string GetDerEncodedFakeOCSPResponseCert() {
|
| + return HexToBytes(kFakeOCSPResponseCert);
|
| +}
|
| +
|
| } // namespace ct
|
|
|
| } // namespace net
|
|
|