Update TLS 1.3

This commit is contained in:
Zhi Guan
2022-07-25 14:15:41 +08:00
parent 15fd0dbcd4
commit 08dd20b70f
7 changed files with 269 additions and 203 deletions

View File

@@ -177,7 +177,7 @@ bad:
continue;
}
}
if (tls_send(&conn, (uint8_t *)send_buf, strlen(send_buf), &sentlen) != 1) {
if (tls13_send(&conn, (uint8_t *)send_buf, strlen(send_buf), 0 /*&sentlen*/) != 1) {
fprintf(stderr, "%s: send error\n", prog);
goto end;
}
@@ -185,7 +185,7 @@ bad:
{
memset(buf, 0, sizeof(buf));
len = sizeof(buf);
if (tls_recv(&conn, (uint8_t *)buf, sizeof(len), &len) != 1) {
if (tls13_recv(&conn, (uint8_t *)buf, /*sizeof(len),*/ &len) != 1) {
goto end;
}
buf[len] = 0;