mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
Update TLS 1.3
This commit is contained in:
@@ -199,7 +199,7 @@ restart:
|
||||
|
||||
do {
|
||||
len = sizeof(buf);
|
||||
if ((rv = tls_recv(&conn, (uint8_t *)buf, sizeof(buf), &len)) != 1) {
|
||||
if ((rv = tls13_recv(&conn, (uint8_t *)buf, /*sizeof(buf),*/ &len)) != 1) {
|
||||
if (rv < 0) fprintf(stderr, "%s: recv failure\n", prog);
|
||||
else fprintf(stderr, "%s: Disconnected by remote\n", prog);
|
||||
|
||||
@@ -209,7 +209,7 @@ restart:
|
||||
}
|
||||
} while (!len);
|
||||
|
||||
if (tls_send(&conn, (uint8_t *)buf, len, &sentlen) != 1) {
|
||||
if (tls13_send(&conn, (uint8_t *)buf, len, /* &sentlen*/ 0) != 1) {
|
||||
fprintf(stderr, "%s: send failure, close connection\n", prog);
|
||||
close(conn.sock);
|
||||
goto end;
|
||||
|
||||
Reference in New Issue
Block a user