blob: 1da9f6a6bf646194a79c580082ee45fdef86d2bb [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
19/* PolarSSL feature support */
20#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
21#define POLARSSL_SSL_PROTO_TLS1_2
22
23/* PolarSSL modules */
24#define POLARSSL_AES_C
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020025#define POLARSSL_CCM_C
26#define POLARSSL_CIPHER_C
27#define POLARSSL_CTR_DRBG_C
28#define POLARSSL_ENTROPY_C
29#define POLARSSL_MD_C
30#define POLARSSL_NET_C
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020031#define POLARSSL_SHA256_C
32#define POLARSSL_SSL_CLI_C
33#define POLARSSL_SSL_SRV_C
34#define POLARSSL_SSL_TLS_C
35
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020036/* Save RAM at the expense of ROM */
37#define POLARSSL_AES_ROM_TABLES
38
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020039/* Save some RAM by adjusting to your exact needs */
40#define POLARSSL_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */
41
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020042/*
43 * You should adjust this to the exact number of sources you're using: default
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020044 * is the "platform_entropy_poll" source, but you may want to add other ones
45 * Minimum is 2 for the entropy test suite.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020046 */
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020047#define ENTROPY_MAX_SOURCES 2
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020048
49/*
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +020050 * Use only CCM_8 ciphersuites, and
51 * save ROM and a few bytes of RAM by specifying our own ciphersuite list
52 */
53#define SSL_CIPHERSUITES \
54 TLS_PSK_WITH_AES_256_CCM_8, \
55 TLS_PSK_WITH_AES_128_CCM_8
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020056
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +020057/*
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020058 * Save RAM at the expense of interoperability: do this only if you control
Manuel Pégourié-Gonnardac7dd332014-07-03 16:17:59 +020059 * both ends of the connection! (See comments in "polarssl/ssl.h".)
Manuel Pégourié-Gonnarde38eb0b2014-06-24 17:30:05 +020060 * The optimal size here depends on the typical size of records.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020061 */
62#define SSL_MAX_CONTENT_LEN 512
63
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020064#include "check_config.h"
65
66#endif /* POLARSSL_CONFIG_H */