account for correct return value of cipher stack push and clSuite use case after rebase

This commit is contained in:
JacobBarthelmeh
2025-01-23 17:47:24 -07:00
parent 41e00dc3c9
commit 9b04a4f8d1
3 changed files with 6 additions and 6 deletions

View File

@@ -15190,7 +15190,7 @@ WOLFSSL_STACK* wolfSSL_sk_new_cipher(void)
return sk;
}
/* return 1 on success 0 on fail */
/* returns the number of elements in stack on success, 0 on fail */
int wolfSSL_sk_CIPHER_push(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk,
WOLFSSL_CIPHER* cipher)
{
@@ -17835,7 +17835,7 @@ void wolfSSL_sk_GENERIC_pop_free(WOLFSSL_STACK* sk,
wolfSSL_sk_pop_free(sk, (wolfSSL_sk_freefunc)f);
}
/* return 1 on success 0 on fail */
/* returns the number of elements in stack on success, 0 on fail */
int wolfSSL_sk_GENERIC_push(WOLFSSL_STACK* sk, void* generic)
{
WOLFSSL_ENTER("wolfSSL_sk_GENERIC_push");
@@ -22014,7 +22014,7 @@ WOLF_STACK_OF(WOLFSSL_CIPHER)* wolfSSL_get_client_ciphers(WOLFSSL* ssl)
/* in_stack is checked in wolfSSL_CIPHER_description */
cipher.in_stack = 1;
if (wolfSSL_sk_CIPHER_push(ret, &cipher) != WOLFSSL_SUCCESS) {
if (wolfSSL_sk_CIPHER_push(ret, &cipher) <= 0) {
WOLFSSL_MSG("Error pushing client cipher onto stack");
wolfSSL_sk_CIPHER_free(ret);
ret = NULL;

View File

@@ -7055,7 +7055,7 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
}
/* Can't check ssl->extensions here as SigAlgs are unconditionally
set by TLSX_PopulateExtensions */
if (args->clSuites->hashSigAlgoSz == 0) {
if (ssl->clSuites->hashSigAlgoSz == 0) {
WOLFSSL_MSG("Client did not send a SignatureAlgorithms extension");
ERROR_OUT(INCOMPLETE_DATA, exit_dch);
}

View File

@@ -61445,7 +61445,7 @@ static int test_wolfSSL_get_client_ciphers_on_result(WOLFSSL* ssl) {
ExpectIntEQ(sk_SSL_CIPHER_num(ciphers), 1);
current = sk_SSL_CIPHER_value(ciphers, 0);
ExpectNotNull(current);
ExpectStrEQ("ECDHE-RSA-AES128-GCM-SHA256",
ExpectStrEQ("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
SSL_CIPHER_get_name(current));
}
return EXPECT_RESULT();
@@ -69840,7 +69840,7 @@ static int test_wolfSSL_X509_NAME_ENTRY(void)
ExpectNotNull(entry = X509_NAME_ENTRY_create_by_NID(NULL, NID_commonName,
0x0c, cn, (int)sizeof(cn)));
ExpectIntEQ(X509_NAME_add_entry(nm, entry, -1, 0), SSL_SUCCESS);
ExpectIntEQ(X509_NAME_ENTRY_set(X509_NAME_get_entry(nm, 1)), 1);
ExpectIntEQ(X509_NAME_ENTRY_set(X509_NAME_get_entry(nm, 1)), 2);
#ifdef WOLFSSL_CERT_EXT
ExpectIntEQ(X509_NAME_add_entry_by_txt(NULL, NULL, MBSTRING_UTF8,