mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-15 04:46:24 +08:00
Use select in TLCP client
Example of `tlcp_client` ``` $ gmssl tlcp_client -host ebssec.boc.cn Connection established! GET / HTTP/1.1[enter] Host: localhost[enter] [enter] [enter] ```
This commit is contained in:
@@ -595,7 +595,7 @@ int tlcp_do_connect(TLS_CONNECT *conn)
|
||||
tls_send_alert(conn, TLS_alert_decrypt_error);
|
||||
goto end;
|
||||
}
|
||||
tls_trace("Connection established!\n");
|
||||
printf("Connection established!\n");
|
||||
|
||||
|
||||
conn->protocol = TLS_protocol_tlcp;
|
||||
|
||||
@@ -1721,8 +1721,6 @@ int tls_send(TLS_CONNECT *conn, const uint8_t *in, size_t inlen, size_t *sentlen
|
||||
|
||||
tls_trace("send ApplicationData\n");
|
||||
|
||||
format_bytes(stderr, 0, 0, "tls_send: payload", in, inlen);
|
||||
|
||||
if (tls_record_set_type(record, TLS_record_application_data) != 1
|
||||
|| tls_record_set_protocol(record, conn->protocol) != 1
|
||||
|| tls_record_set_length(record, inlen) != 1) {
|
||||
|
||||
Reference in New Issue
Block a user