gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: fix build issue with


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: fix build issue with GnuTLS < 3.0
Date: Wed, 14 Nov 2018 14:01:50 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 64e14805 fix build issue with GnuTLS < 3.0
64e14805 is described below

commit 64e1480540f86081d900592b4940d5edc42ff739
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Nov 14 14:01:49 2018 +0100

    fix build issue with GnuTLS < 3.0
---
 ChangeLog                 |  3 +++
 src/microhttpd/daemon.c   | 21 ++++++++++++++++++---
 src/microhttpd/internal.h |  2 +-
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 447562df..eae462f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Wed Nov 14 14:01:21 CET 2018
+       Fix build issue with GnuTLS < 3.0. -CG
+
 Mon Nov 12 19:50:43 CET 2018
        Fix #5473 (test case failure due to change in libcurl). -eworm
 
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2b7bb66d..90c09d29 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2177,6 +2177,7 @@ psk_gnutls_adapter (gnutls_session_t session,
     return -1;
   }
   daemon = connection->daemon;
+#if GNUTLS_VERSION_MAJOR >= 3
   if (NULL == daemon->cred_callback)
   {
 #ifdef HAVE_MESSAGES
@@ -2206,6 +2207,13 @@ psk_gnutls_adapter (gnutls_session_t session,
          app_psk_size);
   free (app_psk);
   return 0;
+#else
+#ifdef HAVE_MESSAGES
+    MHD_DLOG (daemon,
+             _("PSK not supported by this server.\n"));
+#endif
+    return -1;
+#endif
 }
 #endif /* HTTPS_SUPPORT */
 
@@ -3435,7 +3443,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
 #ifdef EPOLL_SUPPORT
       int ret = MHD_epoll (daemon,
                           MHD_NO);
- 
+
       MHD_cleanup_connections (daemon);
       return ret;
 #else  /* ! EPOLL_SUPPORT */
@@ -5190,11 +5198,18 @@ parse_options_va (struct MHD_Daemon *daemon,
           break;
 #ifdef HTTPS_SUPPORT
         case MHD_OPTION_GNUTLS_PSK_CRED_HANDLER:
+#if GNUTLS_VERSION_MAJOR >= 3
           daemon->cred_callback = va_arg (ap,
                                           MHD_PskServerCredentialsCallback);
          daemon->cred_callback_cls = va_arg (ap,
                                              void *);
           break;
+#else
+          MHD_DLOG (daemon,
+                    _("MHD HTTPS option %d passed to MHD compiled without 
GNUtls >= 3\n"),
+                    opt);
+          return MHD_NO;
+#endif
 #endif /* HTTPS_SUPPORT */
         default:
 #ifdef HAVE_MESSAGES
@@ -5534,8 +5549,8 @@ MHD_start_daemon_va (unsigned int flags,
 
   if ( (NULL != daemon->notify_completed) &&
        (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) )
-    *pflags |= MHD_USE_ITC; /* requires ITC */    
-  
+    *pflags |= MHD_USE_ITC; /* requires ITC */
+
 #ifndef NDEBUG
 #ifdef HAVE_MESSAGES
   MHD_DLOG (daemon,
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index d1835ea0..4ae577de 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1,6 +1,6 @@
 /*
   This file is part of libmicrohttpd
-  Copyright (C) 2007-2017 Daniel Pittman and Christian Grothoff
+  Copyright (C) 2007-2018 Daniel Pittman and Christian Grothoff
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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