blob: e2e9f7715bc4229b37f540da709c115b4361e23f [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file certs.h
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00003 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00004 * \brief Sample certificates and DHM parameters for testing
Paul Bakker37ca75d2011-01-06 12:28:03 +00005 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00006 * Copyright (C) 2006-2010, ARM Limited, All Rights Reserved
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +00008 * This file is part of mbed TLS (https://tls.mbed.org)
Paul Bakkerb96f1542010-07-18 20:36:00 +00009 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000010 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Paul Bakker5121ce52009-01-03 21:22:43 +000023 */
Paul Bakker40e46942009-01-03 21:51:57 +000024#ifndef POLARSSL_CERTS_H
25#define POLARSSL_CERTS_H
Paul Bakker5121ce52009-01-03 21:22:43 +000026
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010027#include <stddef.h>
28
Paul Bakker5121ce52009-01-03 21:22:43 +000029#ifdef __cplusplus
30extern "C" {
31#endif
32
Manuel Pégourié-Gonnard641de712013-09-25 13:23:33 +020033/* Concatenation of all available CA certificates */
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010034extern const char test_ca_list[];
35extern const size_t test_ca_list_len;
Manuel Pégourié-Gonnard641de712013-09-25 13:23:33 +020036
Manuel Pégourié-Gonnarda0fdf8b2013-09-25 14:05:49 +020037/*
38 * Convenience for users who just want a certificate:
Manuel Pégourié-Gonnardb63e3dd2015-03-06 09:42:40 +000039 * RSA by default, or ECDSA if RSA is not available
Manuel Pégourié-Gonnarda0fdf8b2013-09-25 14:05:49 +020040 */
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010041extern const char * test_ca_crt;
42extern const size_t test_ca_crt_len;
43extern const char * test_ca_key;
44extern const size_t test_ca_key_len;
45extern const char * test_ca_pwd;
46extern const size_t test_ca_pwd_len;
47extern const char * test_srv_crt;
48extern const size_t test_srv_crt_len;
49extern const char * test_srv_key;
50extern const size_t test_srv_key_len;
51extern const char * test_cli_crt;
52extern const size_t test_cli_crt_len;
53extern const char * test_cli_key;
54extern const size_t test_cli_key_len;
Manuel Pégourié-Gonnard482a2822013-09-24 19:33:17 +020055
Manuel Pégourié-Gonnard482a2822013-09-24 19:33:17 +020056#if defined(POLARSSL_ECDSA_C)
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010057extern const char test_ca_crt_ec[];
58extern const size_t test_ca_crt_ec_len;
59extern const char test_ca_key_ec[];
60extern const size_t test_ca_key_ec_len;
61extern const char test_ca_pwd_ec[];
62extern const size_t test_ca_pwd_ec_len;
63extern const char test_srv_crt_ec[];
64extern const size_t test_srv_crt_ec_len;
65extern const char test_srv_key_ec[];
66extern const size_t test_srv_key_ec_len;
67extern const char test_cli_crt_ec[];
68extern const size_t test_cli_crt_ec_len;
69extern const char test_cli_key_ec[];
70extern const size_t test_cli_key_ec_len;
Manuel Pégourié-Gonnard482a2822013-09-24 19:33:17 +020071#endif
72
73#if defined(POLARSSL_RSA_C)
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010074extern const char test_ca_crt_rsa[];
75extern const size_t test_ca_crt_rsa_len;
76extern const char test_ca_key_rsa[];
77extern const size_t test_ca_key_rsa_len;
78extern const char test_ca_pwd_rsa[];
79extern const size_t test_ca_pwd_rsa_len;
80extern const char test_srv_crt_rsa[];
81extern const size_t test_srv_crt_rsa_len;
82extern const char test_srv_key_rsa[];
83extern const size_t test_srv_key_rsa_len;
84extern const char test_cli_crt_rsa[];
85extern const size_t test_cli_crt_rsa_len;
86extern const char test_cli_key_rsa[];
87extern const size_t test_cli_key_rsa_len;
Manuel Pégourié-Gonnard482a2822013-09-24 19:33:17 +020088#endif
89
90#if defined(POLARSSL_DHM_C)
Manuel Pégourié-Gonnard75f90102015-03-27 09:56:18 +010091extern const char test_dhm_params[];
92extern const size_t test_dhm_params_len;
Manuel Pégourié-Gonnard482a2822013-09-24 19:33:17 +020093#endif
Paul Bakker5121ce52009-01-03 21:22:43 +000094
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* certs.h */