diff options
author | lv-426 <oxcafebaby@yahoo.com> | 2008-07-20 04:38:41 +0000 |
---|---|---|
committer | lv-426 <oxcafebaby@yahoo.com> | 2008-07-20 04:38:41 +0000 |
commit | f56131958544cff00fac1e2a777df5e08535649a (patch) | |
tree | ba003983220afb6f8f706eaf2fc6b41e10ddbff4 /src | |
parent | 04c37e5bd7a82f60127b64338cf37c470ca93e12 (diff) | |
download | libmicrohttpd-f56131958544cff00fac1e2a777df5e08535649a.tar.gz libmicrohttpd-f56131958544cff00fac1e2a777df5e08535649a.zip |
configure.ac: libgcrypt required for HTTPS support
some makefile issues
all cURL tests set to use SSLv3 [temporary]
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/Makefile.am | 1 | ||||
-rw-r--r-- | src/daemon/connection_https.c | 6 | ||||
-rw-r--r-- | src/daemon/https/tls/Makefile.am | 1 | ||||
-rw-r--r-- | src/daemon/https/x509/pkcs12.h | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/x509.h | 1 | ||||
-rw-r--r-- | src/daemon/internal.h | 1 | ||||
-rw-r--r-- | src/testcurl/https/Makefile.am | 2 | ||||
-rw-r--r-- | src/testcurl/https/mhds_get_test.c | 14 | ||||
-rw-r--r-- | src/testcurl/https/mhds_multi_daemon_test.c | 1 | ||||
-rw-r--r-- | src/testcurl/https/tls_authentication_test.c | 1 |
10 files changed, 14 insertions, 20 deletions
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 3a3580a7..d850723b 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am | |||
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \ | |||
3 | -I$(top_srcdir)/src/daemon \ | 3 | -I$(top_srcdir)/src/daemon \ |
4 | -I$(top_srcdir)/src/daemon/https/lgl \ | 4 | -I$(top_srcdir)/src/daemon/https/lgl \ |
5 | -I$(top_srcdir)/src/daemon/https/x509 \ | 5 | -I$(top_srcdir)/src/daemon/https/x509 \ |
6 | -I$(top_srcdir)/src/daemon/https/minitasn1 \ | ||
6 | -I$(top_srcdir)/src/daemon/https/openpgp \ | 7 | -I$(top_srcdir)/src/daemon/https/openpgp \ |
7 | -I$(top_srcdir)/src/daemon/https/opencdk \ | 8 | -I$(top_srcdir)/src/daemon/https/opencdk \ |
8 | -I$(top_srcdir)/src/daemon/https/tls \ | 9 | -I$(top_srcdir)/src/daemon/https/tls \ |
diff --git a/src/daemon/connection_https.c b/src/daemon/connection_https.c index 4f6af3e4..aed523ea 100644 --- a/src/daemon/connection_https.c +++ b/src/daemon/connection_https.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "gnutls_int.h" | 37 | #include "gnutls_int.h" |
38 | #include "gnutls_record.h" | 38 | #include "gnutls_record.h" |
39 | 39 | ||
40 | /* TODO rm */ | 40 | /* TODO rm #include "gnutls_errors.h" */ |
41 | #include "gnutls_errors.h" | 41 | #include "gnutls_errors.h" |
42 | 42 | ||
43 | /* forward declarations used when setting secure connection callbacks */ | 43 | /* forward declarations used when setting secure connection callbacks */ |
@@ -45,7 +45,6 @@ int MHD_connection_handle_read (struct MHD_Connection *connection); | |||
45 | int MHD_connection_handle_write (struct MHD_Connection *connection); | 45 | int MHD_connection_handle_write (struct MHD_Connection *connection); |
46 | int MHD_connection_handle_idle (struct MHD_Connection *connection); | 46 | int MHD_connection_handle_idle (struct MHD_Connection *connection); |
47 | 47 | ||
48 | /* TODO rm - appears in a switch default clause */ | ||
49 | static void | 48 | static void |
50 | MHD_tls_connection_close (struct MHD_Connection *connection) | 49 | MHD_tls_connection_close (struct MHD_Connection *connection) |
51 | { | 50 | { |
@@ -63,11 +62,10 @@ MHD_tls_connection_close (struct MHD_Connection *connection) | |||
63 | MHD_REQUEST_TERMINATED_COMPLETED_OK); | 62 | MHD_REQUEST_TERMINATED_COMPLETED_OK); |
64 | } | 63 | } |
65 | 64 | ||
66 | /* TODO add error connection termination */ | ||
67 | static void | 65 | static void |
68 | MHD_tls_connection_close_err (struct MHD_Connection *connection) | 66 | MHD_tls_connection_close_err (struct MHD_Connection *connection) |
69 | { | 67 | { |
70 | /* TODO impl */ | 68 | /* TODO impl MHD_tls_connection_close_err */ |
71 | } | 69 | } |
72 | 70 | ||
73 | union MHD_SessionInfo | 71 | union MHD_SessionInfo |
diff --git a/src/daemon/https/tls/Makefile.am b/src/daemon/https/tls/Makefile.am index 11e70592..40d49e08 100644 --- a/src/daemon/https/tls/Makefile.am +++ b/src/daemon/https/tls/Makefile.am | |||
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \ | |||
6 | -I$(top_srcdir)/src/daemon/https \ | 6 | -I$(top_srcdir)/src/daemon/https \ |
7 | -I$(top_srcdir)/src/daemon/https/tls \ | 7 | -I$(top_srcdir)/src/daemon/https/tls \ |
8 | -I$(top_srcdir)/src/daemon/https/lgl \ | 8 | -I$(top_srcdir)/src/daemon/https/lgl \ |
9 | -I$(top_srcdir)/src/daemon/https/minitasn1 \ | ||
9 | -I$(top_srcdir)/src/daemon/https/x509 \ | 10 | -I$(top_srcdir)/src/daemon/https/x509 \ |
10 | -I$(top_srcdir)/src/daemon/https/openpgp \ | 11 | -I$(top_srcdir)/src/daemon/https/openpgp \ |
11 | -I$(top_srcdir)/src/daemon/https/opencdk \ | 12 | -I$(top_srcdir)/src/daemon/https/opencdk \ |
diff --git a/src/daemon/https/x509/pkcs12.h b/src/daemon/https/x509/pkcs12.h index 566058fb..41878ff2 100644 --- a/src/daemon/https/x509/pkcs12.h +++ b/src/daemon/https/x509/pkcs12.h | |||
@@ -22,10 +22,10 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | // TODO clean | 25 | /* TODO clean */ |
26 | 26 | ||
27 | #ifndef GNUTLS_PKCS12_H | 27 | #ifndef GNUTLS_PKCS12_H |
28 | # define GNUTLS_PKCS12_H | 28 | #define GNUTLS_PKCS12_H |
29 | 29 | ||
30 | #ifdef __cplusplus | 30 | #ifdef __cplusplus |
31 | extern "C" | 31 | extern "C" |
@@ -36,7 +36,7 @@ extern "C" | |||
36 | 36 | ||
37 | #define MAX_BAG_ELEMENTS 32 | 37 | #define MAX_BAG_ELEMENTS 32 |
38 | 38 | ||
39 | /* PKCS12 structures handling | 39 | /* PKCS12 structures handling |
40 | */ | 40 | */ |
41 | struct gnutls_pkcs12_int; | 41 | struct gnutls_pkcs12_int; |
42 | 42 | ||
diff --git a/src/daemon/https/x509/x509.h b/src/daemon/https/x509/x509.h index 8cef1d30..eaf2c31c 100644 --- a/src/daemon/https/x509/x509.h +++ b/src/daemon/https/x509/x509.h | |||
@@ -33,7 +33,6 @@ extern "C" | |||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #include <gnutls.h> | 35 | #include <gnutls.h> |
36 | // TODO #include "libtasn1.h" | ||
37 | #include "gnutls_mpi.h" | 36 | #include "gnutls_mpi.h" |
38 | 37 | ||
39 | /* Some OIDs usually found in Distinguished names, or | 38 | /* Some OIDs usually found in Distinguished names, or |
diff --git a/src/daemon/internal.h b/src/daemon/internal.h index efec4b4e..4de5c6dd 100644 --- a/src/daemon/internal.h +++ b/src/daemon/internal.h | |||
@@ -530,7 +530,6 @@ struct MHD_Connection | |||
530 | unsigned int current_chunk_offset; | 530 | unsigned int current_chunk_offset; |
531 | 531 | ||
532 | /* handlers used for processing read, write & idle connection operations */ | 532 | /* handlers used for processing read, write & idle connection operations */ |
533 | /* TODO fix sig */ | ||
534 | int (*read_handler) (struct MHD_Connection * connection); | 533 | int (*read_handler) (struct MHD_Connection * connection); |
535 | 534 | ||
536 | int (*write_handler) (struct MHD_Connection * connection); | 535 | int (*write_handler) (struct MHD_Connection * connection); |
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am index 81b439fa..b4a4c99d 100644 --- a/src/testcurl/https/Makefile.am +++ b/src/testcurl/https/Makefile.am | |||
@@ -13,7 +13,7 @@ check_PROGRAMS = \ | |||
13 | mhds_get_test \ | 13 | mhds_get_test \ |
14 | tls_authentication_test \ | 14 | tls_authentication_test \ |
15 | mhds_multi_daemon_test \ | 15 | mhds_multi_daemon_test \ |
16 | mhds_session_info_test | 16 | mhds_session_info_test |
17 | 17 | ||
18 | TESTS = $(check_PROGRAMS) | 18 | TESTS = $(check_PROGRAMS) |
19 | 19 | ||
diff --git a/src/testcurl/https/mhds_get_test.c b/src/testcurl/https/mhds_get_test.c index e92bf82c..f69ed7d0 100644 --- a/src/testcurl/https/mhds_get_test.c +++ b/src/testcurl/https/mhds_get_test.c | |||
@@ -90,7 +90,6 @@ http_ahc (void *cls, struct MHD_Connection *connection, | |||
90 | FILE *file; | 90 | FILE *file; |
91 | struct stat buf; | 91 | struct stat buf; |
92 | 92 | ||
93 | // TODO never respond on first call | ||
94 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 93 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
95 | return MHD_NO; /* unexpected method */ | 94 | return MHD_NO; /* unexpected method */ |
96 | if (&aptr != *ptr) | 95 | if (&aptr != *ptr) |
@@ -178,7 +177,7 @@ test_daemon_get (FILE * test_fd, char *cipher_suite, int proto_version) | |||
178 | 177 | ||
179 | c = curl_easy_init (); | 178 | c = curl_easy_init (); |
180 | #ifdef DEBUG | 179 | #ifdef DEBUG |
181 | //curl_easy_setopt (c, CURLOPT_VERBOSE, 1); | 180 | curl_easy_setopt (c, CURLOPT_VERBOSE, 1); |
182 | #endif | 181 | #endif |
183 | curl_easy_setopt (c, CURLOPT_URL, url); | 182 | curl_easy_setopt (c, CURLOPT_URL, url); |
184 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); | 183 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); |
@@ -263,7 +262,6 @@ test_file_certificates (FILE * test_fd, char *cipher_suite, int proto_version) | |||
263 | sprintf (cert_path, "%s/%s", cur_dir, "cert.pem"); | 262 | sprintf (cert_path, "%s/%s", cur_dir, "cert.pem"); |
264 | sprintf (key_path, "%s/%s", cur_dir, "key.pem"); | 263 | sprintf (key_path, "%s/%s", cur_dir, "key.pem"); |
265 | 264 | ||
266 | |||
267 | if (NULL == (key_fd = fopen (key_path, "w+"))) | 265 | if (NULL == (key_fd = fopen (key_path, "w+"))) |
268 | { | 266 | { |
269 | fprintf (stderr, MHD_E_KEY_FILE_CREAT); | 267 | fprintf (stderr, MHD_E_KEY_FILE_CREAT); |
@@ -433,11 +431,11 @@ main (int argc, char *const *argv) | |||
433 | } | 431 | } |
434 | 432 | ||
435 | errorCount += | 433 | errorCount += |
436 | test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_TLSv1); | 434 | test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3); |
437 | errorCount += | 435 | errorCount += |
438 | test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3); | 436 | test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3); |
439 | errorCount += | 437 | errorCount += |
440 | test_file_certificates (test_fd, "AES256-SHA", CURL_SSLVERSION_TLSv1); | 438 | test_file_certificates (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3); |
441 | /* TODO resolve cipher setting issue when compiling against GNU TLS */ | 439 | /* TODO resolve cipher setting issue when compiling against GNU TLS */ |
442 | errorCount += | 440 | errorCount += |
443 | test_cipher_option (test_fd, "DES-CBC3-SHA", CURL_SSLVERSION_SSLv3); | 441 | test_cipher_option (test_fd, "DES-CBC3-SHA", CURL_SSLVERSION_SSLv3); |
@@ -445,10 +443,10 @@ main (int argc, char *const *argv) | |||
445 | test_kx_option (test_fd, "EDH-RSA-DES-CBC3-SHA", CURL_SSLVERSION_SSLv3); | 443 | test_kx_option (test_fd, "EDH-RSA-DES-CBC3-SHA", CURL_SSLVERSION_SSLv3); |
446 | 444 | ||
447 | 445 | ||
448 | curl_global_cleanup (); | 446 | curl_global_cleanup (); |
449 | fclose (test_fd); | 447 | fclose (test_fd); |
450 | 448 | ||
451 | remove (test_file_name); | 449 | remove (test_file_name); |
452 | 450 | ||
453 | return errorCount != 0; | 451 | return errorCount != 0; |
454 | } | 452 | } |
diff --git a/src/testcurl/https/mhds_multi_daemon_test.c b/src/testcurl/https/mhds_multi_daemon_test.c index 5d490d41..25974f0a 100644 --- a/src/testcurl/https/mhds_multi_daemon_test.c +++ b/src/testcurl/https/mhds_multi_daemon_test.c | |||
@@ -87,7 +87,6 @@ http_ahc (void *cls, struct MHD_Connection *connection, | |||
87 | FILE *file; | 87 | FILE *file; |
88 | struct stat buf; | 88 | struct stat buf; |
89 | 89 | ||
90 | /* TODO never respond on first call */ | ||
91 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 90 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
92 | return MHD_NO; /* unexpected method */ | 91 | return MHD_NO; /* unexpected method */ |
93 | if (&aptr != *ptr) | 92 | if (&aptr != *ptr) |
diff --git a/src/testcurl/https/tls_authentication_test.c b/src/testcurl/https/tls_authentication_test.c index 5c790b26..bb741718 100644 --- a/src/testcurl/https/tls_authentication_test.c +++ b/src/testcurl/https/tls_authentication_test.c | |||
@@ -89,7 +89,6 @@ http_ahc (void *cls, struct MHD_Connection *connection, | |||
89 | FILE *file; | 89 | FILE *file; |
90 | struct stat buf; | 90 | struct stat buf; |
91 | 91 | ||
92 | // TODO never respond on first call | ||
93 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 92 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
94 | return MHD_NO; /* unexpected method */ | 93 | return MHD_NO; /* unexpected method */ |
95 | if (&aptr != *ptr) | 94 | if (&aptr != *ptr) |