gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7477 - in libmicrohttpd: . src/daemon src/daemon/https/tls


From: gnunet
Subject: [GNUnet-SVN] r7477 - in libmicrohttpd: . src/daemon src/daemon/https/tls src/daemon/https/x509 src/testcurl/https
Date: Sat, 19 Jul 2008 22:38:41 -0600 (MDT)

Author: lv-426
Date: 2008-07-19 22:38:41 -0600 (Sat, 19 Jul 2008)
New Revision: 7477

Modified:
   libmicrohttpd/configure.ac
   libmicrohttpd/src/daemon/Makefile.am
   libmicrohttpd/src/daemon/connection_https.c
   libmicrohttpd/src/daemon/https/tls/Makefile.am
   libmicrohttpd/src/daemon/https/x509/pkcs12.h
   libmicrohttpd/src/daemon/https/x509/x509.h
   libmicrohttpd/src/daemon/internal.h
   libmicrohttpd/src/testcurl/https/Makefile.am
   libmicrohttpd/src/testcurl/https/mhds_get_test.c
   libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c
   libmicrohttpd/src/testcurl/https/tls_authentication_test.c
Log:
configure.ac: libgcrypt required for HTTPS support
some makefile issues
all cURL tests set to use SSLv3 [temporary]

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2008-07-20 04:08:37 UTC (rev 7476)
+++ libmicrohttpd/configure.ac  2008-07-20 04:38:41 UTC (rev 7477)
@@ -207,30 +207,17 @@
 AM_CONDITIONAL(ENABLE_OPENPGP, test "$enable_openpgp" = "yes")
 
 
-# Symbols required by GNU_TLS 
-AC_DEFINE([ENABLE_MINITASN1],[1],[Include minitasn1 support])
-AC_DEFINE([GNULIB_GC_HMAC_SHA1],[1],[GNULIB_GC_HMAC_SHA1])
-AC_DEFINE([GNULIB_GC_RANDOM],[1],[GNULIB_GC_RANDOM])
-AC_DEFINE([ENABLE_PKI],[1],[Include ENABLE_OPENPGP support])
-AC_DEFINE([ENABLE_INCLUDED_OPENCDK],[1],[Include ENABLE_INCLUDED_OPENCDK 
support])
-# gnutls debug support
-AC_DEFINE([DEBUG],[1],[Include gnutls debug message support])
-AC_DEFINE([C99_MACROS],[1],[Include gnutls debug message support])
-
-AC_DEFINE([ENABLE_OPENSSL],[0],[Include ENABLE_OPENSSL support])
-AC_DEFINE([HAVE_LD_OUTPUT_DEF],[0],[Include HAVE_LD_OUTPUT_DEF support])
-AC_DEFINE([HAVE_LD_VERSION_SCRIPT],[0],[Include HAVE_LD_VERSION_SCRIPT 
support])
-
-# Libgcrypt linkage
+# Libgcrypt linkage : required for HTTPS support 
+AC_CHECK_HEADERS(gcrypt.h,gcrypt=true,gcrypt=false)
 AC_ARG_WITH(libgcrypt,
   [AS_HELP_STRING([--with-libgcrypt=PFX],
                [Base of libgcrypt installation])],
   [AC_MSG_RESULT("$with_libgcrypt")
    case $with_libgcrypt in
    no)
+     gcrypt=false
      ;;
    yes)
-       AC_CHECK_HEADERS(gcrypt.h,gcrypt=true)
      ;;
    *)
     LDFLAGS="-L$with_libgcrypt/lib $LDFLAGS"
@@ -241,7 +228,8 @@
        GCRYPT_LIB_PATH="$with_libgcrypt/lib"
        GCRYPT_LDFLAGS="-L$with_libgcrypt/lib"
        GCRYPT_CPPFLAGS="-I$with_libgcrypt/include"
-       libgcrypt=true))
+       gcrypt=true,
+       gcrypt=false))
     LDFLAGS=$SAVE_LDFLAGS
     CPPFLAGS=$SAVE_CPPFLAGS
     ;;
@@ -257,6 +245,21 @@
 AC_SUBST(GCRYPT_LDFLAGS)
 AC_SUBST(GCRYPT_CPPFLAGS)
 
+# Symbols required by GNU_TLS 
+AC_DEFINE([ENABLE_MINITASN1],[1],[Include minitasn1 support])
+AC_DEFINE([GNULIB_GC_HMAC_SHA1],[1],[GNULIB_GC_HMAC_SHA1])
+AC_DEFINE([GNULIB_GC_RANDOM],[1],[GNULIB_GC_RANDOM])
+AC_DEFINE([ENABLE_PKI],[1],[Include ENABLE_OPENPGP support])
+AC_DEFINE([ENABLE_INCLUDED_OPENCDK],[1],[Include ENABLE_INCLUDED_OPENCDK 
support])
+# gnutls debug support
+AC_DEFINE([DEBUG],[1],[Include gnutls debug message support])
+AC_DEFINE([C99_MACROS],[1],[Include gnutls debug message support])
+
+AC_DEFINE([ENABLE_OPENSSL],[0],[Include ENABLE_OPENSSL support])
+AC_DEFINE([HAVE_LD_OUTPUT_DEF],[0],[Include HAVE_LD_OUTPUT_DEF support])
+AC_DEFINE([HAVE_LD_VERSION_SCRIPT],[0],[Include HAVE_LD_VERSION_SCRIPT 
support])
+
+
 AC_SUBST(CPPFLAGS)
 AC_SUBST(LIBS)
 AC_SUBST(LDFLAGS)
