mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-07-30 16:26:33 +08:00
Merge 247c860b8e84dff813dd3f7abdf30a94271ac055 into 3bb373867917b674265067cbd38b9d252c43d014
This commit is contained in:
commit
8788c91e85
@ -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");
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user