[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libebics] branch master updated: ifdef-ing TLS checking of
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libebics] branch master updated: ifdef-ing TLS checking of certificates. |
Date: |
Tue, 23 Oct 2018 19:06:38 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libebics.
The following commit(s) were added to refs/heads/master by this push:
new 24edec6 ifdef-ing TLS checking of certificates.
24edec6 is described below
commit 24edec6ac78ec03d20f3f3c520ed0d5a2c4e6056
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Oct 23 19:04:57 2018 +0200
ifdef-ing TLS checking of certificates.
---
src/libebics.c | 34 ++++++++++++++++++++++++++++------
src/sandbox_tests.c | 3 +--
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/src/libebics.c b/src/libebics.c
index 4a3d2ab..544a061 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -114,7 +114,7 @@ init_libgnutls()
"Initializing 'libgnutls'\n");
gnutls_global_init ();
gnutls_global_set_log_function (&gnutlslog);
- gnutls_global_set_log_level (99);
+ gnutls_global_set_log_level (2);
return EBICS_SUCCESS;
}
@@ -658,6 +658,11 @@ parse_response (struct GNUNET_CURL_DownloadBuffer *db,
http_status = 0;
job = NULL;
+ /* Trying status code extraction anyway. */
+ curl_easy_getinfo (eh,
+ CURLINFO_RESPONSE_CODE,
+ &http_status);
+
if (0 == db->eno)
{
char *url;
@@ -677,11 +682,6 @@ parse_response (struct GNUNET_CURL_DownloadBuffer *db,
XML_PARSE_NOBLANKS)))
LOG (EBICS_LOGLEVEL_ERROR,
"Could not parse response body\n");
- else
- /* Parsing succeeded, extracting the status code now */
- curl_easy_getinfo (eh,
- CURLINFO_RESPONSE_CODE,
- &http_status);
}
return doc;
@@ -1074,6 +1074,16 @@ EBICS_send_message (const struct EBICS_genex_document
*document,
xmlChar *buf;
CURL *eh;
+/**
+ * Disable certificate verification.
+ */
+#define BENEVOLENT
+
+/**
+ * Disable host verification.
+ */
+#define EXTRA_BENEVOLENT
+
#define SETOPT(eh,opt,par) \
if (CURLE_OK != curl_easy_setopt (eh, opt, par)) \
{ \
@@ -1108,6 +1118,18 @@ EBICS_send_message (const struct EBICS_genex_document
*document,
CURLOPT_HTTPHEADER,
custom_headers);
+ #ifdef BENEVOLENT
+ SETOPT (eh,
+ CURLOPT_SSL_VERIFYPEER,
+ 0L);
+ #endif
+
+ #ifdef EXTRA_BENEVOLENT
+ SETOPT (eh,
+ CURLOPT_SSL_VERIFYHOST,
+ 0L);
+ #endif
+
xmlFree (buf);
if (NULL == (job = GNUNET_CURL_job_add (ctx,
diff --git a/src/sandbox_tests.c b/src/sandbox_tests.c
index c384a16..dc2d6b6 100644
--- a/src/sandbox_tests.c
+++ b/src/sandbox_tests.c
@@ -32,8 +32,7 @@
#define KEYS_DIR "./test_keys"
-#define BANK_URL "http://localhost:9999/"
-// #define BANK_URL
"https://server-ebics.webank.fr:28103/WbkPortalFileTransfert/EbicsProtocol"
+#define BANK_URL
"https://server-ebics.webank.fr:28103/WbkPortalFileTransfert/EbicsProtocol"
#define E001_DIGEST "9BF804AF2B121A5B94C82BFD8E406FFB18024D3D4BF9E"
#define X001_DIGEST "9BF804AF2B121A5B94C82BFD8E406FFB18024D3D4BF9E"
#define HOST_ID "EBIXQUAL"
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libebics] branch master updated: ifdef-ing TLS checking of certificates.,
gnunet <=