+++ /dev/null
---- a/src/mod_mbedtls.c
-+++ b/src/mod_mbedtls.c
-@@ -3431,6 +3431,9 @@ static const int suite_ECJPAKE[] = {
- #endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_AES_256[] = {
- /* All AES-256 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -3454,8 +3457,12 @@ static const int suite_AES_256[] = {
- #endif
- };
- #endif
-+#endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_CAMELLIA_256[] = {
- /* All CAMELLIA-256 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -3473,8 +3480,12 @@ static const int suite_CAMELLIA_256[] =
- #endif
- };
- #endif
-+#endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_ARIA_256[] = {
- /* All ARIA-256 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
-@@ -3497,8 +3508,12 @@ static const int suite_ARIA_256[] = {
- #endif
- };
- #endif
-+#endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_AES_128[] = {
- /* All AES-128 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -3522,8 +3537,12 @@ static const int suite_AES_128[] = {
- #endif
- };
- #endif
-+#endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_CAMELLIA_128[] = {
- /* All CAMELLIA-128 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -3541,8 +3560,12 @@ static const int suite_CAMELLIA_128[] =
- #endif
- };
- #endif
-+#endif
-
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- static const int suite_ARIA_128[] = {
- /* All ARIA-128 suites */
- #ifdef MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
-@@ -3565,6 +3588,7 @@ static const int suite_ARIA_128[] = {
- #endif
- };
- #endif
-+#endif
-
- #ifdef MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
- static const int suite_RSA_PSK[] = {
-@@ -4593,11 +4617,15 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_AES_256_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_AES_256,
- (int)(sizeof(suite_AES_256)/sizeof(*suite_AES_256)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: AES256 PSK suites */
- if (nlen == sizeof("AES256")-1) continue;
- }
-@@ -4610,11 +4638,15 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_AES_128_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_AES_128,
- (int)(sizeof(suite_AES_128)/sizeof(*suite_AES_128)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: AES128 PSK suites */
- continue;
- }
-@@ -4627,12 +4659,16 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_CAMELLIA_256_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_CAMELLIA_256,
- (int)(sizeof(suite_CAMELLIA_256)
- /sizeof(*suite_CAMELLIA_256)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: CAMELLIA256 PSK suites */
- if (nlen == sizeof("CAMELLIA256")-1) continue;
- }
-@@ -4645,12 +4681,16 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_CAMELLIA_128_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_CAMELLIA_128,
- (int)(sizeof(suite_CAMELLIA_128)
- /sizeof(*suite_CAMELLIA_128)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: CAMELLIA128 PSK suites */
- continue;
- }
-@@ -4663,11 +4703,15 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_ARIA_256_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_ARIA_256,
- (int)(sizeof(suite_ARIA_256)/sizeof(*suite_ARIA_256)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: ARIA256 PSK suites */
- if (nlen == sizeof("ARIA256")-1) continue;
- }
-@@ -4680,11 +4724,15 @@ mod_mbedtls_ssl_conf_ciphersuites (serve
- /sizeof(*suite_ARIA_128_ephemeral)));
- if (-1 == nids) return 0;
- #if MBEDTLS_VERSION_NUMBER < 0x04000000 /* mbedtls 4.0.0 */
-+ #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) \
-+ || defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
- nids = mod_mbedtls_ssl_append_ciphersuite(srv, ids, nids, idsz,
- suite_ARIA_128,
- (int)(sizeof(suite_ARIA_128)/sizeof(*suite_ARIA_128)));
- if (-1 == nids) return 0;
- #endif
-+ #endif
- /* XXX: not done: ARIA128 PSK suites */
- continue;
- }