Merge 247c860b8e84dff813dd3f7abdf30a94271ac055 into 3bb373867917b674265067cbd38b9d252c43d014

This commit is contained in:
mmustafasenoglu 2026-07-20 16:17:24 +01:00 committed by GitHub
commit 8788c91e85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -882,8 +882,8 @@ static void print_deserialized_ssl_context(const uint8_t *ssl, size_t len)
printf("\tALPN negotiation : ");
CHECK_SSL_END(alpn_len);
if (alpn_len > 0) {
if (strlen((const char *) ssl) == alpn_len) {
printf("%s\n", ssl);
if (memchr(ssl, '\0', alpn_len) == NULL) {
printf("%.*s\n", alpn_len, ssl);
} else {
printf("\n");
printf_err("\tALPN negotiation is incorrect\n");

View File

@ -1385,6 +1385,10 @@ static int dummy_ticket_parse(void *p_ticket, mbedtls_ssl_session *session,
int ret;
((void) p_ticket);
if (len < 4) {
return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
}
if ((ret = mbedtls_ssl_session_load(session, buf + 4, len - 4)) != 0) {
return ret;
}