mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
account for correct return value of cipher stack push and clSuite use case after rebase
This commit is contained in:
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user