Skip to content

Commit fc1d281

Browse files
committed
Green Hills compiler fixes
internal.c: Move non-enumeration value out of switch. ssl.c: Only declare globalRNGMutex when required. x509.c: initialize ret armv8-aes.c, armv8-chacha.c: fix branch instructions armv8-mlkem*: ensure only required constants are input operands and move constants closer to first use. armv8-poly1305.c: remove POLY1305_BLOCK_SIZE from input operands. armv8-sha3-asm_c.c, armv8-sha512-asm_c.c: use constraint ':' instead of 'S'. armv8-sha512.c: initialize initfp. Is always used.
1 parent f8bb889 commit fc1d281

11 files changed

Lines changed: 377 additions & 584 deletions

File tree

src/internal.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26488,7 +26488,7 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
2648826488
return "peer ip address mismatch";
2648926489

2649026490
case WANT_READ :
26491-
case -WOLFSSL_ERROR_WANT_READ :
26491+
case WOLFSSL_ERROR_WANT_READ_E :
2649226492
return "non-blocking socket wants data to be read";
2649326493

2649426494
case NOT_READY_ERROR :
@@ -26498,17 +26498,17 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
2649826498
return "record layer version error";
2649926499

2650026500
case WANT_WRITE :
26501-
case -WOLFSSL_ERROR_WANT_WRITE :
26501+
case WOLFSSL_ERROR_WANT_WRITE_E :
2650226502
return "non-blocking socket write buffer full";
2650326503

26504-
case -WOLFSSL_ERROR_WANT_CONNECT:
26505-
case -WOLFSSL_ERROR_WANT_ACCEPT:
26504+
case WOLFSSL_ERROR_WANT_CONNECT_E :
26505+
case WOLFSSL_ERROR_WANT_ACCEPT_E :
2650626506
return "The underlying BIO was not yet connected";
2650726507

26508-
case -WOLFSSL_ERROR_SYSCALL:
26508+
case WOLFSSL_ERROR_SYSCALL_E :
2650926509
return "fatal I/O error in TLS layer";
2651026510

26511-
case -WOLFSSL_ERROR_WANT_X509_LOOKUP:
26511+
case WOLFSSL_ERROR_WANT_X509_LOOKUP_E :
2651226512
return "application client cert callback asked to be called again";
2651326513

2651426514
case BUFFER_ERROR :
@@ -26548,7 +26548,7 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
2654826548
return "can't decode peer key";
2654926549

2655026550
case ZERO_RETURN:
26551-
case -WOLFSSL_ERROR_ZERO_RETURN:
26551+
case WOLFSSL_ERROR_ZERO_RETURN_E :
2655226552
return "peer sent close notify alert";
2655326553

2655426554
case ECC_CURVETYPE_ERROR:

src/ssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ static struct SystemCryptoPolicy crypto_policy;
234234
static WC_RNG globalRNG;
235235
static volatile int initGlobalRNG = 0;
236236

237+
#if defined(OPENSSL_EXTRA) || !defined(WOLFSSL_MUTEX_INITIALIZER)
237238
static WC_MAYBE_UNUSED wolfSSL_Mutex globalRNGMutex
238239
WOLFSSL_MUTEX_INITIALIZER_CLAUSE(globalRNGMutex);
240+
#endif
239241
#ifndef WOLFSSL_MUTEX_INITIALIZER
240242
static int globalRNGMutex_valid = 0;
241243
#endif

src/x509.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5507,7 +5507,7 @@ int wolfSSL_X509_NAME_get_text_by_NID(WOLFSSL_X509_NAME* name,
55075507
WOLFSSL_EVP_PKEY* wolfSSL_X509_get_pubkey(WOLFSSL_X509* x509)
55085508
{
55095509
WOLFSSL_EVP_PKEY* key = NULL;
5510-
int ret;
5510+
int ret = 0;
55115511

55125512
(void)ret;
55135513

0 commit comments

Comments
 (0)