1 /** 2 * \file certs.h 3 * 4 * \brief Sample certificates and DHM parameters for testing 5 * 6 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved 7 * SPDX-License-Identifier: Apache-2.0 8 * 9 * Licensed under the Apache License, Version 2.0 (the "License"); you may 10 * not use this file except in compliance with the License. 11 * You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 * 21 * This file is part of mbed TLS (https://tls.mbed.org) 22 */ 23 #ifndef MBEDTLS_CERTS_H 24 #define MBEDTLS_CERTS_H 25 26 #include <stddef.h> 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 #if defined(MBEDTLS_PEM_PARSE_C) 33 /* Concatenation of all CA certificates in PEM format if available */ 34 extern const char mbedtls_test_cas_pem[]; 35 extern const size_t mbedtls_test_cas_pem_len; 36 #endif 37 38 /* List of all CA certificates, terminated by NULL */ 39 extern const char * mbedtls_test_cas[]; 40 extern const size_t mbedtls_test_cas_len[]; 41 42 /* 43 * Convenience for users who just want a certificate: 44 * RSA by default, or ECDSA if RSA is not available 45 */ 46 extern const char * mbedtls_test_ca_crt; 47 extern const size_t mbedtls_test_ca_crt_len; 48 extern const char * mbedtls_test_ca_key; 49 extern const size_t mbedtls_test_ca_key_len; 50 extern const char * mbedtls_test_ca_pwd; 51 extern const size_t mbedtls_test_ca_pwd_len; 52 extern const char * mbedtls_test_srv_crt; 53 extern const size_t mbedtls_test_srv_crt_len; 54 extern const char * mbedtls_test_srv_key; 55 extern const size_t mbedtls_test_srv_key_len; 56 extern const char * mbedtls_test_cli_crt; 57 extern const size_t mbedtls_test_cli_crt_len; 58 extern const char * mbedtls_test_cli_key; 59 extern const size_t mbedtls_test_cli_key_len; 60 61 #if defined(MBEDTLS_ECDSA_C) 62 extern const char mbedtls_test_ca_crt_ec[]; 63 extern const size_t mbedtls_test_ca_crt_ec_len; 64 extern const char mbedtls_test_ca_key_ec[]; 65 extern const size_t mbedtls_test_ca_key_ec_len; 66 extern const char mbedtls_test_ca_pwd_ec[]; 67 extern const size_t mbedtls_test_ca_pwd_ec_len; 68 extern const char mbedtls_test_srv_crt_ec[]; 69 extern const size_t mbedtls_test_srv_crt_ec_len; 70 extern const char mbedtls_test_srv_key_ec[]; 71 extern const size_t mbedtls_test_srv_key_ec_len; 72 extern const char mbedtls_test_cli_crt_ec[]; 73 extern const size_t mbedtls_test_cli_crt_ec_len; 74 extern const char mbedtls_test_cli_key_ec[]; 75 extern const size_t mbedtls_test_cli_key_ec_len; 76 #endif 77 78 #if defined(MBEDTLS_RSA_C) 79 extern const char mbedtls_test_ca_crt_rsa[]; 80 extern const size_t mbedtls_test_ca_crt_rsa_len; 81 extern const char mbedtls_test_ca_key_rsa[]; 82 extern const size_t mbedtls_test_ca_key_rsa_len; 83 extern const char mbedtls_test_ca_pwd_rsa[]; 84 extern const size_t mbedtls_test_ca_pwd_rsa_len; 85 extern const char mbedtls_test_srv_crt_rsa[]; 86 extern const size_t mbedtls_test_srv_crt_rsa_len; 87 extern const char mbedtls_test_srv_key_rsa[]; 88 extern const size_t mbedtls_test_srv_key_rsa_len; 89 extern const char mbedtls_test_cli_crt_rsa[]; 90 extern const size_t mbedtls_test_cli_crt_rsa_len; 91 extern const char mbedtls_test_cli_key_rsa[]; 92 extern const size_t mbedtls_test_cli_key_rsa_len; 93 #endif 94 95 #ifdef __cplusplus 96 } 97 #endif 98 99 #endif /* certs.h */ 100