blob: f6179419d352499db441e5419f4adb21f041b12b [file] [log] [blame]
vasilvvb67d2982020-04-24 01:20:09 -07001// 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
11namespace quic {
12namespace test {
13
14// A test certificate generated by //net/tools/quic/certs/generate-certs.sh.
15QUIC_CONST_INIT extern const quiche::QuicheStringPiece kTestCertificate;
16
17// PEM-encoded version of |kTestCertificate|.
18QUIC_CONST_INIT extern const char kTestCertificatePem[];
19
20// |kTestCertificatePem| with a PEM-encoded root appended to the end.
21QUIC_CONST_INIT extern const char kTestCertificateChainPem[];
22
nharperf424d1a2020-05-27 16:13:58 -040023// PEM-encoded certificate that contains a subjectAltName with an
24// unknown/unsupported type.
25QUIC_CONST_INIT extern const char kTestCertWithUnknownSanTypePem[];
26
vasilvvb67d2982020-04-24 01:20:09 -070027// DER-encoded private key for |kTestCertificate|.
28QUIC_CONST_INIT extern const quiche::QuicheStringPiece
29 kTestCertificatePrivateKey;
30
31// PEM-encoded version of |kTestCertificatePrivateKey|.
32QUIC_CONST_INIT extern const char kTestCertificatePrivateKeyPem[];
33
34// The legacy PEM-encoded version of |kTestCertificatePrivateKey| manually
35// generated from the one above using der2ascii.
36QUIC_CONST_INIT extern const char kTestCertificatePrivateKeyLegacyPem[];
37
38// Another DER-encoded test certificate, valid for foo.test, www.foo.test and
39// *.wildcard.test.
40QUIC_CONST_INIT extern const quiche::QuicheStringPiece kWildcardCertificate;
41
42// DER-encoded private key for |kWildcardCertificate|.
43QUIC_CONST_INIT extern const quiche::QuicheStringPiece
44 kWildcardCertificatePrivateKey;
45
vasilvvac5f49d2020-07-29 14:00:39 -070046// PEM-encoded P-256 private key using legacy OpenSSL encoding.
47QUIC_CONST_INIT extern const char kTestEcPrivateKeyLegacyPem[];
48
vasilvvb67d2982020-04-24 01:20:09 -070049} // namespace test
50} // namespace quic
51
52#endif // QUICHE_QUIC_TEST_TOOLS_TEST_CERTIFICATES_H_