mbed TLS library
Dependents: HTTPClient-SSL WS_SERVER
configs/config-ccm-psk-tls1_2.h@0:137634ff4186, 2015-06-11 (annotated)
- Committer:
- ansond
- Date:
- Thu Jun 11 03:27:03 2015 +0000
- Revision:
- 0:137634ff4186
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:137634ff4186 | 1 | /* |
ansond | 0:137634ff4186 | 2 | * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites |
ansond | 0:137634ff4186 | 3 | * Distinguishing features: |
ansond | 0:137634ff4186 | 4 | * - no bignum, no PK, no X509 |
ansond | 0:137634ff4186 | 5 | * - fully modern and secure (provided the pre-shared keys have high entropy) |
ansond | 0:137634ff4186 | 6 | * - very low record overhead with CCM-8 |
ansond | 0:137634ff4186 | 7 | * - optimized for low RAM usage |
ansond | 0:137634ff4186 | 8 | * |
ansond | 0:137634ff4186 | 9 | * See README.txt for usage instructions. |
ansond | 0:137634ff4186 | 10 | */ |
ansond | 0:137634ff4186 | 11 | #ifndef POLARSSL_CONFIG_H |
ansond | 0:137634ff4186 | 12 | #define POLARSSL_CONFIG_H |
ansond | 0:137634ff4186 | 13 | |
ansond | 0:137634ff4186 | 14 | /* System support */ |
ansond | 0:137634ff4186 | 15 | #define POLARSSL_HAVE_IPV6 /* Now mandatory for NET_C */ |
ansond | 0:137634ff4186 | 16 | //#define POLARSSL_HAVE_TIME /* Optionally used in Hello messages */ |
ansond | 0:137634ff4186 | 17 | /* Other POLARSSL_HAVE_XXX flags irrelevant for this configuration */ |
ansond | 0:137634ff4186 | 18 | |
ansond | 0:137634ff4186 | 19 | /* mbed TLS feature support */ |
ansond | 0:137634ff4186 | 20 | #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED |
ansond | 0:137634ff4186 | 21 | #define POLARSSL_SSL_PROTO_TLS1_2 |
ansond | 0:137634ff4186 | 22 | #define POLARSSL_SSL_DISABLE_RENEGOTIATION |
ansond | 0:137634ff4186 | 23 | |
ansond | 0:137634ff4186 | 24 | /* mbed TLS modules */ |
ansond | 0:137634ff4186 | 25 | #define POLARSSL_AES_C |
ansond | 0:137634ff4186 | 26 | #define POLARSSL_CCM_C |
ansond | 0:137634ff4186 | 27 | #define POLARSSL_CIPHER_C |
ansond | 0:137634ff4186 | 28 | #define POLARSSL_CTR_DRBG_C |
ansond | 0:137634ff4186 | 29 | #define POLARSSL_ENTROPY_C |
ansond | 0:137634ff4186 | 30 | #define POLARSSL_MD_C |
ansond | 0:137634ff4186 | 31 | #define POLARSSL_NET_C |
ansond | 0:137634ff4186 | 32 | #define POLARSSL_SHA256_C |
ansond | 0:137634ff4186 | 33 | #define POLARSSL_SSL_CLI_C |
ansond | 0:137634ff4186 | 34 | #define POLARSSL_SSL_SRV_C |
ansond | 0:137634ff4186 | 35 | #define POLARSSL_SSL_TLS_C |
ansond | 0:137634ff4186 | 36 | |
ansond | 0:137634ff4186 | 37 | /* Save RAM at the expense of ROM */ |
ansond | 0:137634ff4186 | 38 | #define POLARSSL_AES_ROM_TABLES |
ansond | 0:137634ff4186 | 39 | |
ansond | 0:137634ff4186 | 40 | /* Save some RAM by adjusting to your exact needs */ |
ansond | 0:137634ff4186 | 41 | #define POLARSSL_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */ |
ansond | 0:137634ff4186 | 42 | |
ansond | 0:137634ff4186 | 43 | /* |
ansond | 0:137634ff4186 | 44 | * You should adjust this to the exact number of sources you're using: default |
ansond | 0:137634ff4186 | 45 | * is the "platform_entropy_poll" source, but you may want to add other ones |
ansond | 0:137634ff4186 | 46 | * Minimum is 2 for the entropy test suite. |
ansond | 0:137634ff4186 | 47 | */ |
ansond | 0:137634ff4186 | 48 | #define ENTROPY_MAX_SOURCES 2 |
ansond | 0:137634ff4186 | 49 | |
ansond | 0:137634ff4186 | 50 | /* |
ansond | 0:137634ff4186 | 51 | * Use only CCM_8 ciphersuites, and |
ansond | 0:137634ff4186 | 52 | * save ROM and a few bytes of RAM by specifying our own ciphersuite list |
ansond | 0:137634ff4186 | 53 | */ |
ansond | 0:137634ff4186 | 54 | #define SSL_CIPHERSUITES \ |
ansond | 0:137634ff4186 | 55 | TLS_PSK_WITH_AES_256_CCM_8, \ |
ansond | 0:137634ff4186 | 56 | TLS_PSK_WITH_AES_128_CCM_8 |
ansond | 0:137634ff4186 | 57 | |
ansond | 0:137634ff4186 | 58 | /* |
ansond | 0:137634ff4186 | 59 | * Save RAM at the expense of interoperability: do this only if you control |
ansond | 0:137634ff4186 | 60 | * both ends of the connection! (See comments in "polarssl/ssl.h".) |
ansond | 0:137634ff4186 | 61 | * The optimal size here depends on the typical size of records. |
ansond | 0:137634ff4186 | 62 | */ |
ansond | 0:137634ff4186 | 63 | #define SSL_MAX_CONTENT_LEN 512 |
ansond | 0:137634ff4186 | 64 | |
ansond | 0:137634ff4186 | 65 | #include "check_config.h" |
ansond | 0:137634ff4186 | 66 | |
ansond | 0:137634ff4186 | 67 | #endif /* POLARSSL_CONFIG_H */ |
ansond | 0:137634ff4186 | 68 |