@@ -293,4 +296,9 @@
 if test "$curl" != 1
 then
  AC_MSG_NOTICE([WARNING: libcurl not found, testcases cannot be built.])
-fi
\ No newline at end of file
+fi
+if test "$gcrypt" != true
+then
+ AC_MSG_NOTICE([WARNING: libgcrypt not found, HTTPS supprot cannot be built.])
+fi
+

Modified: libmicrohttpd/src/daemon/Makefile.am
===================================================================
--- libmicrohttpd/src/daemon/Makefile.am        2008-07-20 04:08:37 UTC (rev 
7476)
+++ libmicrohttpd/src/daemon/Makefile.am        2008-07-20 04:38:41 UTC (rev 
7477)
@@ -3,6 +3,7 @@
 -I$(top_srcdir)/src/daemon \
 -I$(top_srcdir)/src/daemon/https/lgl \
 -I$(top_srcdir)/src/daemon/https/x509 \
+-I$(top_srcdir)/src/daemon/https/minitasn1 \
 -I$(top_srcdir)/src/daemon/https/openpgp \
 -I$(top_srcdir)/src/daemon/https/opencdk \
 -I$(top_srcdir)/src/daemon/https/tls \

Modified: libmicrohttpd/src/daemon/connection_https.c
===================================================================
--- libmicrohttpd/src/daemon/connection_https.c 2008-07-20 04:08:37 UTC (rev 
7476)
+++ libmicrohttpd/src/daemon/connection_https.c 2008-07-20 04:38:41 UTC (rev 
7477)
@@ -37,7 +37,7 @@
 #include "gnutls_int.h"
 #include "gnutls_record.h"
 
-/* TODO rm */
+/* TODO rm #include "gnutls_errors.h" */
 #include "gnutls_errors.h"
 
 /* forward declarations used when setting secure connection callbacks */
@@ -45,7 +45,6 @@
 int MHD_connection_handle_write (struct MHD_Connection *connection);
 int MHD_connection_handle_idle (struct MHD_Connection *connection);
 
-/* TODO rm - appears in a switch default clause */
 static void
 MHD_tls_connection_close (struct MHD_Connection *connection)
 {
@@ -63,11 +62,10 @@
                                           MHD_REQUEST_TERMINATED_COMPLETED_OK);
 }
 
-/* TODO add error connection termination */
 static void
 MHD_tls_connection_close_err (struct MHD_Connection *connection)
 {
-  /* TODO impl */
+  /* TODO impl MHD_tls_connection_close_err */
 }
 
 union MHD_SessionInfo

Modified: libmicrohttpd/src/daemon/https/tls/Makefile.am
===================================================================
--- libmicrohttpd/src/daemon/https/tls/Makefile.am      2008-07-20 04:08:37 UTC 
(rev 7476)
+++ libmicrohttpd/src/daemon/https/tls/Makefile.am      2008-07-20 04:38:41 UTC 
(rev 7477)
@@ -6,6 +6,7 @@
 -I$(top_srcdir)/src/daemon/https \
 -I$(top_srcdir)/src/daemon/https/tls \
 -I$(top_srcdir)/src/daemon/https/lgl \
+-I$(top_srcdir)/src/daemon/https/minitasn1 \
 -I$(top_srcdir)/src/daemon/https/x509 \
 -I$(top_srcdir)/src/daemon/https/openpgp \
 -I$(top_srcdir)/src/daemon/https/opencdk \

Modified: libmicrohttpd/src/daemon/https/x509/pkcs12.h
===================================================================
--- libmicrohttpd/src/daemon/https/x509/pkcs12.h        2008-07-20 04:08:37 UTC 
(rev 7476)
+++ libmicrohttpd/src/daemon/https/x509/pkcs12.h        2008-07-20 04:38:41 UTC 
(rev 7477)
@@ -22,10 +22,10 @@
  *
  */
 
-// TODO clean
+/* TODO clean */
 
 #ifndef GNUTLS_PKCS12_H
-# define GNUTLS_PKCS12_H
+#define GNUTLS_PKCS12_H
 
 #ifdef __cplusplus
 extern "C"
@@ -36,7 +36,7 @@
 
 #define MAX_BAG_ELEMENTS 32
 
-/* PKCS12 structures handling 
+/* PKCS12 structures handling
  */
 struct gnutls_pkcs12_int;
 

