diff --git a/configure.ac b/configure.ac index ce52c8778..51ce9a164 100644 --- a/configure.ac +++ b/configure.ac @@ -995,7 +995,7 @@ AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"]) AC_ARG_ENABLE([arc4], [ --enable-arc4 Enable ARC4 (default: enabled)], [ ENABLED_ARC4=$enableval ], - [ ENABLED_ARC4=yes ] + [ ENABLED_ARC4=no ] ) if test "$ENABLED_ARC4" = "no" diff --git a/src/ssl.c b/src/ssl.c index 200471912..133d637e7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -7675,6 +7675,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl) } } #endif /* NO_DES3 */ +#ifndef NO_RC4 else if (ctx->cipherType == ARC4_TYPE || (type && XSTRNCMP(type, "ARC4", 4) == 0)) { WOLFSSL_MSG("ARC4"); @@ -7684,6 +7685,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl) if (key) wc_Arc4SetKey(&ctx->cipher.arc4, key, ctx->keyLen); } +#endif /* NO_RC4 */ else if (ctx->cipherType == NULL_CIPHER_TYPE || (type && XSTRNCMP(type, "NULL", 4) == 0)) { WOLFSSL_MSG("NULL cipher"); @@ -7779,9 +7781,11 @@ int wolfSSL_set_compression(WOLFSSL* ssl) break; #endif +#ifndef NO_RC4 case ARC4_TYPE : wc_Arc4Process(&ctx->cipher.arc4, dst, src, len); break; +#endif case NULL_CIPHER_TYPE : XMEMCPY(dst, src, len); diff --git a/wolfcrypt/src/arc4.c b/wolfcrypt/src/arc4.c index 0c22edbb7..21ed2e79d 100644 --- a/wolfcrypt/src/arc4.c +++ b/wolfcrypt/src/arc4.c @@ -174,5 +174,5 @@ static void wc_Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in, #endif /* HAVE_CAVIUM */ -#endif /* NO_ARC4 */ +#endif /* NO_RC4 */