1 /*
2  * Simple program to test that Mbed TLS builds correctly as an installable CMake
3  * package.
4  *
5  *  Copyright The Mbed TLS Contributors
6  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
7  */
8 
9 #define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
10 
11 #include "mbedtls/build_info.h"
12 
13 #include "mbedtls/platform.h"
14 
15 #include "mbedtls/version.h"
16 
17 /* The main reason to build this is for testing the CMake build, so the program
18  * doesn't need to do very much. It calls a single library function to ensure
19  * linkage works, but that is all. */
main()20 int main()
21 {
22     /* This version string is 18 bytes long, as advised by version.h. */
23     char version[18];
24 
25     mbedtls_version_get_string_full(version);
26 
27     mbedtls_printf("Built against %s\n", version);
28 
29     return 0;
30 }
31