diff options
author | Sylvain Zimmer <sylvain@sylvainzimmer.com> | 2024-06-05 11:41:38 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-07-02 13:19:17 +1000 |
commit | 838794ebccb0536606bc8e67fda2be5a47c2dffd (patch) | |
tree | aa2f9087c5f2ef17ae792ec65793cddb3643e22f /extmod/mbedtls | |
parent | 57008a1e69166bc55c315a54f966694031be83f5 (diff) | |
download | micropython-838794ebccb0536606bc8e67fda2be5a47c2dffd.tar.gz micropython-838794ebccb0536606bc8e67fda2be5a47c2dffd.zip |
extmod/mbedtls: Enable GCM and ECDHE-RSA in common mbedtls config.
Enable support for cipher suites like
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, as suggested in
https://github.com/micropython/micropython/issues/14204#issuecomment-2024366349
and https://github.com/micropython/micropython/issues/10485#issuecomment-1396426824
Tests have been run on the top 500 domains from moz.com. Without this
patch, 155 out of 500 fail to connect because of TLS issues. This patch
fixes them all. And it seems all existing mbedtls flags are needed to get
good coverage of those top 500 domains.
The `ssl_poll.py` test has the cipher bits increased from 512 to 1024 in
its test key/cert so that it can work with ECDHE-RSA which is now the
chosen cipher.
Signed-off-by: Sylvain Zimmer <sylvain@sylvainzimmer.com>
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/mbedtls')
-rw-r--r-- | extmod/mbedtls/mbedtls_config_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extmod/mbedtls/mbedtls_config_common.h b/extmod/mbedtls/mbedtls_config_common.h index db1562f279..4028bdf56d 100644 --- a/extmod/mbedtls/mbedtls_config_common.h +++ b/extmod/mbedtls/mbedtls_config_common.h @@ -46,6 +46,7 @@ #define MBEDTLS_ECP_DP_SECP256K1_ENABLED #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED +#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED #define MBEDTLS_CAN_ECDH #define MBEDTLS_PK_CAN_ECDSA_SIGN #define MBEDTLS_PKCS1_V15 @@ -72,6 +73,7 @@ #define MBEDTLS_ECP_C #define MBEDTLS_ENTROPY_C #define MBEDTLS_ERROR_C +#define MBEDTLS_GCM_C #define MBEDTLS_MD_C #define MBEDTLS_MD5_C #define MBEDTLS_OID_C |