[398] | 1 | /**
|
---|
| 2 | * \file certs.h
|
---|
| 3 | *
|
---|
| 4 | * \brief Sample certificates and DHM parameters for testing
|
---|
| 5 | */
|
---|
| 6 | /*
|
---|
| 7 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
---|
| 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.
|
---|
| 21 | *
|
---|
| 22 | * This file is part of mbed TLS (https://tls.mbed.org)
|
---|
| 23 | */
|
---|
| 24 | #ifndef MBEDTLS_CERTS_H
|
---|
| 25 | #define MBEDTLS_CERTS_H
|
---|
| 26 |
|
---|
| 27 | #if !defined(MBEDTLS_CONFIG_FILE)
|
---|
| 28 | #include "config.h"
|
---|
| 29 | #else
|
---|
| 30 | #include MBEDTLS_CONFIG_FILE
|
---|
| 31 | #endif
|
---|
| 32 |
|
---|
| 33 | #include <stddef.h>
|
---|
| 34 |
|
---|
| 35 | #ifdef __cplusplus
|
---|
| 36 | extern "C" {
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
| 39 | #if defined(MBEDTLS_PEM_PARSE_C)
|
---|
| 40 | /* Concatenation of all CA certificates in PEM format if available */
|
---|
| 41 | extern const char mbedtls_test_cas_pem[];
|
---|
| 42 | extern const size_t mbedtls_test_cas_pem_len;
|
---|
| 43 | #endif
|
---|
| 44 |
|
---|
| 45 | /* List of all CA certificates, terminated by NULL */
|
---|
| 46 | extern const char * mbedtls_test_cas[];
|
---|
| 47 | extern const size_t mbedtls_test_cas_len[];
|
---|
| 48 |
|
---|
| 49 | /*
|
---|
| 50 | * Convenience for users who just want a certificate:
|
---|
| 51 | * RSA by default, or ECDSA if RSA is not available
|
---|
| 52 | */
|
---|
| 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;
|
---|
| 67 |
|
---|
| 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;
|
---|
| 83 | #endif
|
---|
| 84 |
|
---|
| 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;
|
---|
| 100 | #endif
|
---|
| 101 |
|
---|
| 102 | #ifdef __cplusplus
|
---|
| 103 | }
|
---|
| 104 | #endif
|
---|
| 105 |
|
---|
| 106 | #endif /* certs.h */
|
---|