Lines Matching defs:g_ssl
70 static SSL *g_ssl = NULL;
144 if (g_ssl)
146 sent = SSL_write(g_ssl, s->data + total, length - total);
149 ssl_err = SSL_get_error(g_ssl, sent);
235 if ((!g_ssl || SSL_pending(g_ssl) <= 0) && g_run_ui)
245 if (g_ssl)
247 rcvd = SSL_read(g_ssl, s->end, length);
248 ssl_err = SSL_get_error(g_ssl, rcvd);
252 if (SSL_get_shutdown(g_ssl) & SSL_RECEIVED_SHUTDOWN)
338 if (g_ssl)
339 SSL_free(g_ssl);
342 g_ssl = SSL_new(g_ssl_ctx);
343 if (g_ssl == NULL)
349 if (SSL_set_fd(g_ssl, g_sock) < 1)
357 err = SSL_connect(g_ssl);
359 while (SSL_get_error(g_ssl, err) == SSL_ERROR_WANT_READ);
370 if (g_ssl)
371 SSL_free(g_ssl);
375 g_ssl = NULL;
390 if (g_ssl == NULL)
393 cert = SSL_get_peer_certificate(g_ssl);
542 if (g_ssl)
545 (void) SSL_shutdown(g_ssl);
546 SSL_free(g_ssl);
547 g_ssl = NULL;