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 |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 5 | */ |
| 6 | /* |
Manuel Pégourié-Gonnard | 6fb8187 | 2015-07-27 11:11:48 +0200 | [diff] [blame] | 7 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved |
Manuel Pégourié-Gonnard | 37ff140 | 2015-09-04 14:21:07 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: Apache-2.0 |
| 9 | * |
| 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 11 | * not use this file except in compliance with the License. |
| 12 | * You may obtain a copy of the License at |
| 13 | * |
| 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | * |
| 16 | * Unless required by applicable law or agreed to in writing, software |
| 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | * See the License for the specific language governing permissions and |
| 20 | * limitations under the License. |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 21 | * |
Manuel Pégourié-Gonnard | fe44643 | 2015-03-06 13:17:10 +0000 | [diff] [blame] | 22 | * This file is part of mbed TLS (https://tls.mbed.org) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 23 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 24 | #ifndef MBEDTLS_CERTS_H |
| 25 | #define MBEDTLS_CERTS_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 26 | |
Ron Eldor | 8b0cf2e | 2018-02-14 16:02:41 +0200 | [diff] [blame^] | 27 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 28 | #include "config.h" |
| 29 | #else |
| 30 | #include MBEDTLS_CONFIG_FILE |
| 31 | #endif |
| 32 | |
Manuel Pégourié-Gonnard | 75f9010 | 2015-03-27 09:56:18 +0100 | [diff] [blame] | 33 | #include <stddef.h> |
| 34 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 35 | #ifdef __cplusplus |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 39 | #if defined(MBEDTLS_PEM_PARSE_C) |
Manuel Pégourié-Gonnard | 2f16506 | 2015-03-27 10:20:26 +0100 | [diff] [blame] | 40 | /* Concatenation of all CA certificates in PEM format if available */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 41 | extern const char mbedtls_test_cas_pem[]; |
| 42 | extern const size_t mbedtls_test_cas_pem_len; |
Manuel Pégourié-Gonnard | a958d69 | 2015-03-27 10:23:53 +0100 | [diff] [blame] | 43 | #endif |
Manuel Pégourié-Gonnard | 641de71 | 2013-09-25 13:23:33 +0200 | [diff] [blame] | 44 | |
Manuel Pégourié-Gonnard | 2f16506 | 2015-03-27 10:20:26 +0100 | [diff] [blame] | 45 | /* List of all CA certificates, terminated by NULL */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 46 | extern const char * mbedtls_test_cas[]; |
| 47 | extern const size_t mbedtls_test_cas_len[]; |
Manuel Pégourié-Gonnard | 2f16506 | 2015-03-27 10:20:26 +0100 | [diff] [blame] | 48 | |
Manuel Pégourié-Gonnard | a0fdf8b | 2013-09-25 14:05:49 +0200 | [diff] [blame] | 49 | /* |
| 50 | * Convenience for users who just want a certificate: |
Manuel Pégourié-Gonnard | b63e3dd | 2015-03-06 09:42:40 +0000 | [diff] [blame] | 51 | * RSA by default, or ECDSA if RSA is not available |
Manuel Pégourié-Gonnard | a0fdf8b | 2013-09-25 14:05:49 +0200 | [diff] [blame] | 52 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 53 | extern const char * mbedtls_test_ca_crt; |
| 54 | extern const size_t mbedtls_test_ca_crt_len; |
| 55 | extern const char * mbedtls_test_ca_key; |
| 56 | extern const size_t mbedtls_test_ca_key_len; |
| 57 | extern const char * mbedtls_test_ca_pwd; |
| 58 | extern const size_t mbedtls_test_ca_pwd_len; |
| 59 | extern const char * mbedtls_test_srv_crt; |
| 60 | extern const size_t mbedtls_test_srv_crt_len; |
| 61 | extern const char * mbedtls_test_srv_key; |
| 62 | extern const size_t mbedtls_test_srv_key_len; |
| 63 | extern const char * mbedtls_test_cli_crt; |
| 64 | extern const size_t mbedtls_test_cli_crt_len; |
| 65 | extern const char * mbedtls_test_cli_key; |
| 66 | extern const size_t mbedtls_test_cli_key_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 67 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 68 | #if defined(MBEDTLS_ECDSA_C) |
| 69 | extern const char mbedtls_test_ca_crt_ec[]; |
| 70 | extern const size_t mbedtls_test_ca_crt_ec_len; |
| 71 | extern const char mbedtls_test_ca_key_ec[]; |
| 72 | extern const size_t mbedtls_test_ca_key_ec_len; |
| 73 | extern const char mbedtls_test_ca_pwd_ec[]; |
| 74 | extern const size_t mbedtls_test_ca_pwd_ec_len; |
| 75 | extern const char mbedtls_test_srv_crt_ec[]; |
| 76 | extern const size_t mbedtls_test_srv_crt_ec_len; |
| 77 | extern const char mbedtls_test_srv_key_ec[]; |
| 78 | extern const size_t mbedtls_test_srv_key_ec_len; |
| 79 | extern const char mbedtls_test_cli_crt_ec[]; |
| 80 | extern const size_t mbedtls_test_cli_crt_ec_len; |
| 81 | extern const char mbedtls_test_cli_key_ec[]; |
| 82 | extern const size_t mbedtls_test_cli_key_ec_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 83 | #endif |
| 84 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 85 | #if defined(MBEDTLS_RSA_C) |
| 86 | extern const char mbedtls_test_ca_crt_rsa[]; |
| 87 | extern const size_t mbedtls_test_ca_crt_rsa_len; |
| 88 | extern const char mbedtls_test_ca_key_rsa[]; |
| 89 | extern const size_t mbedtls_test_ca_key_rsa_len; |
| 90 | extern const char mbedtls_test_ca_pwd_rsa[]; |
| 91 | extern const size_t mbedtls_test_ca_pwd_rsa_len; |
| 92 | extern const char mbedtls_test_srv_crt_rsa[]; |
| 93 | extern const size_t mbedtls_test_srv_crt_rsa_len; |
| 94 | extern const char mbedtls_test_srv_key_rsa[]; |
| 95 | extern const size_t mbedtls_test_srv_key_rsa_len; |
| 96 | extern const char mbedtls_test_cli_crt_rsa[]; |
| 97 | extern const size_t mbedtls_test_cli_crt_rsa_len; |
| 98 | extern const char mbedtls_test_cli_key_rsa[]; |
| 99 | extern const size_t mbedtls_test_cli_key_rsa_len; |
Manuel Pégourié-Gonnard | 482a282 | 2013-09-24 19:33:17 +0200 | [diff] [blame] | 100 | #endif |
| 101 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 102 | #ifdef __cplusplus |
| 103 | } |
| 104 | #endif |
| 105 | |
| 106 | #endif /* certs.h */ |