mirror of https://github.com/wolfSSL/wolfssl.git
enable-md4, enable-hkdf, disable-memory
parent
42f3ec73eb
commit
0dbdb35222
|
@ -680,9 +680,8 @@
|
|||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#if !defined(USE_CYASSL_MEMORY) && defined(USE_WOLFSSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY USE_WOLFSSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1499,9 +1499,9 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
|
|||
int ret;
|
||||
byte haveRSA = 0;
|
||||
byte havePSK = 0;
|
||||
#ifdef HAVE_ANON
|
||||
byte haveAnon = 0;
|
||||
#endif
|
||||
|
||||
(void) haveAnon;
|
||||
|
||||
ssl->ctx = ctx; /* only for passing to calls, options could change */
|
||||
ssl->version = ctx->method->version;
|
||||
|
@ -1888,11 +1888,7 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
|
|||
#endif
|
||||
#ifndef NO_CERTS
|
||||
/* make sure server has cert and key unless using PSK or Anon */
|
||||
if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK
|
||||
#ifdef HAVE_ANON
|
||||
&& !haveAnon
|
||||
#endif
|
||||
)
|
||||
if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK && !haveAnon)
|
||||
if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) {
|
||||
WOLFSSL_MSG("Server missing certificate and/or private key");
|
||||
return NO_PRIVATE_KEY;
|
||||
|
|
|
@ -218,8 +218,8 @@ int md4_test(void)
|
|||
wc_InitMd4(&md4);
|
||||
|
||||
for (i = 0; i < times; ++i) {
|
||||
Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen);
|
||||
Md4Final(&md4, hash);
|
||||
wc_Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen);
|
||||
wc_Md4Final(&md4, hash);
|
||||
|
||||
if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0)
|
||||
return -205 - i;
|
||||
|
|
|
@ -4409,7 +4409,7 @@ int hkdf_test(void)
|
|||
(void)info1;
|
||||
|
||||
#ifndef NO_SHA
|
||||
ret = HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L);
|
||||
ret = wc_HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L);
|
||||
if (ret != 0)
|
||||
return -2001;
|
||||
|
||||
|
@ -4418,7 +4418,7 @@ int hkdf_test(void)
|
|||
|
||||
#ifndef HAVE_FIPS
|
||||
/* fips can't have key size under 14 bytes, salt is key too */
|
||||
ret = HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L);
|
||||
ret = wc_HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L);
|
||||
if (ret != 0)
|
||||
return -2003;
|
||||
|
||||
|
@ -4428,7 +4428,7 @@ int hkdf_test(void)
|
|||
#endif /* NO_SHA */
|
||||
|
||||
#ifndef NO_SHA256
|
||||
ret = HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L);
|
||||
ret = wc_HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L);
|
||||
if (ret != 0)
|
||||
return -2005;
|
||||
|
||||
|
@ -4437,7 +4437,7 @@ int hkdf_test(void)
|
|||
|
||||
#ifndef HAVE_FIPS
|
||||
/* fips can't have key size under 14 bytes, salt is key too */
|
||||
ret = HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L);
|
||||
ret = wc_HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L);
|
||||
if (ret != 0)
|
||||
return -2007;
|
||||
|
||||
|
|
|
@ -1,57 +1,32 @@
|
|||
/* wolfssl options.h
|
||||
* generated from configure options
|
||||
/* options.h.in
|
||||
*
|
||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
* CyaSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CyaSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* default blank options for autoconf */
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef _POSIX_THREADS
|
||||
#define _POSIX_THREADS
|
||||
|
||||
#undef HAVE_THREAD_LS
|
||||
#define HAVE_THREAD_LS
|
||||
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
|
||||
#undef _THREAD_SAFE
|
||||
#define _THREAD_SAFE
|
||||
|
||||
#undef NO_DSA
|
||||
#define NO_DSA
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
#undef NO_DH
|
||||
#define NO_DH
|
||||
|
||||
#undef NO_MD4
|
||||
#define NO_MD4
|
||||
|
||||
#undef NO_PWDBASED
|
||||
#define NO_PWDBASED
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef HAVE_HASHDRBG
|
||||
#define HAVE_HASHDRBG
|
||||
|
||||
#undef USE_FAST_MATH
|
||||
#define USE_FAST_MATH
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue