Lines Matching refs:scon
35 static SSL *doConnection(SSL *scon, const char *host, SSL_CTX *ctx);
118 SSL *scon = NULL;
280 if ((scon = doConnection(NULL, host, ctx)) == NULL)
286 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0)
288 while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
291 SSL_set_shutdown(scon, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
292 BIO_closesocket(SSL_get_fd(scon));
295 if (SSL_session_reused(scon)) {
298 ver = SSL_version(scon);
309 SSL_free(scon);
310 scon = NULL;
333 if ((scon = doConnection(NULL, host, ctx)) == NULL) {
340 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0)
342 while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
345 SSL_set_shutdown(scon, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
346 if ((fd = SSL_get_fd(scon)) >= 0)
362 if ((doConnection(scon, host, ctx)) == NULL)
368 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0)
370 while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
373 SSL_set_shutdown(scon, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
374 if ((fd = SSL_get_fd(scon)) >= 0)
378 if (SSL_session_reused(scon)) {
381 ver = SSL_version(scon);
407 SSL_free(scon);
415 static SSL *doConnection(SSL *scon, const char *host, SSL_CTX *ctx)
430 if (scon == NULL) {
437 serverCon = scon;
452 if (scon == NULL)