@@ -1037,26 +1037,31 @@ const WOLFSSL_EVP_CIPHER* wolfSSL_quic_get_hp(WOLFSSL* ssl)
10371037 }
10381038
10391039 switch (cipher -> cipherSuite ) {
1040- #if !defined(NO_AES ) && defined(HAVE_AESGCM )
1040+ #if !defined(NO_AES ) && defined(HAVE_AESGCM ) && defined( WOLFSSL_AES_COUNTER )
10411041 /* This has to be CTR even though the spec says that ECB is used for
10421042 * mask generation. ngtcp2_crypto_hp_mask uses a hack where they pass
10431043 * in the "ECB" input as the IV for the CTR cipher and then the input
10441044 * is just a cleared buffer. They do this so that the EVP
10451045 * init-update-final cycle can be used without the padding that is added
10461046 * for EVP_aes_(128|256)_ecb. */
1047+ #if defined(WOLFSSL_AES_128 )
10471048 case TLS_AES_128_GCM_SHA256 :
10481049 evp_cipher = wolfSSL_EVP_aes_128_ctr ();
10491050 break ;
1051+ #endif
1052+ #if defined(WOLFSSL_AES_256 )
10501053 case TLS_AES_256_GCM_SHA384 :
10511054 evp_cipher = wolfSSL_EVP_aes_256_ctr ();
10521055 break ;
10531056#endif
1057+ #endif
10541058#if defined(HAVE_CHACHA ) && defined(HAVE_POLY1305 )
10551059 case TLS_CHACHA20_POLY1305_SHA256 :
10561060 evp_cipher = wolfSSL_EVP_chacha20 ();
10571061 break ;
10581062#endif
1059- #if !defined(NO_AES ) && defined(HAVE_AESCCM ) && defined(WOLFSSL_AES_128 )
1063+ #if !defined(NO_AES ) && defined(HAVE_AESCCM ) && defined(WOLFSSL_AES_128 ) && \
1064+ defined(WOLFSSL_AES_COUNTER )
10601065 /* This has to be CTR. See comment above. */
10611066 case TLS_AES_128_CCM_SHA256 :
10621067 evp_cipher = wolfSSL_EVP_aes_128_ctr ();
0 commit comments