Skip to content

Commit

Permalink
ocsp-stapling.test print statements with type, api.c message type
Browse files Browse the repository at this point in the history
casting

message type cast
  • Loading branch information
Ruby Martin committed Jan 28, 2025
1 parent f2b4596 commit a024ac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/ocsp-stapling.test
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ generate_port() {
elif [[ "$OSTYPE" == "darwin"* ]]; then
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
else
echo "OS TYPE: $OSTYPE"
echo "Unknown OS TYPE"
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -90733,7 +90733,7 @@ static byte test_AEAD_done = 0;

static int test_AEAD_cbiorecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
{
int ret = (int)recv(wolfSSL_get_fd(ssl), buf, sz, 0);
int ret = (int)recv(wolfSSL_get_fd(ssl), (MESSAGE_TYPE_CAST)buf, sz, 0);
if (ret > 0) {
if (test_AEAD_fail_decryption) {
/* Modify the packet to trigger a decryption failure */
Expand Down Expand Up @@ -91050,10 +91050,10 @@ static void test_wolfSSL_dtls_send_ch_with_invalid_cookie(WOLFSSL* ssl)
};

fd = wolfSSL_get_wfd(ssl);
ret = (int)send(fd, ch_msh_invalid_cookie, sizeof(ch_msh_invalid_cookie), 0);
ret = (int)send(fd, (MESSAGE_TYPE_CAST)ch_msh_invalid_cookie, sizeof(ch_msh_invalid_cookie), 0);
AssertIntGT(ret, 0);
/* should reply with an illegal_parameter reply */
ret = (int)recv(fd, alert_reply, sizeof(alert_reply), 0);
ret = (int)recv(fd, (MESSAGE_TYPE_CAST)alert_reply, sizeof(alert_reply), 0);
AssertIntEQ(ret, sizeof(expected_alert_reply));
AssertIntEQ(XMEMCMP(alert_reply, expected_alert_reply, sizeof(expected_alert_reply)), 0);
}
Expand Down

0 comments on commit a024ac0

Please sign in to comment.