add --enable-des3 and build, no strnstr in tests
This commit is contained in:
parent
1628b6f83f
commit
6773287895
23
configure.ac
23
configure.ac
@ -529,6 +529,28 @@ fi
|
||||
AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"])
|
||||
|
||||
|
||||
# DES3
|
||||
AC_ARG_ENABLE([des3],
|
||||
[ --enable-des3 Enable DES3 (default: enabled)],
|
||||
[ ENABLED_DES3=$enableval ],
|
||||
[ ENABLED_DES3=yes ]
|
||||
)
|
||||
|
||||
if test "$ENABLED_DES3" = "no"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
|
||||
else
|
||||
# turn off DES3 if leanpsk on
|
||||
if test "$ENABLED_LEANPSK" = "yes"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
|
||||
ENABLED_DES3=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"])
|
||||
|
||||
|
||||
# ARC4
|
||||
AC_ARG_ENABLE([arc4],
|
||||
[ --enable-arc4 Enable ARC4 (default: enabled)],
|
||||
@ -1030,6 +1052,7 @@ echo " * AES: $ENABLED_AES"
|
||||
echo " * AES-NI: $ENABLED_AESNI"
|
||||
echo " * AES-GCM: $ENABLED_AESGCM"
|
||||
echo " * AES-CCM: $ENABLED_AESCCM"
|
||||
echo " * DES3: $ENABLED_DES3"
|
||||
echo " * Camellia: $ENABLED_CAMELLIA"
|
||||
echo " * MD5: $ENABLED_MD5"
|
||||
echo " * RIPEMD: $ENABLED_RIPEMD"
|
||||
|
@ -20,8 +20,7 @@ src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS)
|
||||
src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS)
|
||||
|
||||
if !BUILD_LEANPSK
|
||||
src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c \
|
||||
ctaocrypt/src/coding.c \
|
||||
src_libcyassl_la_SOURCES += ctaocrypt/src/coding.c \
|
||||
ctaocrypt/src/asn.c \
|
||||
ctaocrypt/src/dh.c \
|
||||
ctaocrypt/src/memory.c
|
||||
@ -35,6 +34,10 @@ if BUILD_AES
|
||||
src_libcyassl_la_SOURCES += ctaocrypt/src/aes.c
|
||||
endif
|
||||
|
||||
if BUILD_DES3
|
||||
src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c
|
||||
endif
|
||||
|
||||
if BUILD_SHA
|
||||
src_libcyassl_la_SOURCES += ctaocrypt/src/sha.c
|
||||
endif
|
||||
|
@ -48,7 +48,7 @@ CYASSL_CTX* cipherSuiteCtx = NULL;
|
||||
static int IsOldTlsVersion(const char* line)
|
||||
{
|
||||
const char* find = "-v ";
|
||||
char* begin = strnstr(line, find, MAX_COMMAND_SZ);
|
||||
char* begin = strstr(line, find);
|
||||
|
||||
if (begin) {
|
||||
int version = -1;
|
||||
@ -73,7 +73,7 @@ static int IsValidCipherSuite(const char* line, char* suite)
|
||||
int valid = 0;
|
||||
|
||||
const char* find = "-l ";
|
||||
char* begin = strnstr(line, find, MAX_COMMAND_SZ);
|
||||
char* begin = strstr(line, find);
|
||||
char* end;
|
||||
|
||||
suite[0] = '\0';
|
||||
@ -81,7 +81,7 @@ static int IsValidCipherSuite(const char* line, char* suite)
|
||||
if (begin) {
|
||||
begin += 3;
|
||||
|
||||
end = strnstr(begin, " ", MAX_COMMAND_SZ);
|
||||
end = strstr(begin, " ");
|
||||
|
||||
if (end) {
|
||||
long len = end - begin;
|
||||
|
Loading…
Reference in New Issue
Block a user