diff --git a/configure.in b/configure.in index e2f4b4469..b93fa7447 100644 --- a/configure.in +++ b/configure.in @@ -18,6 +18,7 @@ AC_PROG_CC_C_O AM_PROG_AS AC_PROG_INSTALL AC_LIBTOOL_WIN32_DLL +AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PREFIX_DEFAULT(/usr/local/cyassl) @@ -66,7 +67,7 @@ then # if you only want server or client you can define NO_CYASSL_SERVER or # NO_CYASSL_CLIENT but then some of the examples and testsuite won't build # note that TLS needs HMAC - CFLAGS="-DNO_TLS -DNO_HMAC -DNO_AES -DNO_DES3 -DNO_SHA256 -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH $CFLAGS" + CFLAGS="-DNO_TLS -DNO_HMAC -DNO_AES -DNO_DES3 -DNO_SHA256 -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED $CFLAGS" fi diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index 9a76e3d87..14896411b 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -518,6 +518,8 @@ int ToTraditional(byte* input, word32 sz) } +#ifndef NO_PWDBASED + /* Check To see if PKCS version algo is supported, set id if it is return 0 < 0 on error */ static int CheckAlgo(int first, int second, int* id, int* version) @@ -652,6 +654,7 @@ static int DecryptKey(const char* password, int passwordSz, byte* salt, return ret; switch (decryptionType) { +#ifndef NO_DES3 case DES_TYPE: { Des dec; @@ -675,7 +678,7 @@ static int DecryptKey(const char* password, int passwordSz, byte* salt, Des3_CbcDecrypt(&dec, input, input, length); break; } - +#endif case RC4_TYPE: { Arc4 dec; @@ -795,6 +798,8 @@ int ToTraditionalEnc(byte* input, word32 sz,const char* password,int passwordSz) return ToTraditional(input, length); } +#endif /* NO_PWDBASED */ + int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, word32 inSz) diff --git a/include/cyassl_int.h b/include/cyassl_int.h index fba5765c5..a84f9d01f 100644 --- a/include/cyassl_int.h +++ b/include/cyassl_int.h @@ -79,6 +79,10 @@ #endif #endif +#ifdef NO_SHA256 + #define SHA256_DIGEST_SIZE 32 +#endif + #ifdef __cplusplus extern "C" { #endif