ReactOS 0.4.16-dev-297-gc569aee
certs.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 *
10 * This file is provided under the Apache License 2.0, or the
11 * GNU General Public License v2.0 or later.
12 *
13 * **********
14 * Apache License 2.0:
15 *
16 * Licensed under the Apache License, Version 2.0 (the "License"); you may
17 * not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 *
20 * http://www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 *
28 * **********
29 *
30 * **********
31 * GNU General Public License v2.0 or later:
32 *
33 * This program is free software; you can redistribute it and/or modify
34 * it under the terms of the GNU General Public License as published by
35 * the Free Software Foundation; either version 2 of the License, or
36 * (at your option) any later version.
37 *
38 * This program is distributed in the hope that it will be useful,
39 * but WITHOUT ANY WARRANTY; without even the implied warranty of
40 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 * GNU General Public License for more details.
42 *
43 * You should have received a copy of the GNU General Public License along
44 * with this program; if not, write to the Free Software Foundation, Inc.,
45 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
46 *
47 * **********
48 */
49#ifndef MBEDTLS_CERTS_H
50#define MBEDTLS_CERTS_H
51
52#if !defined(MBEDTLS_CONFIG_FILE)
53#include "config.h"
54#else
55#include MBEDTLS_CONFIG_FILE
56#endif
57
58#include <stddef.h>
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/* List of all PEM-encoded CA certificates, terminated by NULL;
65 * PEM encoded if MBEDTLS_PEM_PARSE_C is enabled, DER encoded
66 * otherwise. */
67extern const char * mbedtls_test_cas[];
68extern const size_t mbedtls_test_cas_len[];
69
70/* List of all DER-encoded CA certificates, terminated by NULL */
71extern const unsigned char * mbedtls_test_cas_der[];
72extern const size_t mbedtls_test_cas_der_len[];
73
74#if defined(MBEDTLS_PEM_PARSE_C)
75/* Concatenation of all CA certificates in PEM format if available */
76extern const char mbedtls_test_cas_pem[];
77extern const size_t mbedtls_test_cas_pem_len;
78#endif /* MBEDTLS_PEM_PARSE_C */
79
80/*
81 * CA test certificates
82 */
83
84extern const char mbedtls_test_ca_crt_ec_pem[];
85extern const char mbedtls_test_ca_key_ec_pem[];
86extern const char mbedtls_test_ca_pwd_ec_pem[];
87extern const char mbedtls_test_ca_key_rsa_pem[];
88extern const char mbedtls_test_ca_pwd_rsa_pem[];
89extern const char mbedtls_test_ca_crt_rsa_sha1_pem[];
90extern const char mbedtls_test_ca_crt_rsa_sha256_pem[];
91
92extern const unsigned char mbedtls_test_ca_crt_ec_der[];
93extern const unsigned char mbedtls_test_ca_key_ec_der[];
94extern const unsigned char mbedtls_test_ca_key_rsa_der[];
95extern const unsigned char mbedtls_test_ca_crt_rsa_sha1_der[];
96extern const unsigned char mbedtls_test_ca_crt_rsa_sha256_der[];
97
98extern const size_t mbedtls_test_ca_crt_ec_pem_len;
99extern const size_t mbedtls_test_ca_key_ec_pem_len;
100extern const size_t mbedtls_test_ca_pwd_ec_pem_len;
101extern const size_t mbedtls_test_ca_key_rsa_pem_len;
102extern const size_t mbedtls_test_ca_pwd_rsa_pem_len;
103extern const size_t mbedtls_test_ca_crt_rsa_sha1_pem_len;
105
106extern const size_t mbedtls_test_ca_crt_ec_der_len;
107extern const size_t mbedtls_test_ca_key_ec_der_len;
108extern const size_t mbedtls_test_ca_pwd_ec_der_len;
109extern const size_t mbedtls_test_ca_key_rsa_der_len;
110extern const size_t mbedtls_test_ca_pwd_rsa_der_len;
111extern const size_t mbedtls_test_ca_crt_rsa_sha1_der_len;
113
114/* Config-dependent dispatch between PEM and DER encoding
115 * (PEM if enabled, otherwise DER) */
116
117extern const char mbedtls_test_ca_crt_ec[];
118extern const char mbedtls_test_ca_key_ec[];
119extern const char mbedtls_test_ca_pwd_ec[];
120extern const char mbedtls_test_ca_key_rsa[];
121extern const char mbedtls_test_ca_pwd_rsa[];
122extern const char mbedtls_test_ca_crt_rsa_sha1[];
123extern const char mbedtls_test_ca_crt_rsa_sha256[];
124
125extern const size_t mbedtls_test_ca_crt_ec_len;
126extern const size_t mbedtls_test_ca_key_ec_len;
127extern const size_t mbedtls_test_ca_pwd_ec_len;
128extern const size_t mbedtls_test_ca_key_rsa_len;
129extern const size_t mbedtls_test_ca_pwd_rsa_len;
130extern const size_t mbedtls_test_ca_crt_rsa_sha1_len;
131extern const size_t mbedtls_test_ca_crt_rsa_sha256_len;
132
133/* Config-dependent dispatch between SHA-1 and SHA-256
134 * (SHA-256 if enabled, otherwise SHA-1) */
135
136extern const char mbedtls_test_ca_crt_rsa[];
137extern const size_t mbedtls_test_ca_crt_rsa_len;
138
139/* Config-dependent dispatch between EC and RSA
140 * (RSA if enabled, otherwise EC) */
141
142extern const char * mbedtls_test_ca_crt;
143extern const char * mbedtls_test_ca_key;
144extern const char * mbedtls_test_ca_pwd;
145extern const size_t mbedtls_test_ca_crt_len;
146extern const size_t mbedtls_test_ca_key_len;
147extern const size_t mbedtls_test_ca_pwd_len;
148
149/*
150 * Server test certificates
151 */
152
153extern const char mbedtls_test_srv_crt_ec_pem[];
154extern const char mbedtls_test_srv_key_ec_pem[];
155extern const char mbedtls_test_srv_pwd_ec_pem[];
156extern const char mbedtls_test_srv_key_rsa_pem[];
157extern const char mbedtls_test_srv_pwd_rsa_pem[];
158extern const char mbedtls_test_srv_crt_rsa_sha1_pem[];
159extern const char mbedtls_test_srv_crt_rsa_sha256_pem[];
160
161extern const unsigned char mbedtls_test_srv_crt_ec_der[];
162extern const unsigned char mbedtls_test_srv_key_ec_der[];
163extern const unsigned char mbedtls_test_srv_key_rsa_der[];
164extern const unsigned char mbedtls_test_srv_crt_rsa_sha1_der[];
165extern const unsigned char mbedtls_test_srv_crt_rsa_sha256_der[];
166
167extern const size_t mbedtls_test_srv_crt_ec_pem_len;
168extern const size_t mbedtls_test_srv_key_ec_pem_len;
169extern const size_t mbedtls_test_srv_pwd_ec_pem_len;
170extern const size_t mbedtls_test_srv_key_rsa_pem_len;
171extern const size_t mbedtls_test_srv_pwd_rsa_pem_len;
172extern const size_t mbedtls_test_srv_crt_rsa_sha1_pem_len;
174
175extern const size_t mbedtls_test_srv_crt_ec_der_len;
176extern const size_t mbedtls_test_srv_key_ec_der_len;
177extern const size_t mbedtls_test_srv_pwd_ec_der_len;
178extern const size_t mbedtls_test_srv_key_rsa_der_len;
179extern const size_t mbedtls_test_srv_pwd_rsa_der_len;
180extern const size_t mbedtls_test_srv_crt_rsa_sha1_der_len;
182
183/* Config-dependent dispatch between PEM and DER encoding
184 * (PEM if enabled, otherwise DER) */
185
186extern const char mbedtls_test_srv_crt_ec[];
187extern const char mbedtls_test_srv_key_ec[];
188extern const char mbedtls_test_srv_pwd_ec[];
189extern const char mbedtls_test_srv_key_rsa[];
190extern const char mbedtls_test_srv_pwd_rsa[];
191extern const char mbedtls_test_srv_crt_rsa_sha1[];
192extern const char mbedtls_test_srv_crt_rsa_sha256[];
193
194extern const size_t mbedtls_test_srv_crt_ec_len;
195extern const size_t mbedtls_test_srv_key_ec_len;
196extern const size_t mbedtls_test_srv_pwd_ec_len;
197extern const size_t mbedtls_test_srv_key_rsa_len;
198extern const size_t mbedtls_test_srv_pwd_rsa_len;
199extern const size_t mbedtls_test_srv_crt_rsa_sha1_len;
200extern const size_t mbedtls_test_srv_crt_rsa_sha256_len;
201
202/* Config-dependent dispatch between SHA-1 and SHA-256
203 * (SHA-256 if enabled, otherwise SHA-1) */
204
205extern const char mbedtls_test_srv_crt_rsa[];
206extern const size_t mbedtls_test_srv_crt_rsa_len;
207
208/* Config-dependent dispatch between EC and RSA
209 * (RSA if enabled, otherwise EC) */
210
211extern const char * mbedtls_test_srv_crt;
212extern const char * mbedtls_test_srv_key;
213extern const char * mbedtls_test_srv_pwd;
214extern const size_t mbedtls_test_srv_crt_len;
215extern const size_t mbedtls_test_srv_key_len;
216extern const size_t mbedtls_test_srv_pwd_len;
217
218/*
219 * Client test certificates
220 */
221
222extern const char mbedtls_test_cli_crt_ec_pem[];
223extern const char mbedtls_test_cli_key_ec_pem[];
224extern const char mbedtls_test_cli_pwd_ec_pem[];
225extern const char mbedtls_test_cli_key_rsa_pem[];
226extern const char mbedtls_test_cli_pwd_rsa_pem[];
227extern const char mbedtls_test_cli_crt_rsa_pem[];
228
229extern const unsigned char mbedtls_test_cli_crt_ec_der[];
230extern const unsigned char mbedtls_test_cli_key_ec_der[];
231extern const unsigned char mbedtls_test_cli_key_rsa_der[];
232extern const unsigned char mbedtls_test_cli_crt_rsa_der[];
233
234extern const size_t mbedtls_test_cli_crt_ec_pem_len;
235extern const size_t mbedtls_test_cli_key_ec_pem_len;
236extern const size_t mbedtls_test_cli_pwd_ec_pem_len;
237extern const size_t mbedtls_test_cli_key_rsa_pem_len;
238extern const size_t mbedtls_test_cli_pwd_rsa_pem_len;
239extern const size_t mbedtls_test_cli_crt_rsa_pem_len;
240
241extern const size_t mbedtls_test_cli_crt_ec_der_len;
242extern const size_t mbedtls_test_cli_key_ec_der_len;
243extern const size_t mbedtls_test_cli_key_rsa_der_len;
244extern const size_t mbedtls_test_cli_crt_rsa_der_len;
245
246/* Config-dependent dispatch between PEM and DER encoding
247 * (PEM if enabled, otherwise DER) */
248
249extern const char mbedtls_test_cli_crt_ec[];
250extern const char mbedtls_test_cli_key_ec[];
251extern const char mbedtls_test_cli_pwd_ec[];
252extern const char mbedtls_test_cli_key_rsa[];
253extern const char mbedtls_test_cli_pwd_rsa[];
254extern const char mbedtls_test_cli_crt_rsa[];
255
256extern const size_t mbedtls_test_cli_crt_ec_len;
257extern const size_t mbedtls_test_cli_key_ec_len;
258extern const size_t mbedtls_test_cli_pwd_ec_len;
259extern const size_t mbedtls_test_cli_key_rsa_len;
260extern const size_t mbedtls_test_cli_pwd_rsa_len;
261extern const size_t mbedtls_test_cli_crt_rsa_len;
262
263/* Config-dependent dispatch between EC and RSA
264 * (RSA if enabled, otherwise EC) */
265
266extern const char * mbedtls_test_cli_crt;
267extern const char * mbedtls_test_cli_key;
268extern const char * mbedtls_test_cli_pwd;
269extern const size_t mbedtls_test_cli_crt_len;
270extern const size_t mbedtls_test_cli_key_len;
271extern const size_t mbedtls_test_cli_pwd_len;
272
273#ifdef __cplusplus
274}
275#endif
276
277#endif /* certs.h */
const char * mbedtls_test_srv_key
const size_t mbedtls_test_ca_key_rsa_der_len
const char mbedtls_test_srv_crt_ec_pem[]
const size_t mbedtls_test_ca_crt_rsa_sha1_der_len
const size_t mbedtls_test_srv_pwd_ec_pem_len
const size_t mbedtls_test_cli_pwd_rsa_len
const char mbedtls_test_srv_pwd_rsa_pem[]
const char mbedtls_test_ca_key_ec_pem[]
const size_t mbedtls_test_cli_key_rsa_len
const size_t mbedtls_test_ca_crt_rsa_sha256_pem_len
const size_t mbedtls_test_ca_crt_rsa_len
const unsigned char mbedtls_test_srv_crt_ec_der[]
const size_t mbedtls_test_ca_pwd_rsa_len
const char mbedtls_test_cli_key_ec_pem[]
const unsigned char mbedtls_test_ca_crt_ec_der[]
const char mbedtls_test_ca_key_rsa[]
const char mbedtls_test_srv_crt_rsa[]
const size_t mbedtls_test_cli_pwd_ec_pem_len
const char mbedtls_test_ca_pwd_rsa[]
const size_t mbedtls_test_ca_key_ec_len
const size_t mbedtls_test_srv_crt_ec_pem_len
const size_t mbedtls_test_srv_pwd_rsa_der_len
const size_t mbedtls_test_ca_key_ec_pem_len
const size_t mbedtls_test_ca_pwd_rsa_pem_len
const char mbedtls_test_ca_crt_rsa_sha1_pem[]
const unsigned char mbedtls_test_ca_key_rsa_der[]
const unsigned char mbedtls_test_cli_key_ec_der[]
const unsigned char mbedtls_test_srv_key_ec_der[]
const char mbedtls_test_srv_crt_ec[]
const size_t mbedtls_test_cli_pwd_ec_len
const char * mbedtls_test_srv_pwd
const size_t mbedtls_test_srv_key_rsa_pem_len
const char mbedtls_test_cli_key_rsa_pem[]
const char mbedtls_test_ca_key_ec[]
const size_t mbedtls_test_srv_pwd_rsa_len
const char mbedtls_test_ca_pwd_ec_pem[]
const size_t mbedtls_test_srv_key_rsa_der_len
const char mbedtls_test_cli_key_ec[]
const char mbedtls_test_cli_pwd_rsa[]
const size_t mbedtls_test_cas_len[]
const unsigned char mbedtls_test_ca_key_ec_der[]
const size_t mbedtls_test_ca_pwd_ec_der_len
const char mbedtls_test_ca_key_rsa_pem[]
const char mbedtls_test_srv_pwd_rsa[]
const size_t mbedtls_test_ca_pwd_len
const size_t mbedtls_test_srv_crt_rsa_sha1_pem_len
const size_t mbedtls_test_ca_pwd_ec_len
const size_t mbedtls_test_srv_crt_rsa_sha1_der_len
const size_t mbedtls_test_ca_crt_rsa_sha256_len
const size_t mbedtls_test_srv_pwd_len
const char mbedtls_test_cli_pwd_rsa_pem[]
const char mbedtls_test_srv_key_rsa[]
const char mbedtls_test_ca_crt_rsa_sha256_pem[]
const size_t mbedtls_test_srv_crt_rsa_sha256_len
const size_t mbedtls_test_ca_crt_rsa_sha1_len
const char mbedtls_test_cli_crt_ec[]
const char * mbedtls_test_srv_crt
const size_t mbedtls_test_srv_key_ec_pem_len
const size_t mbedtls_test_srv_pwd_ec_der_len
const size_t mbedtls_test_cli_pwd_rsa_pem_len
const size_t mbedtls_test_cli_crt_ec_pem_len
const char mbedtls_test_ca_crt_ec[]
const char mbedtls_test_ca_crt_rsa_sha256[]
const unsigned char mbedtls_test_ca_crt_rsa_sha1_der[]
const char mbedtls_test_srv_pwd_ec_pem[]
const size_t mbedtls_test_srv_pwd_ec_len
const char mbedtls_test_srv_crt_rsa_sha256[]
const size_t mbedtls_test_cli_key_len
const size_t mbedtls_test_cli_crt_rsa_der_len
const char * mbedtls_test_cas[]
const size_t mbedtls_test_srv_crt_ec_len
const char mbedtls_test_cli_crt_ec_pem[]
const char * mbedtls_test_ca_pwd
const size_t mbedtls_test_ca_key_rsa_pem_len
const size_t mbedtls_test_ca_crt_ec_der_len
const size_t mbedtls_test_srv_crt_rsa_len
const size_t mbedtls_test_srv_crt_ec_der_len
const char mbedtls_test_cli_pwd_ec[]
const size_t mbedtls_test_ca_key_len
const size_t mbedtls_test_cli_key_ec_len
const size_t mbedtls_test_srv_crt_rsa_sha256_der_len
const unsigned char mbedtls_test_srv_key_rsa_der[]
const unsigned char mbedtls_test_srv_crt_rsa_sha1_der[]
const size_t mbedtls_test_cli_key_rsa_pem_len
const char mbedtls_test_srv_pwd_ec[]
const size_t mbedtls_test_cli_key_ec_pem_len
const char mbedtls_test_ca_crt_rsa[]
const size_t mbedtls_test_cli_pwd_len
const size_t mbedtls_test_srv_key_rsa_len
const unsigned char mbedtls_test_srv_crt_rsa_sha256_der[]
const unsigned char mbedtls_test_cli_crt_ec_der[]
const size_t mbedtls_test_cli_crt_ec_der_len
const size_t mbedtls_test_ca_crt_rsa_sha1_pem_len
const char mbedtls_test_ca_crt_rsa_sha1[]
const size_t mbedtls_test_cli_crt_len
const char * mbedtls_test_ca_crt
const char mbedtls_test_cli_key_rsa[]
const size_t mbedtls_test_srv_key_ec_len
const char mbedtls_test_ca_pwd_ec[]
const char * mbedtls_test_ca_key
const char mbedtls_test_ca_crt_ec_pem[]
const size_t mbedtls_test_ca_crt_len
const size_t mbedtls_test_srv_key_len
const char mbedtls_test_srv_key_rsa_pem[]
const char mbedtls_test_cli_crt_rsa[]
const size_t mbedtls_test_ca_key_ec_der_len
const unsigned char * mbedtls_test_cas_der[]
const char mbedtls_test_srv_key_ec[]
const size_t mbedtls_test_ca_pwd_rsa_der_len
const size_t mbedtls_test_cli_crt_rsa_len
const size_t mbedtls_test_srv_pwd_rsa_pem_len
const size_t mbedtls_test_srv_crt_rsa_sha1_len
const char mbedtls_test_srv_key_ec_pem[]
const size_t mbedtls_test_srv_crt_len
const size_t mbedtls_test_cas_der_len[]
const char mbedtls_test_ca_pwd_rsa_pem[]
const size_t mbedtls_test_ca_pwd_ec_pem_len
const size_t mbedtls_test_ca_crt_ec_len
const char mbedtls_test_srv_crt_rsa_sha1[]
const unsigned char mbedtls_test_cli_key_rsa_der[]
const size_t mbedtls_test_cli_crt_ec_len
const char mbedtls_test_cli_crt_rsa_pem[]
const size_t mbedtls_test_cli_crt_rsa_pem_len
const char mbedtls_test_srv_crt_rsa_sha256_pem[]
const char * mbedtls_test_cli_pwd
const size_t mbedtls_test_ca_crt_rsa_sha256_der_len
const size_t mbedtls_test_ca_crt_ec_pem_len
const size_t mbedtls_test_cli_key_ec_der_len
const char mbedtls_test_srv_crt_rsa_sha1_pem[]
const unsigned char mbedtls_test_ca_crt_rsa_sha256_der[]
const size_t mbedtls_test_cli_key_rsa_der_len
const size_t mbedtls_test_srv_key_ec_der_len
const char * mbedtls_test_cli_key
const unsigned char mbedtls_test_cli_crt_rsa_der[]
const size_t mbedtls_test_ca_key_rsa_len
const char mbedtls_test_cli_pwd_ec_pem[]
const size_t mbedtls_test_srv_crt_rsa_sha256_pem_len
const char * mbedtls_test_cli_crt