Update TLCP client

set optional CA certs and client keys
tlcp_client can correctly connect  https://ebssec.boc.cn, https://zffw.jxzwfww.gov.cn

Bugs:
send, recv return value.
handle input when connected.
This commit is contained in:
Zhi Guan
2022-07-26 22:36:33 +08:00
parent 43bec77d15
commit bb1dea9160
4 changed files with 28 additions and 8 deletions

View File

@@ -1545,6 +1545,8 @@ int tls_record_do_recv(uint8_t *record, size_t *recordlen, int sock)
error_print();
return -1;
} else if (r != len) {
// FIXME: 不一定能够一次读取全部数据需要修正这个bug
fprintf(stderr, "%s %d: r = %zu, len = %zu\n", __FILE__, __LINE__, r, len);
error_print();
return -1;
}