Modified: libmicrohttpd/src/daemon/https/x509/x509.h
===================================================================
--- libmicrohttpd/src/daemon/https/x509/x509.h  2008-07-20 04:08:37 UTC (rev 
7476)
+++ libmicrohttpd/src/daemon/https/x509/x509.h  2008-07-20 04:38:41 UTC (rev 
7477)
@@ -33,7 +33,6 @@
 #endif
 
 #include <gnutls.h>
-// TODO #include "libtasn1.h"
 #include "gnutls_mpi.h"
 
 /* Some OIDs usually found in Distinguished names, or

Modified: libmicrohttpd/src/daemon/internal.h
===================================================================
--- libmicrohttpd/src/daemon/internal.h 2008-07-20 04:08:37 UTC (rev 7476)
+++ libmicrohttpd/src/daemon/internal.h 2008-07-20 04:38:41 UTC (rev 7477)
@@ -530,7 +530,6 @@
   unsigned int current_chunk_offset;
 
   /* handlers used for processing read, write & idle connection operations */
-  /* TODO fix sig */
   int (*read_handler) (struct MHD_Connection * connection);
 
   int (*write_handler) (struct MHD_Connection * connection);

Modified: libmicrohttpd/src/testcurl/https/Makefile.am
===================================================================
--- libmicrohttpd/src/testcurl/https/Makefile.am        2008-07-20 04:08:37 UTC 
(rev 7476)
+++ libmicrohttpd/src/testcurl/https/Makefile.am        2008-07-20 04:38:41 UTC 
(rev 7477)
@@ -13,7 +13,7 @@
    mhds_get_test \
    tls_authentication_test \
    mhds_multi_daemon_test \
-   mhds_session_info_test
+   mhds_session_info_test   
    
 TESTS = $(check_PROGRAMS)
 

Modified: libmicrohttpd/src/testcurl/https/mhds_get_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/mhds_get_test.c    2008-07-20 04:08:37 UTC 
(rev 7476)
+++ libmicrohttpd/src/testcurl/https/mhds_get_test.c    2008-07-20 04:38:41 UTC 
(rev 7477)
@@ -90,7 +90,6 @@
   FILE *file;
   struct stat buf;
 
-  // TODO never respond on first call
   if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
     return MHD_NO;              /* unexpected method */
   if (&aptr != *ptr)
@@ -178,7 +177,7 @@
 
   c = curl_easy_init ();
 #ifdef DEBUG
-  //curl_easy_setopt (c, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt (c, CURLOPT_VERBOSE, 1);
 #endif
   curl_easy_setopt (c, CURLOPT_URL, url);
   curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
@@ -263,7 +262,6 @@
   sprintf (cert_path, "%s/%s", cur_dir, "cert.pem");
   sprintf (key_path, "%s/%s", cur_dir, "key.pem");
 
-
   if (NULL == (key_fd = fopen (key_path, "w+")))
     {
       fprintf (stderr, MHD_E_KEY_FILE_CREAT);
@@ -433,11 +431,11 @@
     }
 
   errorCount +=
-    test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_TLSv1);
+    test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3);
   errorCount +=
     test_secure_get (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3);
   errorCount +=
-    test_file_certificates (test_fd, "AES256-SHA", CURL_SSLVERSION_TLSv1);
+    test_file_certificates (test_fd, "AES256-SHA", CURL_SSLVERSION_SSLv3);
   /* TODO resolve cipher setting issue when compiling against GNU TLS */
   errorCount +=
     test_cipher_option (test_fd, "DES-CBC3-SHA", CURL_SSLVERSION_SSLv3);
@@ -445,10 +443,10 @@
     test_kx_option (test_fd, "EDH-RSA-DES-CBC3-SHA", CURL_SSLVERSION_SSLv3);
 
 
-  curl_global_cleanup ();
-  fclose (test_fd);
+   curl_global_cleanup ();
+   fclose (test_fd);
 
-  remove (test_file_name);
+   remove (test_file_name);
 
   return errorCount != 0;
 }

Modified: libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c   2008-07-20 
04:08:37 UTC (rev 7476)
+++ libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c   2008-07-20 
04:38:41 UTC (rev 7477)
@@ -87,7 +87,6 @@
   FILE *file;
   struct stat buf;
 
-  /* TODO never respond on first call */
   if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
     return MHD_NO;              /* unexpected method */
   if (&aptr != *ptr)

Modified: libmicrohttpd/src/testcurl/https/tls_authentication_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_authentication_test.c  2008-07-20 
04:08:37 UTC (rev 7476)
+++ libmicrohttpd/src/testcurl/https/tls_authentication_test.c  2008-07-20 
04:38:41 UTC (rev 7477)
@@ -89,7 +89,6 @@
   FILE *file;
   struct stat buf;
 
-  // TODO never respond on first call
   if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
     return MHD_NO;              /* unexpected method */
   if (&aptr != *ptr)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]