Lines Matching refs:tls
17 * TLS 1.0: https://tls-v1-0.badssl.com:1010/
18 * TLS 1.1: https://tls-v1-1.badssl.com:1011/
19 * TLS 1.2: https://tls-v1-2.badssl.com:1012/
64 #include <tls.h>
89 struct tls *tls;
142 if ((TT.tls = tls_client()) == NULL)
143 error_exit("tls_client: %s", tls_error(TT.tls));
150 if (tls_configure(TT.tls, cfg) != 0)
151 error_exit("tls_configure: %s", tls_error(TT.tls));
154 if (tls_connect(TT.tls, host, port) != 0)
155 error_exit("tls_connect: %s", tls_error(TT.tls));
191 ssize_t ret = tls_read(TT.tls, buf, len);
192 if (ret < 0) error_exit("tls_read: %s", tls_error(TT.tls));
209 if (len != tls_write(TT.tls, buf, len))
210 error_exit("tls_write: %s", tls_error(TT.tls));
226 if (TT.tls) {
227 tls_close(TT.tls);
228 tls_free(TT.tls);
229 TT.tls = NULL;