File tree Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Original file line number Diff line number Diff line change @@ -217,8 +217,7 @@ typedef enum {
217
217
#endif
218
218
219
219
/* Key exchanges that don't involve ephemeral keys */
220
- #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED ) || \
221
- defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED )
220
+ #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED )
222
221
#define MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED
223
222
#endif
224
223
@@ -244,8 +243,7 @@ typedef enum {
244
243
#endif
245
244
246
245
/* TLS 1.2 key exchanges using ECDH or ECDHE*/
247
- #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED ) || \
248
- defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED )
246
+ #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED )
249
247
#define MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED
250
248
#endif
251
249
Original file line number Diff line number Diff line change @@ -51,18 +51,6 @@ static inline int mbedtls_ssl_ciphersuite_no_pfs(const mbedtls_ssl_ciphersuite_t
51
51
}
52
52
#endif /* MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED */
53
53
54
- #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED )
55
- static inline int mbedtls_ssl_ciphersuite_uses_ecdh (const mbedtls_ssl_ciphersuite_t * info )
56
- {
57
- switch (info -> MBEDTLS_PRIVATE (key_exchange )) {
58
- return 1 ;
59
-
60
- default :
61
- return 0 ;
62
- }
63
- }
64
- #endif /* MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED */
65
-
66
54
static inline int mbedtls_ssl_ciphersuite_cert_req_allowed (const mbedtls_ssl_ciphersuite_t * info )
67
55
{
68
56
switch (info -> MBEDTLS_PRIVATE (key_exchange )) {
Original file line number Diff line number Diff line change 22
22
23
23
/* Define a local translating function to save code size by not using too many
24
24
* arguments in each translating place. */
25
- #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED ) || \
26
- defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED )
25
+ #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED )
27
26
static int local_err_translation (psa_status_t status )
28
27
{
29
28
return psa_status_to_mbedtls (status , psa_to_ssl_errors ,
@@ -2914,18 +2913,6 @@ static int ssl_write_server_key_exchange(mbedtls_ssl_context *ssl)
2914
2913
/* Extract static ECDH parameters and abort if ServerKeyExchange
2915
2914
* is not needed. */
2916
2915
if (mbedtls_ssl_ciphersuite_no_pfs (ciphersuite_info )) {
2917
- /* For suites involving ECDH, extract DH parameters
2918
- * from certificate at this point. */
2919
- #if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED )
2920
- if (mbedtls_ssl_ciphersuite_uses_ecdh (ciphersuite_info )) {
2921
- ret = ssl_get_ecdh_params_from_cert (ssl );
2922
- if (ret != 0 ) {
2923
- MBEDTLS_SSL_DEBUG_RET (1 , "ssl_get_ecdh_params_from_cert" , ret );
2924
- return ret ;
2925
- }
2926
- }
2927
- #endif /* MBEDTLS_KEY_EXCHANGE_SOME_ECDH_ENABLED */
2928
-
2929
2916
/* Key exchanges not involving ephemeral keys don't use
2930
2917
* ServerKeyExchange, so end here. */
2931
2918
MBEDTLS_SSL_DEBUG_MSG (2 , ("<= skip write server key exchange" ));
You can’t perform that action at this time.
0 commit comments