gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35243 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r35243 - libmicrohttpd/src/microhttpd
Date: Thu, 12 Feb 2015 17:47:03 +0100

Author: grothoff
Date: 2015-02-12 17:47:03 +0100 (Thu, 12 Feb 2015)
New Revision: 35243

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
check GNUtls version

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2015-02-12 15:26:13 UTC (rev 
35242)
+++ libmicrohttpd/src/microhttpd/daemon.c       2015-02-12 16:47:03 UTC (rev 
35243)
@@ -546,13 +546,22 @@
       cert.data = (unsigned char *) daemon->https_mem_cert;
       cert.size = strlen (daemon->https_mem_cert);
 
-      if (NULL != daemon->https_key_password)
+      if (NULL != daemon->https_key_password) {
+#if GNUTLS_VERSION_MAJOR >= 3
         ret = gnutls_certificate_set_x509_key_mem2 (daemon->x509_cred,
                                                     &cert, &key,
                                                     GNUTLS_X509_FMT_PEM,
                                                     daemon->https_key_password,
                                                     0);
-
+#else
+#if HAVE_MESSAGES
+       MHD_DLOG (daemon,
+                  "Failed to setup x509 certificate/key: pre 3.X.X version " \
+                 "of GnuTLS does not support setting key password");
+#endif
+       return -1;
+#endif
+      }
       else
         ret = gnutls_certificate_set_x509_key_mem (daemon->x509_cred,
                                                    &cert, &key,




reply via email to

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