diff options
Diffstat (limited to 'src/testcurl/https/mhds_session_info_test.c')
-rw-r--r-- | src/testcurl/https/mhds_session_info_test.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/testcurl/https/mhds_session_info_test.c b/src/testcurl/https/mhds_session_info_test.c index 3cfb39c4..d77add8f 100644 --- a/src/testcurl/https/mhds_session_info_test.c +++ b/src/testcurl/https/mhds_session_info_test.c | |||
@@ -56,13 +56,13 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
56 | } | 56 | } |
57 | 57 | ||
58 | /* assert actual connection cipher is the one negotiated */ | 58 | /* assert actual connection cipher is the one negotiated */ |
59 | if (GNUTLS_CIPHER_AES_256_CBC != | 59 | if (GNUTLS_CIPHER_ARCFOUR_128 != |
60 | (ret = MHD_get_connection_info | 60 | (ret = MHD_get_connection_info |
61 | (connection, | 61 | (connection, |
62 | MHD_CONNECTION_INFO_CIPHER_ALGO)->cipher_algorithm)) | 62 | MHD_CONNECTION_INFO_CIPHER_ALGO)->cipher_algorithm)) |
63 | { | 63 | { |
64 | fprintf (stderr, "Error: requested cipher mismatch (wanted %d, got %d)\n", | 64 | fprintf (stderr, "Error: requested cipher mismatch (wanted %d, got %d)\n", |
65 | GNUTLS_CIPHER_AES_256_CBC, | 65 | GNUTLS_CIPHER_ARCFOUR_128, |
66 | ret); | 66 | ret); |
67 | return -1; | 67 | return -1; |
68 | } | 68 | } |
@@ -86,7 +86,8 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
86 | return ret; | 86 | return ret; |
87 | } | 87 | } |
88 | 88 | ||
89 | /* | 89 | |
90 | /** | ||
90 | * negotiate a secure connection with server & query negotiated security parameters | 91 | * negotiate a secure connection with server & query negotiated security parameters |
91 | */ | 92 | */ |
92 | static int | 93 | static int |
@@ -108,7 +109,7 @@ test_query_session () | |||
108 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_SSL | | 109 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_SSL | |
109 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 110 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
110 | NULL, NULL, &query_session_ahc, NULL, | 111 | NULL, NULL, &query_session_ahc, NULL, |
111 | MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:-AES-128-CBC", | 112 | MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:+ARCFOUR-128", |
112 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 113 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
113 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 114 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
114 | MHD_OPTION_END); | 115 | MHD_OPTION_END); |
@@ -116,7 +117,7 @@ test_query_session () | |||
116 | if (d == NULL) | 117 | if (d == NULL) |
117 | return 2; | 118 | return 2; |
118 | 119 | ||
119 | char *aes256_sha = "AES256-SHA"; | 120 | const char *aes256_sha = "AES256-SHA"; |
120 | if (curl_uses_nss_ssl() == 0) | 121 | if (curl_uses_nss_ssl() == 0) |
121 | { | 122 | { |
122 | aes256_sha = "rsa_aes_256_sha"; | 123 | aes256_sha = "rsa_aes_256_sha"; |
@@ -155,8 +156,8 @@ test_query_session () | |||
155 | return -1; | 156 | return -1; |
156 | } | 157 | } |
157 | 158 | ||
158 | MHD_stop_daemon (d); | ||
159 | curl_easy_cleanup (c); | 159 | curl_easy_cleanup (c); |
160 | MHD_stop_daemon (d); | ||
160 | free (cbc.buf); | 161 | free (cbc.buf); |
161 | return 0; | 162 | return 0; |
162 | } | 163 | } |