Merge branch 'master' of github.com:wolfssl/wolfssl

This commit is contained in:
toddouska 2015-09-11 15:53:26 -07:00
commit de64092a70
12 changed files with 67 additions and 0 deletions

View File

@ -1931,6 +1931,20 @@ fi
AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"])
# wolfCrypt Only Build
AC_ARG_ENABLE([cryptonly],
[AS_HELP_STRING([--enable-cryptonly],[Enable wolfCrypt Only build (default: disabled)])],
[ENABLED_CRYPTONLY=$enableval],
[ENABLED_CRYPTONLY=no])
if test "$ENABLED_CRYPTONLY" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_ONLY"
fi
AM_CONDITIONAL([BUILD_CRYPTONLY], [test "x$ENABLED_CRYPTONLY" = "xyes"])
# set fastmath default
FASTMATH_DEFAULT=no
@ -2002,6 +2016,7 @@ AC_ARG_ENABLE([examples],
AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"])
AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
AS_IF([test "x$ENABLED_CRYPTONLY" = "xyes"], [ENABLED_EXAMPLES="no"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])
@ -2402,6 +2417,7 @@ echo " * RABBIT: $ENABLED_RABBIT"
echo " * CHACHA: $ENABLED_CHACHA"
echo " * Hash DRBG: $ENABLED_HASHDRBG"
echo " * PWDBASED: $ENABLED_PWDBASED"
echo " * wolfCrypt Only: $ENABLED_CRYPTONLY"
echo " * HKDF: $ENABLED_HKDF"
echo " * MD4: $ENABLED_MD4"
echo " * PSK: $ENABLED_PSK"

View File

@ -27,6 +27,7 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#ifdef HAVE_CRL
#include <wolfssl/internal.h>
@ -806,3 +807,4 @@ int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
#endif /* NO_FILESYSTEM */
#endif /* HAVE_CRL */
#endif /* !WOLFCRYPT_ONLY */

View File

@ -205,6 +205,7 @@ if BUILD_SRP
src_libwolfssl_la_SOURCES += wolfcrypt/src/srp.c
endif
if !BUILD_CRYPTONLY
# ssl files
src_libwolfssl_la_SOURCES += \
src/internal.c \
@ -224,3 +225,5 @@ endif
if BUILD_SNIFFER
src_libwolfssl_la_SOURCES += src/sniffer.c
endif
endif # !BUILD_CRYPTONLY

View File

@ -26,6 +26,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#include <wolfssl/internal.h>
#include <wolfssl/error-ssl.h>
#include <wolfssl/wolfcrypt/asn.h>
@ -15596,3 +15598,4 @@ int DoSessionTicket(WOLFSSL* ssl,
}
#endif /* HAVE_STUNNEL */
#endif /* NO_WOLFSSL_SERVER */
#endif /* WOLFCRYPT_ONLY */

View File

@ -26,6 +26,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#ifdef _WIN32_WCE
/* On WinCE winsock2.h must be included before windows.h for socket stuff */
#include <winsock2.h>
@ -1161,4 +1163,5 @@ void wolfSSL_SetIO_NetX(WOLFSSL* ssl, NX_TCP_SOCKET* nxSocket, ULONG waitOption)
}
#endif /* HAVE_NETX */
#endif /* WOLFCRYPT_ONLY */

View File

@ -27,6 +27,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#include <wolfssl/internal.h>
#include <wolfssl/error-ssl.h>
#if defined(SHOW_SECRETS) || defined(CHACHA_AEAD_TEST)
@ -2779,3 +2781,5 @@ int MakeMasterSecret(WOLFSSL* ssl)
#endif
}
#endif /* WOLFCRYPT_ONLY */

View File

@ -27,6 +27,7 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#ifdef HAVE_OCSP
#include <wolfssl/error-ssl.h>
@ -300,4 +301,5 @@ int CheckCertOCSP(WOLFSSL_OCSP* ocsp, DecodedCert* cert)
#endif /* HAVE_OCSP */
#endif /* WOLFCRYPT_ONLY */

View File

@ -25,6 +25,7 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#ifdef WOLFSSL_SNIFFER
#include <assert.h>
@ -3038,3 +3039,4 @@ int ssl_GetSessionStats(unsigned int* active, unsigned int* total,
#endif /* WOLFSSL_SNIFFER */
#endif /* WOLFCRYPT_ONLY */

View File

@ -25,6 +25,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
@ -16861,4 +16863,5 @@ int wolfSSL_ED25519_verify(const unsigned char *msg, unsigned int msgSz,
}
#endif /* OPENSSL_EXTRA && HAVE_ED25519 */
#endif /* WOLFCRYPT_ONLY */

View File

@ -26,6 +26,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFCRYPT_ONLY
#include <wolfssl/ssl.h>
#include <wolfssl/internal.h>
#include <wolfssl/error-ssl.h>
@ -3507,3 +3509,4 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte isRequest,
#endif /* NO_WOLFSSL_SERVER */
#endif /* NO_TLS */
#endif /* WOLFCRYPT_ONLY */

View File

@ -4587,6 +4587,28 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
#endif
#ifdef WOLFCRYPT_ONLY
/* dummy functions, not using wolfSSL so don't need actual ones */
Signer* GetCA(void* signers, byte* hash)
{
(void)hash;
return (Signer*)signers;
}
#ifndef NO_SKID
Signer* GetCAByName(void* signers, byte* hash)
{
(void)hash;
return (Signer*)signers;
}
#endif /* NO_SKID */
#endif /* WOLFCRYPT_ONLY */
int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
{
word32 confirmOID;

View File

@ -1,6 +1,10 @@
# vim:ft=automake
# All paths should be given relative to the root
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
if BUILD_CRYPTONLY
check_PROGRAMS+= wolfcrypt/test/testwolfcrypt
endif
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la