gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r29482 - libmicrohttpd/src/testcurl


From: gnunet
Subject: [GNUnet-SVN] r29482 - libmicrohttpd/src/testcurl
Date: Mon, 23 Sep 2013 13:44:23 +0200

Author: grothoff
Date: 2013-09-23 13:44:23 +0200 (Mon, 23 Sep 2013)
New Revision: 29482

Modified:
   libmicrohttpd/src/testcurl/Makefile.am
   libmicrohttpd/src/testcurl/test_digestauth.c
   libmicrohttpd/src/testcurl/test_digestauth_with_arguments.c
Log:
-need to initialize gcrypt for libcurl

Modified: libmicrohttpd/src/testcurl/Makefile.am
===================================================================
--- libmicrohttpd/src/testcurl/Makefile.am      2013-09-23 11:41:26 UTC (rev 
29481)
+++ libmicrohttpd/src/testcurl/Makefile.am      2013-09-23 11:44:23 UTC (rev 
29482)
@@ -127,13 +127,13 @@
   test_digestauth.c
 test_digestauth_LDADD = \
   $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
+  @LIBCURL@ @LIBGCRYPT_LIBS@
 
 test_digestauth_with_arguments_SOURCES = \
   test_digestauth_with_arguments.c
 test_digestauth_with_arguments_LDADD = \
   $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
+  @LIBCURL@ @LIBGCRYPT_LIBS@
 
 test_get_sendfile_SOURCES = \
   test_get_sendfile.c

Modified: libmicrohttpd/src/testcurl/test_digestauth.c
===================================================================
--- libmicrohttpd/src/testcurl/test_digestauth.c        2013-09-23 11:41:26 UTC 
(rev 29481)
+++ libmicrohttpd/src/testcurl/test_digestauth.c        2013-09-23 11:44:23 UTC 
(rev 29482)
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <gcrypt.h>
 
 #ifndef WINDOWS
 #include <sys/socket.h>
@@ -221,12 +222,20 @@
   return 0;
 }
 
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
+
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  if (0 != curl_global_init (CURL_GLOBAL_WIN32))
+  gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+  gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+#ifdef GCRYCTL_INITIALIZATION_FINISHED
+  gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+#endif
+if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testDigestAuth ();
   if (errorCount != 0)

Modified: libmicrohttpd/src/testcurl/test_digestauth_with_arguments.c
===================================================================
--- libmicrohttpd/src/testcurl/test_digestauth_with_arguments.c 2013-09-23 
11:41:26 UTC (rev 29481)
+++ libmicrohttpd/src/testcurl/test_digestauth_with_arguments.c 2013-09-23 
11:44:23 UTC (rev 29482)
@@ -23,7 +23,6 @@
  * @brief  Testcase for libmicrohttpd Digest Auth with arguments
  * @author Amr Ali
  */
-
 #include "MHD_config.h"
 #include "platform.h"
 #include <curl/curl.h>
@@ -31,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <gcrypt.h>
 
 #ifndef WINDOWS
 #include <sys/socket.h>
@@ -221,11 +221,19 @@
   return 0;
 }
 
+
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
+
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
+  gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+  gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+#ifdef GCRYCTL_INITIALIZATION_FINISHED
+  gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testDigestAuth ();




reply via email to

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