blob: 3844383b17d40558262f15a52868f19bc685296d [file] [log] [blame]
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +02001/*
2 * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +02003 * Distinguishing features:
4 * - no bignum, no PK, no X509
5 * - fully modern and secure (provided the pre-shared keys have high entropy)
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +02006 * - very low record overhead with CCM-8
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +02007 * - optimized for low RAM usage
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +02008 *
9 * See README.txt for usage instructions.
10 */
11#ifndef POLARSSL_CONFIG_H
12#define POLARSSL_CONFIG_H
13
14/* System support */
Manuel Pégourié-Gonnard0389b542014-06-24 22:22:50 +020015//#define POLARSSL_HAVE_IPV6 /* Optional */
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020016//#define POLARSSL_HAVE_TIME /* Optionally used in Hello messages */
Manuel Pégourié-Gonnard0389b542014-06-24 22:22:50 +020017/* Other POLARSSL_HAVE_XXX flags irrelevant for this configuration */
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020018
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +000019/* mbed TLS feature support */
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020020#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
21#define POLARSSL_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard86b29082014-11-06 02:28:34 +010022#define POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020023
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +000024/* mbed TLS modules */
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020025#define POLARSSL_AES_C
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020026#define POLARSSL_CCM_C
27#define POLARSSL_CIPHER_C
28#define POLARSSL_CTR_DRBG_C
29#define POLARSSL_ENTROPY_C
30#define POLARSSL_MD_C
31#define POLARSSL_NET_C
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020032#define POLARSSL_SHA256_C
33#define POLARSSL_SSL_CLI_C
34#define POLARSSL_SSL_SRV_C
35#define POLARSSL_SSL_TLS_C
36
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020037/* Save RAM at the expense of ROM */
38#define POLARSSL_AES_ROM_TABLES
39
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020040/* Save some RAM by adjusting to your exact needs */
41#define POLARSSL_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */
42
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020043/*
44 * You should adjust this to the exact number of sources you're using: default
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020045 * is the "platform_entropy_poll" source, but you may want to add other ones
46 * Minimum is 2 for the entropy test suite.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020047 */
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020048#define ENTROPY_MAX_SOURCES 2
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020049
50/*
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +020051 * Use only CCM_8 ciphersuites, and
52 * save ROM and a few bytes of RAM by specifying our own ciphersuite list
53 */
54#define SSL_CIPHERSUITES \
55 TLS_PSK_WITH_AES_256_CCM_8, \
56 TLS_PSK_WITH_AES_128_CCM_8
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020057
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +020058/*
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020059 * Save RAM at the expense of interoperability: do this only if you control
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000060 * both ends of the connection! (See comments in "mbedtls/ssl.h".)
Manuel Pégourié-Gonnarde38eb0b2014-06-24 17:30:05 +020061 * The optimal size here depends on the typical size of records.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020062 */
63#define SSL_MAX_CONTENT_LEN 512
64
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020065#include "check_config.h"
66
67#endif /* POLARSSL_CONFIG_H */