• Home
  • Raw
  • Download

Lines Matching refs:http

235   http_t	*http;			/* HTTP connection */  in http_bio_read()  local
238 http = (http_t *)h->ptr; in http_bio_read()
240 if (!http->blocking) in http_bio_read()
246 while (!_httpWait(http, http->wait_value, 0)) in http_bio_read()
248 if (http->timeout_cb && (*http->timeout_cb)(http, http->timeout_data)) in http_bio_read()
251 http->error = ETIMEDOUT; in http_bio_read()
257 return (recv(http->fd, buf, size, 0)); in http_bio_read()
290 _httpTLSPending(http_t *http) /* I - HTTP connection */ in _httpTLSPending() argument
292 return (SSL_pending(http->tls)); in _httpTLSPending()
301 _httpTLSRead(http_t *http, /* I - Connection to server */ in _httpTLSRead() argument
305 return (SSL_read((SSL *)(http->tls), buf, len)); in _httpTLSRead()
327 _httpTLSStart(http_t *http) /* I - Connection to server */ in _httpTLSStart() argument
336 DEBUG_printf(("3_httpTLSStart(http=%p)", (void *)http)); in _httpTLSStart()
345 if (http->mode == _HTTP_MODE_SERVER && !tls_keypath) in _httpTLSStart()
348 http->error = errno = EINVAL; in _httpTLSStart()
349 http->status = HTTP_STATUS_ERROR; in _httpTLSStart()
360 BIO_ctrl(bio, BIO_C_SET_FILE_PTR, 0, (char *)http); in _httpTLSStart()
362 http->tls = SSL_new(context); in _httpTLSStart()
363 SSL_set_bio(http->tls, bio, bio); in _httpTLSStart()
368 if (http->mode == _HTTP_MODE_CLIENT) in _httpTLSStart()
370 SSL_set_connect_state(http->tls); in _httpTLSStart()
376 if (httpAddrLocalhost(http->hostaddr)) in _httpTLSStart()
386 strlcpy(hostname, http->hostname, sizeof(hostname)); in _httpTLSStart()
391 SSL_set_tlsext_host_name(http->tls, hostname); in _httpTLSStart()
400 if (SSL_do_handshake(http->tls) != 1) in _httpTLSStart()
411 SSL_free(http->tls); in _httpTLSStart()
412 http->tls = NULL; in _httpTLSStart()
414 http->error = errno; in _httpTLSStart()
415 http->status = HTTP_STATUS_ERROR; in _httpTLSStart()
429 X509 *peer_certificate = SSL_get_peer_certificate(http->tls); in _httpTLSStart()
438 error = cg->server_cert_cb(http, http->tls, credentials, cg->server_cert_data); in _httpTLSStart()
446 http->error = errno = EINVAL; in _httpTLSStart()
447 http->status = HTTP_STATUS_ERROR; in _httpTLSStart()
463 _httpTLSStop(http_t *http) /* I - Connection to server */ in _httpTLSStop() argument
467 switch (SSL_shutdown(http->tls)) in _httpTLSStop()
485 SSL_free(http->tls); in _httpTLSStop()
486 http->tls = NULL; in _httpTLSStop()
494 _httpTLSWrite(http_t *http, /* I - Connection to server */ in _httpTLSWrite() argument
501 DEBUG_printf(("2http_write_ssl(http=%p, buf=%p, len=%d)", http, buf, len)); in _httpTLSWrite()
503 result = SSL_write((SSL *)(http->tls), buf, len); in _httpTLSWrite()