Skip to content

Commit 5343cb3

Browse files
authored
Merge pull request #9588 from kareem-wolfssl/ghAlerts
Fix incorrect alerts.
2 parents 83f7204 + 7d04a53 commit 5343cb3

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/internal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35268,6 +35268,8 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
3526835268
return wolfssl_alert_protocol_version;
3526935269
case WC_NO_ERR_TRACE(BAD_CERTIFICATE_STATUS_ERROR):
3527035270
return bad_certificate_status_response;
35271+
case WC_NO_ERR_TRACE(OUT_OF_ORDER_E):
35272+
return unexpected_message;
3527135273
default:
3527235274
return invalid_alert;
3527335275
}

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11607,7 +11607,7 @@ static int TLSX_PreSharedKey_Parse(WOLFSSL* ssl, const byte* input,
1160711607
/* Find the list of identities sent to server. */
1160811608
extension = TLSX_Find(ssl->extensions, TLSX_PRE_SHARED_KEY);
1160911609
if (extension == NULL)
11610-
return PSK_KEY_ERROR;
11610+
return INCOMPLETE_DATA;
1161111611
list = (PreSharedKey*)extension->data;
1161211612

1161311613
/* Mark the identity as chosen. */

src/x509.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,25 +3448,25 @@ int wolfSSL_X509_pubkey_digest(const WOLFSSL_X509 *x509,
34483448
const char* wolfSSL_X509_get_default_cert_file_env(void)
34493449
{
34503450
WOLFSSL_STUB("X509_get_default_cert_file_env");
3451-
return NULL;
3451+
return "";
34523452
}
34533453

34543454
const char* wolfSSL_X509_get_default_cert_file(void)
34553455
{
34563456
WOLFSSL_STUB("X509_get_default_cert_file");
3457-
return NULL;
3457+
return "";
34583458
}
34593459

34603460
const char* wolfSSL_X509_get_default_cert_dir_env(void)
34613461
{
34623462
WOLFSSL_STUB("X509_get_default_cert_dir_env");
3463-
return NULL;
3463+
return "";
34643464
}
34653465

34663466
const char* wolfSSL_X509_get_default_cert_dir(void)
34673467
{
34683468
WOLFSSL_STUB("X509_get_default_cert_dir");
3469-
return NULL;
3469+
return "";
34703470
}
34713471
#endif
34723472

tests/api/test_ossl_x509.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,10 @@ int test_wolfSSL_X509(void)
528528
ExpectIntEQ(X509_verify_cert(ctx), SSL_SUCCESS);
529529

530530
#ifndef NO_WOLFSSL_STUB
531-
ExpectNull(X509_get_default_cert_file_env());
532-
ExpectNull(X509_get_default_cert_file());
533-
ExpectNull(X509_get_default_cert_dir_env());
534-
ExpectNull(X509_get_default_cert_dir());
531+
ExpectStrEQ(X509_get_default_cert_file_env(), "");
532+
ExpectStrEQ(X509_get_default_cert_file(), "");
533+
ExpectStrEQ(X509_get_default_cert_dir_env(), "");
534+
ExpectStrEQ(X509_get_default_cert_dir(), "");
535535
#endif
536536

537537
ExpectNull(wolfSSL_X509_get_der(NULL, NULL));

0 commit comments

Comments
 (0)