Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
| 2 | * \file certs.h |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 3 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 4 | * \brief Sample certificates and DHM parameters for testing |
Paul Bakker | 37ca75d | 2011-01-06 12:28:03 +0000 | [diff] [blame] | 5 | * |
Manuel Pégourié-Gonnard | a658a40 | 2015-01-23 09:45:19 +0000 | [diff] [blame] | 6 | * Copyright (C) 2006-2010, ARM Limited, All Rights Reserved |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 7 | * |
Manuel Pégourié-Gonnard | fe44643 | 2015-03-06 13:17:10 +0000 | [diff] [blame] | 8 | * This file is part of mbed TLS (https://tls.mbed.org) |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 9 | * |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 10 | * 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 Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 23 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 24 | #ifndef POLARSSL_CERTS_H |
| 25 | #define POLARSSL_CERTS_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 26 | |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 27 | #include <stddef.h> |
| 28 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 29 | #ifdef __cplusplus |
| 30 | extern "C" { |
| 31 | #endif |
| 32 | |
Manuel Pégourié-Gonnard | 2f16506 | 2015-03-27 10:20:26 +0100 | [diff] [blame^] | 33 | /* Concatenation of all CA certificates in PEM format if available */ |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 34 | extern const char test_ca_list[]; |
| 35 | extern const size_t test_ca_list_len; |
Manuel Pégourié-Gonnard | 641de71 | 2013-09-25 13:23:33 +0200 | [diff] [blame] | 36 | |
Manuel Pégourié-Gonnard | 2f16506 | 2015-03-27 10:20:26 +0100 | [diff] [blame^] | 37 | /* List of all CA certificates, terminated by NULL */ |
| 38 | extern const char * test_cas[]; |
| 39 | extern const size_t test_cas_len[]; |
| 40 | |
Manuel Pégourié-Gonnard | a0fdf8b | 2013-09-25 14:05:49 +0200 | [diff] [blame] | 41 | /* |
| 42 | * Convenience for users who just want a certificate: |
Manuel Pégourié-Gonnard | b63e3dd | 2015-03-06 09:42:40 +0000 | [diff] [blame] | 43 | * RSA by default, or ECDSA if RSA is not available |
Manuel Pégourié-Gonnard | a0fdf8b | 2013-09-25 14:05:49 +0200 | [diff] [blame] | 44 | */ |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 45 | extern const char * test_ca_crt; |
| 46 | extern const size_t test_ca_crt_len; |
| 47 | extern const char * test_ca_key; |
| 48 | extern const size_t test_ca_key_len; |
| 49 | extern const char * test_ca_pwd; |
| 50 | extern const size_t test_ca_pwd_len; |
| 51 | extern const char * test_srv_crt; |
| 52 | extern const size_t test_srv_crt_len; |
| 53 | extern const char * test_srv_key; |
| 54 | extern const size_t test_srv_key_len; |
| 55 | extern const char * test_cli_crt; |
| 56 | extern const size_t test_cli_crt_len; |
| 57 | extern const char * test_cli_key; |
| 58 | extern const size_t test_cli_key_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 59 | |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 60 | #if defined(POLARSSL_ECDSA_C) |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 61 | extern const char test_ca_crt_ec[]; |
| 62 | extern const size_t test_ca_crt_ec_len; |
| 63 | extern const char test_ca_key_ec[]; |
| 64 | extern const size_t test_ca_key_ec_len; |
| 65 | extern const char test_ca_pwd_ec[]; |
| 66 | extern const size_t test_ca_pwd_ec_len; |
| 67 | extern const char test_srv_crt_ec[]; |
| 68 | extern const size_t test_srv_crt_ec_len; |
| 69 | extern const char test_srv_key_ec[]; |
| 70 | extern const size_t test_srv_key_ec_len; |
| 71 | extern const char test_cli_crt_ec[]; |
| 72 | extern const size_t test_cli_crt_ec_len; |
| 73 | extern const char test_cli_key_ec[]; |
| 74 | extern const size_t test_cli_key_ec_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 75 | #endif |
| 76 | |
| 77 | #if defined(POLARSSL_RSA_C) |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 78 | extern const char test_ca_crt_rsa[]; |
| 79 | extern const size_t test_ca_crt_rsa_len; |
| 80 | extern const char test_ca_key_rsa[]; |
| 81 | extern const size_t test_ca_key_rsa_len; |
| 82 | extern const char test_ca_pwd_rsa[]; |
| 83 | extern const size_t test_ca_pwd_rsa_len; |
| 84 | extern const char test_srv_crt_rsa[]; |
| 85 | extern const size_t test_srv_crt_rsa_len; |
| 86 | extern const char test_srv_key_rsa[]; |
| 87 | extern const size_t test_srv_key_rsa_len; |
| 88 | extern const char test_cli_crt_rsa[]; |
| 89 | extern const size_t test_cli_crt_rsa_len; |
| 90 | extern const char test_cli_key_rsa[]; |
| 91 | extern const size_t test_cli_key_rsa_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 92 | #endif |
| 93 | |
| 94 | #if defined(POLARSSL_DHM_C) |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 95 | extern const char test_dhm_params[]; |
| 96 | extern const size_t test_dhm_params_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 97 | #endif |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 98 | |
| 99 | #ifdef __cplusplus |
| 100 | } |
| 101 | #endif |
| 102 | |
| 103 | #endif /* certs.h */ |