mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-26 04:09:30 +03:00
applying uncrustify to ensure uniform indentation
This commit is contained in:
@@ -39,9 +39,9 @@ extern const char srv_signed_key_pem[];
|
||||
|
||||
/* perform a HTTP GET request via SSL/TLS */
|
||||
static int
|
||||
test_secure_get (FILE * test_fd,
|
||||
const char *cipher_suite,
|
||||
int proto_version)
|
||||
test_secure_get (FILE *test_fd,
|
||||
const char *cipher_suite,
|
||||
int proto_version)
|
||||
{
|
||||
int ret;
|
||||
struct MHD_Daemon *d;
|
||||
@@ -52,26 +52,29 @@ test_secure_get (FILE * test_fd,
|
||||
else
|
||||
port = 3041;
|
||||
|
||||
d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
|
||||
MHD_USE_ERROR_LOG, port,
|
||||
d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION
|
||||
| MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
|
||||
| MHD_USE_ERROR_LOG, port,
|
||||
NULL, NULL, &http_ahc, NULL,
|
||||
MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem,
|
||||
MHD_OPTION_HTTPS_MEM_CERT, srv_signed_cert_pem,
|
||||
MHD_OPTION_END);
|
||||
|
||||
if (d == NULL)
|
||||
{
|
||||
fprintf (stderr, MHD_E_SERVER_INIT);
|
||||
return -1;
|
||||
}
|
||||
{
|
||||
fprintf (stderr, MHD_E_SERVER_INIT);
|
||||
return -1;
|
||||
}
|
||||
if (0 == port)
|
||||
{
|
||||
const union MHD_DaemonInfo *dinfo;
|
||||
dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT);
|
||||
if ((NULL == dinfo) ||(0 == dinfo->port) )
|
||||
{
|
||||
const union MHD_DaemonInfo *dinfo;
|
||||
dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT);
|
||||
if (NULL == dinfo || 0 == dinfo->port)
|
||||
{ MHD_stop_daemon (d); return -1; }
|
||||
port = (int)dinfo->port;
|
||||
MHD_stop_daemon (d); return -1;
|
||||
}
|
||||
port = (int) dinfo->port;
|
||||
}
|
||||
|
||||
ret = test_https_transfer (test_fd, port, cipher_suite, proto_version);
|
||||
|
||||
@@ -85,7 +88,7 @@ main (int argc, char *const *argv)
|
||||
{
|
||||
unsigned int errorCount = 0;
|
||||
const char *aes256_sha_tlsv1 = "AES256-SHA";
|
||||
(void)argc; /* Unused. Silent compiler warning. */
|
||||
(void) argc; /* Unused. Silent compiler warning. */
|
||||
|
||||
#ifdef MHD_HTTPS_REQUIRE_GRYPT
|
||||
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
|
||||
@@ -93,19 +96,19 @@ main (int argc, char *const *argv)
|
||||
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
|
||||
#endif
|
||||
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
|
||||
if (!testsuite_curl_global_init ())
|
||||
if (! testsuite_curl_global_init ())
|
||||
return 99;
|
||||
if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
|
||||
{
|
||||
fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
|
||||
curl_global_cleanup ();
|
||||
return 77;
|
||||
}
|
||||
{
|
||||
fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
|
||||
curl_global_cleanup ();
|
||||
return 77;
|
||||
}
|
||||
|
||||
if (curl_uses_nss_ssl() == 0)
|
||||
{
|
||||
aes256_sha_tlsv1 = "rsa_aes_256_sha";
|
||||
}
|
||||
if (curl_uses_nss_ssl () == 0)
|
||||
{
|
||||
aes256_sha_tlsv1 = "rsa_aes_256_sha";
|
||||
}
|
||||
|
||||
errorCount +=
|
||||
test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1);
|
||||
|
||||
Reference in New Issue
Block a user