No header include if no fusion
#include "picotls.h"
#include "picoquic_internal.h"
#include "picotls/openssl.h"
-#if !defined(_WINDOWS) || defined(_WINDOWS64)
+#if (!defined(_WINDOWS) || defined(_WINDOWS64) && !defined(PTLS_WITHOUT_FUSION))
#include "picotls/fusion.h"
#endif
#include "tls_api.h"
@@ -147,15 +147,13 @@ ptls_cipher_suite_t* picoquic_cipher_suites[] = {
#endif
NULL };
-#ifndef PTLS_WITHOUT_FUSION
-#if !defined(_WINDOWS) || defined(_WINDOWS64)
+#if (!defined(_WINDOWS) || defined(_WINDOWS64)) && !defined(PTLS_WITHOUT_FUSION)
/* Definition of fusion versions of AESGCM */
ptls_cipher_suite_t picoquic_fusion_aes128gcmsha256 = { PTLS_CIPHER_SUITE_AES_128_GCM_SHA256, &ptls_fusion_aes128gcm,
&ptls_openssl_sha256 };
ptls_cipher_suite_t picoquic_fusion_aes256gcmsha384 = { PTLS_CIPHER_SUITE_AES_256_GCM_SHA384, &ptls_fusion_aes256gcm,
&ptls_openssl_sha384 };
#endif
-#endif
/* Setting of cipher suites.
* By default, the code select the most performant functions from openssl or fusion.
@@ -170,8 +168,7 @@ static int picoquic_set_cipher_suite_list(ptls_cipher_suite_t** selected_suites,
{
int nb_suites = 0;
/* Check first if fusion is enabled */
-#ifndef PTLS_WITHOUT_FUSION
-#if !defined(_WINDOWS) || defined(_WINDOWS64)
+#if (!defined(_WINDOWS) || defined(_WINDOWS64)) && !defined(PTLS_WITHOUT_FUSION)
if (ptls_fusion_is_supported_by_cpu() && !use_low_memory) {
if (cipher_suite_id == 0 || cipher_suite_id == 128) {
selected_suites[nb_suites++] = &picoquic_fusion_aes128gcmsha256;
@@ -181,7 +178,6 @@ static int picoquic_set_cipher_suite_list(ptls_cipher_suite_t** selected_suites,
selected_suites[nb_suites++] = &picoquic_fusion_aes256gcmsha384;
}
}
-#endif
#endif
if (nb_suites == 0) {
/* Fallback to openssl if fusion is not supported */
