Manuel Pégourié-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites |
Manuel Pégourié-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 3 | * 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é-Gonnard | cc10f4d | 2014-06-30 19:22:44 +0200 | [diff] [blame^] | 6 | * - very low record overhead with CCM-8 |
Manuel Pégourié-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 7 | * - optimized for low RAM usage |
Manuel Pégourié-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 8 | * |
| 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é-Gonnard | 0389b54 | 2014-06-24 22:22:50 +0200 | [diff] [blame] | 15 | //#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é-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 18 | |
| 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é-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 25 | #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é-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 31 | #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é-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 36 | /* 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é-Gonnard | 66e20c6 | 2014-06-24 17:47:40 +0200 | [diff] [blame] | 41 | * 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é-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 43 | */ |
Manuel Pégourié-Gonnard | 66e20c6 | 2014-06-24 17:47:40 +0200 | [diff] [blame] | 44 | #define ENTROPY_MAX_SOURCES 2 |
Manuel Pégourié-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 45 | |
| 46 | /* |
Manuel Pégourié-Gonnard | cc10f4d | 2014-06-30 19:22:44 +0200 | [diff] [blame^] | 47 | * 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é-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 54 | * 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é-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 56 | * The optimal size here depends on the typical size of records. |
Manuel Pégourié-Gonnard | 0ac844c | 2014-06-24 16:30:49 +0200 | [diff] [blame] | 57 | */ |
| 58 | #define SSL_MAX_CONTENT_LEN 512 |
| 59 | |
Manuel Pégourié-Gonnard | 1a74a26 | 2014-06-24 15:51:32 +0200 | [diff] [blame] | 60 | #include "check_config.h" |
| 61 | |
| 62 | #endif /* POLARSSL_CONFIG_H */ |