aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/mhds_get_test_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/mhds_get_test_select.c')
-rw-r--r--src/testcurl/https/mhds_get_test_select.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testcurl/https/mhds_get_test_select.c b/src/testcurl/https/mhds_get_test_select.c
index 64ac88ac..323a18a1 100644
--- a/src/testcurl/https/mhds_get_test_select.c
+++ b/src/testcurl/https/mhds_get_test_select.c
@@ -33,6 +33,7 @@
33#include "tls_test_common.h" 33#include "tls_test_common.h"
34 34
35int curl_check_version (const char *req_version, ...); 35int curl_check_version (const char *req_version, ...);
36int curl_uses_nss_ssl ();
36extern const char srv_key_pem[]; 37extern const char srv_key_pem[];
37extern const char srv_self_signed_cert_pem[]; 38extern const char srv_self_signed_cert_pem[];
38extern const char srv_signed_cert_pem[]; 39extern const char srv_signed_cert_pem[];
@@ -100,10 +101,20 @@ testExternalGet ()
100 MHD_OPTION_END); 101 MHD_OPTION_END);
101 if (d == NULL) 102 if (d == NULL)
102 return 256; 103 return 256;
104
105 char *aes256_sha = "AES256-SHA";
106 if (curl_uses_nss_ssl() == 0)
107 {
108 aes256_sha = "rsa_aes_256_sha";
109 }
110
103 c = curl_easy_init (); 111 c = curl_easy_init ();
104 curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world"); 112 curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world");
105 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 113 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
106 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 114 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
115 /* TLS options */
116 curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
117 curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha);
107 curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0); 118 curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0);
108 curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); 119 curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0);
109 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 120 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);