mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Update tls13_client.c
This commit is contained in:
@@ -143,6 +143,20 @@ bad:
|
|||||||
fd_set fds;
|
fd_set fds;
|
||||||
size_t sentlen;
|
size_t sentlen;
|
||||||
|
|
||||||
|
if (!fgets(send_buf, sizeof(send_buf), stdin)) {
|
||||||
|
if (feof(stdin)) {
|
||||||
|
tls_shutdown(&conn);
|
||||||
|
goto end;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tls13_send(&conn, (uint8_t *)send_buf, strlen(send_buf), &sentlen) != 1) {
|
||||||
|
fprintf(stderr, "%s: send error\n", prog);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(conn.sock, &fds);
|
FD_SET(conn.sock, &fds);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|||||||
Reference in New Issue
Block a user