* Headers from response
*/
struct HttpResponseHeader *header_tail;
-
+
+ /**
+ * SSL Certificate status
+ */
+ int ssl_checked;
};
gnutls_x509_crt_t x509_cert;
int rc;
const char *name;
+
+ s5r->ssl_checked = GNUNET_YES;
if (CURLE_OK !=
curl_easy_getinfo (s5r->curl,
size_t delta_cdomain;
int domain_matched;
char *tok;
-
+
/* first, check SSL certificate */
- if ( (HTTPS_PORT == s5r->port) &&
+ if ( (GNUNET_YES != s5r->ssl_checked) &&
+ (HTTPS_PORT == s5r->port) &&
(GNUNET_OK != check_ssl_certificate (s5r)) )
return GNUNET_SYSERR;
-
-
+
ndup = GNUNET_strndup (buffer, bytes);
hdr_type = strtok (ndup, ":");
if (NULL == hdr_type)
MHD_get_connection_values (con,
MHD_HEADER_KIND,
&con_val_iter, s5r);
- //TODO is this sane? Basically we disable cURLs built-in expect:
- //100-continue
- //s5r->headers = curl_slist_append (s5r->headers,
- // "Expect:");
curl_easy_setopt (s5r->curl, CURLOPT_HTTPHEADER, s5r->headers);
curl_download_prepare ();
return MHD_YES;
curl_download_prepare ();
}
if (NULL == s5r->response)
- return MHD_YES; /* too early to queue response, did not yet get headers from cURL */
+ return MHD_YES;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queueing response with MHD\n");
run_mhd_now (s5r->hd);
GNUNET_break (0);
return;
}
-
sock = ci->connect_fd;
for (s5r = s5r_head; NULL != s5r; s5r = s5r->next)
{
}
if (NULL == s5r)
GNUNET_break (0);
+ s5r->ssl_checked = GNUNET_NO;
break;
case MHD_CONNECTION_NOTIFY_CLOSED:
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection closed... cleaning up\n");