[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22116 - libmicrohttpd/src/testcurl/https
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22116 - libmicrohttpd/src/testcurl/https |
Date: |
Tue, 19 Jun 2012 19:44:15 +0200 |
Author: grothoff
Date: 2012-06-19 19:44:15 +0200 (Tue, 19 Jun 2012)
New Revision: 22116
Modified:
libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
Log:
Mike Crowe:
According to the libcurl documentation the parameter to curl_version_info
should be CURLVERSION_NOW rather than a bit value from the features
bitmask.
Also, on my installation at least libssh_version is NULL so the check
segfaults. It would seem that ssl_version is a more appropriate field to
check.
Finally, if libcurl lacks SSL support them ssl_version may be NULL. Make sure we
don't segfault inside strcasestr if that is the case.
Modified: libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
2012-06-19 14:52:26 UTC (rev 22115)
+++ libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
2012-06-19 17:44:15 UTC (rev 22116)
@@ -126,12 +126,19 @@
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ const char *ssl_version;
/* initialize random seed used by curl clients */
unsigned int iseed = (unsigned int) time (NULL);
srand (iseed);
- if (NULL != strcasestr (curl_version_info
(CURL_VERSION_SSL)->libssh_version, "openssl"))
+ ssl_version = curl_version_info (CURLVERSION_NOW)->ssl_version;
+ if (NULL == ssl_version)
{
+ fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
+ return 0;
+ }
+ if (NULL != strcasestr (ssl_version, "openssl"))
+ {
fprintf (stderr, "Refusing to run test with OpenSSL. Please install
libcurl-gnutls\n");
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22116 - libmicrohttpd/src/testcurl/https,
gnunet <=