mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-06-25 00:11:36 +02:00
Fixes issue with cert gen, no malloc and crypto callback causing wolfssl/wolfcrypt/asn.h:1375:18: error: use of undeclared identifier 'WC_MAX_DIGEST_SIZE
. Fixed netcat issue in openssl.test causing server open check to fail on some platforms. Fixed clang-tidy report in benchmark.c where XFTELL could return negative (error) and wasn't handled.
This commit is contained in:
@ -987,6 +987,7 @@ __SDCC_VERSION_MINOR
|
||||
__SDCC_VERSION_PATCH
|
||||
__SIZEOF_INT128__
|
||||
__SIZEOF_LONG_LONG__
|
||||
__STDC_NO_ATOMICS__
|
||||
__STDC_VERSION__
|
||||
__STDC__
|
||||
__STM32__
|
||||
@ -1042,4 +1043,3 @@ ssize_t
|
||||
sun
|
||||
versal
|
||||
wc_Tls13_HKDF_Expand_Label
|
||||
__STDC_NO_ATOMICS__
|
||||
|
@ -280,7 +280,7 @@ check_server_ready() {
|
||||
server_ready=0
|
||||
while [ "$counter" -lt 20 ]; do
|
||||
echo -e "waiting for $server_name ready..."
|
||||
echo -e Checking | nc -w 5 localhost $server_port
|
||||
echo -e Checking | nc -4 -w 1 -z localhost $server_port
|
||||
nc_result=$?
|
||||
if [ $nc_result = 0 ]
|
||||
then
|
||||
|
@ -3136,7 +3136,7 @@ static void* benchmarks_do(void* args)
|
||||
}
|
||||
|
||||
bench_buf_size = XFTELL(file);
|
||||
if(XFSEEK(file, 0, XSEEK_SET) != 0) {
|
||||
if(bench_buf_size < 0 || XFSEEK(file, 0, XSEEK_SET) != 0) {
|
||||
XFCLOSE(file);
|
||||
goto exit;
|
||||
}
|
||||
@ -3182,7 +3182,7 @@ static void* benchmarks_do(void* args)
|
||||
}
|
||||
|
||||
bench_buf_size = XFTELL(file);
|
||||
if(XFSEEK(file, 0, XSEEK_SET) != 0) {
|
||||
if (bench_buf_size < 0 || XFSEEK(file, 0, XSEEK_SET) != 0) {
|
||||
XFCLOSE(file);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
#if defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512)
|
||||
#include <wolfssl/wolfcrypt/sha512.h>
|
||||
#endif
|
||||
#ifdef HAVE_BLAKE2
|
||||
#if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
|
||||
#include <wolfssl/wolfcrypt/blake2.h>
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA3
|
||||
@ -52,9 +52,6 @@
|
||||
#ifdef WOLFSSL_MD2
|
||||
#include <wolfssl/wolfcrypt/md2.h>
|
||||
#endif
|
||||
#if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
|
||||
#include <wolfssl/wolfcrypt/blake2.h>
|
||||
#endif
|
||||
#ifdef WOLFSSL_SM3
|
||||
#include <wolfssl/wolfcrypt/sm3.h>
|
||||
#endif
|
||||
@ -122,11 +119,15 @@ typedef struct {
|
||||
} wc_HashAlg;
|
||||
#endif /* !NO_HASH_WRAPPER */
|
||||
|
||||
|
||||
/* Find largest possible digest size
|
||||
Note if this gets up to the size of 80 or over check smallstack build */
|
||||
#undef WC_MAX_DIGEST_SIZE
|
||||
#undef WC_MAX_BLOCK_SIZE
|
||||
#if defined(WOLFSSL_SHA3)
|
||||
/* note: SHA3-224 has the largest block size */
|
||||
#define WC_MAX_DIGEST_SIZE WC_SHA3_512_DIGEST_SIZE
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA3_224_BLOCK_SIZE /* 224 is the largest block size */
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA3_224_BLOCK_SIZE
|
||||
#elif defined(WOLFSSL_SHA512)
|
||||
#define WC_MAX_DIGEST_SIZE WC_SHA512_DIGEST_SIZE
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA512_BLOCK_SIZE
|
||||
|
@ -2063,10 +2063,14 @@ enum Max_ASN {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef WC_MAX_DIGEST_SIZE
|
||||
#define WC_MAX_DIGEST_SIZE 64
|
||||
#endif
|
||||
#ifndef WC_MAX_DIGEST_SIZE
|
||||
#define WC_MAX_BLOCK_SIZE 128
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_CERT_GEN
|
||||
#ifdef WOLFSSL_NO_MALLOC
|
||||
#include "wolfssl/wolfcrypt/hash.h" /* for max sizes */
|
||||
#endif
|
||||
/* Used in asn.c MakeSignature for ECC and RSA non-blocking/async */
|
||||
enum CertSignState {
|
||||
CERTSIGN_STATE_BEGIN,
|
||||
|
Reference in New Issue
Block a user