vasilvv | b67d298 | 2020-04-24 01:20:09 -0700 | [diff] [blame] | 1 | // Copyright 2020 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_TEST_TOOLS_TEST_CERTIFICATES_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_TEST_CERTIFICATES_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/platform/api/quic_macros.h" |
| 9 | #include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h" |
| 10 | |
| 11 | namespace quic { |
| 12 | namespace test { |
| 13 | |
| 14 | // A test certificate generated by //net/tools/quic/certs/generate-certs.sh. |
| 15 | QUIC_CONST_INIT extern const quiche::QuicheStringPiece kTestCertificate; |
| 16 | |
| 17 | // PEM-encoded version of |kTestCertificate|. |
| 18 | QUIC_CONST_INIT extern const char kTestCertificatePem[]; |
| 19 | |
| 20 | // |kTestCertificatePem| with a PEM-encoded root appended to the end. |
| 21 | QUIC_CONST_INIT extern const char kTestCertificateChainPem[]; |
| 22 | |
nharper | f424d1a | 2020-05-27 16:13:58 -0400 | [diff] [blame] | 23 | // PEM-encoded certificate that contains a subjectAltName with an |
| 24 | // unknown/unsupported type. |
| 25 | QUIC_CONST_INIT extern const char kTestCertWithUnknownSanTypePem[]; |
| 26 | |
vasilvv | b67d298 | 2020-04-24 01:20:09 -0700 | [diff] [blame] | 27 | // DER-encoded private key for |kTestCertificate|. |
| 28 | QUIC_CONST_INIT extern const quiche::QuicheStringPiece |
| 29 | kTestCertificatePrivateKey; |
| 30 | |
| 31 | // PEM-encoded version of |kTestCertificatePrivateKey|. |
| 32 | QUIC_CONST_INIT extern const char kTestCertificatePrivateKeyPem[]; |
| 33 | |
| 34 | // The legacy PEM-encoded version of |kTestCertificatePrivateKey| manually |
| 35 | // generated from the one above using der2ascii. |
| 36 | QUIC_CONST_INIT extern const char kTestCertificatePrivateKeyLegacyPem[]; |
| 37 | |
| 38 | // Another DER-encoded test certificate, valid for foo.test, www.foo.test and |
| 39 | // *.wildcard.test. |
| 40 | QUIC_CONST_INIT extern const quiche::QuicheStringPiece kWildcardCertificate; |
| 41 | |
| 42 | // DER-encoded private key for |kWildcardCertificate|. |
| 43 | QUIC_CONST_INIT extern const quiche::QuicheStringPiece |
| 44 | kWildcardCertificatePrivateKey; |
| 45 | |
vasilvv | ac5f49d | 2020-07-29 14:00:39 -0700 | [diff] [blame] | 46 | // PEM-encoded P-256 private key using legacy OpenSSL encoding. |
| 47 | QUIC_CONST_INIT extern const char kTestEcPrivateKeyLegacyPem[]; |
| 48 | |
vasilvv | b67d298 | 2020-04-24 01:20:09 -0700 | [diff] [blame] | 49 | } // namespace test |
| 50 | } // namespace quic |
| 51 | |
| 52 | #endif // QUICHE_QUIC_TEST_TOOLS_TEST_CERTIFICATES_H_ |