Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 1 | /* |
Andrzej Kurek | 89c048c | 2018-03-16 07:37:44 -0400 | [diff] [blame] | 2 | * This program is a dummy C++ program to ensure Mbed TLS library header files |
| 3 | * can be included and built with a C++ compiler. |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 4 | * |
Bence Szépkúti | a2947ac | 2020-08-19 16:37:36 +0200 | [diff] [blame] | 5 | * Copyright The Mbed TLS Contributors |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 7 | * |
| 8 | * This file is provided under the Apache License 2.0, or the |
| 9 | * GNU General Public License v2.0 or later. |
| 10 | * |
| 11 | * ********** |
| 12 | * Apache License 2.0: |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 13 | * |
| 14 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 15 | * not use this file except in compliance with the License. |
| 16 | * You may obtain a copy of the License at |
| 17 | * |
| 18 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 19 | * |
| 20 | * Unless required by applicable law or agreed to in writing, software |
| 21 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 23 | * See the License for the specific language governing permissions and |
| 24 | * limitations under the License. |
| 25 | * |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 26 | * ********** |
| 27 | * |
| 28 | * ********** |
| 29 | * GNU General Public License v2.0 or later: |
| 30 | * |
| 31 | * This program is free software; you can redistribute it and/or modify |
| 32 | * it under the terms of the GNU General Public License as published by |
| 33 | * the Free Software Foundation; either version 2 of the License, or |
| 34 | * (at your option) any later version. |
| 35 | * |
| 36 | * This program is distributed in the hope that it will be useful, |
| 37 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 38 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 39 | * GNU General Public License for more details. |
| 40 | * |
| 41 | * You should have received a copy of the GNU General Public License along |
| 42 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 43 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 44 | * |
| 45 | * ********** |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 46 | */ |
| 47 | |
| 48 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 49 | #include "mbedtls/config.h" |
| 50 | #else |
| 51 | #include MBEDTLS_CONFIG_FILE |
| 52 | #endif |
| 53 | |
| 54 | #include "mbedtls/aes.h" |
| 55 | #include "mbedtls/aesni.h" |
| 56 | #include "mbedtls/arc4.h" |
| 57 | #include "mbedtls/aria.h" |
| 58 | #include "mbedtls/asn1.h" |
| 59 | #include "mbedtls/asn1write.h" |
| 60 | #include "mbedtls/base64.h" |
| 61 | #include "mbedtls/bignum.h" |
| 62 | #include "mbedtls/blowfish.h" |
| 63 | #include "mbedtls/bn_mul.h" |
| 64 | #include "mbedtls/camellia.h" |
| 65 | #include "mbedtls/ccm.h" |
| 66 | #include "mbedtls/certs.h" |
| 67 | #include "mbedtls/chacha20.h" |
| 68 | #include "mbedtls/chachapoly.h" |
Andrzej Kurek | 991f9fe | 2018-07-02 09:08:21 -0400 | [diff] [blame] | 69 | #include "mbedtls/check_config.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 70 | #include "mbedtls/cipher.h" |
| 71 | #include "mbedtls/cipher_internal.h" |
| 72 | #include "mbedtls/cmac.h" |
| 73 | #include "mbedtls/compat-1.3.h" |
| 74 | #include "mbedtls/ctr_drbg.h" |
| 75 | #include "mbedtls/debug.h" |
| 76 | #include "mbedtls/des.h" |
| 77 | #include "mbedtls/dhm.h" |
| 78 | #include "mbedtls/ecdh.h" |
| 79 | #include "mbedtls/ecdsa.h" |
| 80 | #include "mbedtls/ecjpake.h" |
| 81 | #include "mbedtls/ecp.h" |
| 82 | #include "mbedtls/ecp_internal.h" |
| 83 | #include "mbedtls/entropy.h" |
| 84 | #include "mbedtls/entropy_poll.h" |
| 85 | #include "mbedtls/error.h" |
| 86 | #include "mbedtls/gcm.h" |
| 87 | #include "mbedtls/havege.h" |
| 88 | #include "mbedtls/hkdf.h" |
| 89 | #include "mbedtls/hmac_drbg.h" |
Andrzej Kurek | 991f9fe | 2018-07-02 09:08:21 -0400 | [diff] [blame] | 90 | #include "mbedtls/md.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 91 | #include "mbedtls/md2.h" |
| 92 | #include "mbedtls/md4.h" |
| 93 | #include "mbedtls/md5.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 94 | #include "mbedtls/md_internal.h" |
| 95 | #include "mbedtls/net.h" |
| 96 | #include "mbedtls/net_sockets.h" |
Jaeden Amero | 4ed32d0 | 2018-07-24 16:51:09 +0100 | [diff] [blame] | 97 | #include "mbedtls/nist_kw.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 98 | #include "mbedtls/oid.h" |
| 99 | #include "mbedtls/padlock.h" |
| 100 | #include "mbedtls/pem.h" |
Andrzej Kurek | 991f9fe | 2018-07-02 09:08:21 -0400 | [diff] [blame] | 101 | #include "mbedtls/pk.h" |
| 102 | #include "mbedtls/pk_internal.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 103 | #include "mbedtls/pkcs11.h" |
| 104 | #include "mbedtls/pkcs12.h" |
| 105 | #include "mbedtls/pkcs5.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 106 | #include "mbedtls/platform_time.h" |
| 107 | #include "mbedtls/platform_util.h" |
| 108 | #include "mbedtls/poly1305.h" |
| 109 | #include "mbedtls/ripemd160.h" |
| 110 | #include "mbedtls/rsa.h" |
| 111 | #include "mbedtls/rsa_internal.h" |
| 112 | #include "mbedtls/sha1.h" |
| 113 | #include "mbedtls/sha256.h" |
| 114 | #include "mbedtls/sha512.h" |
Andrzej Kurek | 991f9fe | 2018-07-02 09:08:21 -0400 | [diff] [blame] | 115 | #include "mbedtls/ssl.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 116 | #include "mbedtls/ssl_cache.h" |
| 117 | #include "mbedtls/ssl_ciphersuites.h" |
| 118 | #include "mbedtls/ssl_cookie.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 119 | #include "mbedtls/ssl_internal.h" |
| 120 | #include "mbedtls/ssl_ticket.h" |
| 121 | #include "mbedtls/threading.h" |
| 122 | #include "mbedtls/timing.h" |
| 123 | #include "mbedtls/version.h" |
Andrzej Kurek | 991f9fe | 2018-07-02 09:08:21 -0400 | [diff] [blame] | 124 | #include "mbedtls/x509.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 125 | #include "mbedtls/x509_crl.h" |
| 126 | #include "mbedtls/x509_crt.h" |
| 127 | #include "mbedtls/x509_csr.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 128 | #include "mbedtls/xtea.h" |
| 129 | |
| 130 | #if defined(MBEDTLS_PLATFORM_C) |
| 131 | #include "mbedtls/platform.h" |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 132 | #endif |
| 133 | |
| 134 | #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) |
| 135 | #include "mbedtls/memory_buffer_alloc.h" |
| 136 | #endif |
| 137 | |
Andrzej Kurek | 89c048c | 2018-03-16 07:37:44 -0400 | [diff] [blame] | 138 | int main() |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 139 | { |
Andrzej Kurek | 89c048c | 2018-03-16 07:37:44 -0400 | [diff] [blame] | 140 | mbedtls_platform_context *ctx = NULL; |
| 141 | mbedtls_platform_setup(ctx); |
| 142 | mbedtls_printf("CPP Build test\n"); |
| 143 | mbedtls_platform_teardown(ctx); |
Andrzej Kurek | 40741f8 | 2018-03-14 17:24:01 -0400 | [diff] [blame] | 144 | } |