Lines Matching refs:tls
26 #include "private-lib-tls-mbedtls.h"
35 if (vhost->tls.ssl_ctx)
36 SSL_CTX_free(vhost->tls.ssl_ctx);
37 if (!vhost->tls.user_supplied_ssl_ctx && vhost->tls.ssl_client_ctx)
38 SSL_CTX_free(vhost->tls.ssl_client_ctx);
40 if (vhost->tls.x509_client_CA)
41 X509_free(vhost->tls.x509_client_CA);
51 if (!wsi->tls.ssl)
55 n = SSL_read(wsi->tls.ssl, buf, (int)len);
72 m = SSL_get_error(wsi->tls.ssl, n);
87 if (m == SSL_ERROR_WANT_READ || SSL_want_read(wsi->tls.ssl)) {
92 if (m == SSL_ERROR_WANT_WRITE || SSL_want_write(wsi->tls.ssl)) {
114 * If using mbedtls type tls library, this is the earliest point for all
115 * paths to dump what was received as decrypted data from the tls tunnel
136 if (!wsi->tls.ssl)
139 if (SSL_pending(wsi->tls.ssl)) {
140 if (lws_dll2_is_detached(&wsi->tls.dll_pending_tls))
141 lws_dll2_add_head(&wsi->tls.dll_pending_tls,
142 &pt->tls.dll_pending_tls_owner);
156 if (!wsi->tls.ssl)
159 return SSL_pending(wsi->tls.ssl);
169 * If using mbedtls type tls library, this is the last point for all
170 * paths before sending data into the tls tunnel, where you can dump it
177 if (!wsi->tls.ssl)
180 n = SSL_write(wsi->tls.ssl, buf, (int)len);
190 m = SSL_get_error(wsi->tls.ssl, n);
192 if (m == SSL_ERROR_WANT_READ || SSL_want_read(wsi->tls.ssl)) {
198 if (m == SSL_ERROR_WANT_WRITE || SSL_want_write(wsi->tls.ssl)) {
236 if (!(where & wsi->a.vhost->tls.ssl_info_event_mask))
254 if (!wsi->tls.ssl)
261 if (wsi->a.vhost->tls.ssl_info_event_mask)
262 SSL_set_info_callback(wsi->tls.ssl, NULL);
266 lws_sul_cancel(&wsi->tls.sul_cb_synth);
271 lws_sess_cache_synth_cb(&wsi->tls.sul_cb_synth);
274 n = SSL_get_fd(wsi->tls.ssl);
276 SSL_shutdown(wsi->tls.ssl);
278 SSL_free(wsi->tls.ssl);
279 wsi->tls.ssl = NULL;
289 if (vhost->tls.ssl_ctx)
290 SSL_CTX_free(vhost->tls.ssl_ctx);
292 if (!vhost->tls.user_supplied_ssl_ctx && vhost->tls.ssl_client_ctx)
293 SSL_CTX_free(vhost->tls.ssl_client_ctx);
307 if (!wsi->tls.ssl)
310 return SSL_get_SSL_CTX(wsi->tls.ssl);
316 int n = SSL_shutdown(wsi->tls.ssl);
330 n = SSL_get_error(wsi->tls.ssl, n);
332 if (SSL_want_read(wsi->tls.ssl)) {
337 if (SSL_want_write(wsi->tls.ssl)) {