aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/test_https_get_select.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-05-22 10:48:08 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-05-22 15:53:02 +0300
commitdfa503656fcf721acfdd337aad2646d5bcc731bf (patch)
treea84505fe645857af788c0df8e0e01a8605afa2de /src/testcurl/https/test_https_get_select.c
parentf55531f3d39ceda2d33c1d24586a6fc6becd7e93 (diff)
downloadlibmicrohttpd-dfa503656fcf721acfdd337aad2646d5bcc731bf.tar.gz
libmicrohttpd-dfa503656fcf721acfdd337aad2646d5bcc731bf.zip
testcurl/https: removed enforcement of TLS version and cipher
Diffstat (limited to 'src/testcurl/https/test_https_get_select.c')
-rw-r--r--src/testcurl/https/test_https_get_select.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c
index 0ec7763f..47094d8e 100644
--- a/src/testcurl/https/test_https_get_select.c
+++ b/src/testcurl/https/test_https_get_select.c
@@ -95,7 +95,6 @@ testExternalGet (int flags)
95 struct CURLMsg *msg; 95 struct CURLMsg *msg;
96 time_t start; 96 time_t start;
97 struct timeval tv; 97 struct timeval tv;
98 const char *aes256_sha = "AES256-SHA";
99 int port; 98 int port;
100 99
101 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 100 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
@@ -109,8 +108,8 @@ testExternalGet (int flags)
109 cbc.pos = 0; 108 cbc.pos = 0;
110 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | flags, 109 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | flags,
111 port, NULL, NULL, &ahc_echo, "GET", 110 port, NULL, NULL, &ahc_echo, "GET",
112 MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, 111 MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem,
113 MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, 112 MHD_OPTION_HTTPS_MEM_CERT, srv_signed_cert_pem,
114 MHD_OPTION_END); 113 MHD_OPTION_END);
115 if (d == NULL) 114 if (d == NULL)
116 return 256; 115 return 256;
@@ -125,17 +124,12 @@ testExternalGet (int flags)
125 port = (int) dinfo->port; 124 port = (int) dinfo->port;
126 } 125 }
127 126
128 if (curl_tls_is_nss ())
129 aes256_sha = "rsa_aes_256_sha";
130
131 c = curl_easy_init (); 127 c = curl_easy_init ();
132 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); 128 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world");
133 curl_easy_setopt (c, CURLOPT_PORT, (long) port); 129 curl_easy_setopt (c, CURLOPT_PORT, (long) port);
134 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 130 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
135 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 131 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
136 /* TLS options */ 132 /* TLS options */
137 curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
138 curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha);
139 curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); 133 curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L);
140 curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); 134 curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L);
141 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); 135 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L);