blob: c80c912ed8010d728014d69241141ab46522dac2 [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 */
16//#define POLARSSL_HAVE_TIME /* Optionnaly used in Hello messages */
17/* 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
39/*
40 * You should adjust this to the exact number of sources you're using: default
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020041 * is the "platform_entropy_poll" source, but you may want to add other ones
42 * Minimum is 2 for the entropy test suite.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020043 */
Manuel Pégourié-Gonnard66e20c62014-06-24 17:47:40 +020044#define ENTROPY_MAX_SOURCES 2
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020045
46/*
Manuel Pégourié-Gonnardcc10f4d2014-06-30 19:22:44 +020047 * Use only CCM_8 ciphersuites, and
48 * save ROM and a few bytes of RAM by specifying our own ciphersuite list
49 */
50#define SSL_CIPHERSUITES \
51 TLS_PSK_WITH_AES_256_CCM_8, \
52 TLS_PSK_WITH_AES_128_CCM_8
53/*
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020054 * Save RAM at the expense of interoperability: do this only if you control
55 * both ends of the connection! (See coments in "polarssl/ssl.h".)
Manuel Pégourié-Gonnarde38eb0b2014-06-24 17:30:05 +020056 * The optimal size here depends on the typical size of records.
Manuel Pégourié-Gonnard0ac844c2014-06-24 16:30:49 +020057 */
58#define SSL_MAX_CONTENT_LEN 512
59
Manuel Pégourié-Gonnard1a74a262014-06-24 15:51:32 +020060#include "check_config.h"
61
62#endif /* POLARSSL_CONFIG_H */