[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: implement #6418
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: implement #6418 |
Date: |
Thu, 16 Jul 2020 17:42:46 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new dabc4c2 implement #6418
dabc4c2 is described below
commit dabc4c25fcb012a28e191f206f553f7e2061cbf6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Jul 16 17:42:31 2020 +0200
implement #6418
---
src/merchant-tools/taler-merchant-setup-reserve.c | 59 +++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/src/merchant-tools/taler-merchant-setup-reserve.c
b/src/merchant-tools/taler-merchant-setup-reserve.c
index 5d5f393..e46c3a3 100644
--- a/src/merchant-tools/taler-merchant-setup-reserve.c
+++ b/src/merchant-tools/taler-merchant-setup-reserve.c
@@ -65,6 +65,31 @@ static struct GNUNET_CURL_Context *ctx;
*/
static struct GNUNET_CURL_RescheduleContext *rc;
+/**
+ * Username and password to use for client authentication
+ * (optional).
+ */
+static char *userpass;
+
+/**
+ * Type of the client's TLS certificate (optional).
+ */
+static char *certtype;
+
+/**
+ * File with the client's TLS certificate (optional).
+ */
+static char *certfile;
+
+/**
+ * File with the client's TLS private key (optional).
+ */
+static char *keyfile;
+
+/**
+ * Passphrase to decrypt client's TLS private key file (optional).
+ */
+static char *keypass;
/**
* Shutdown task (invoked when the process is being terminated)
@@ -155,6 +180,15 @@ run (void *cls,
ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule,
&rc);
rc = GNUNET_CURL_gnunet_rc_create (ctx);
+ if (NULL != userpass)
+ GNUNET_CURL_set_userpass (ctx,
+ userpass);
+ if (NULL != keyfile)
+ GNUNET_CURL_set_tlscert (ctx,
+ certtype,
+ certfile,
+ keyfile,
+ keypass);
/* setup termination logic */
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
NULL);
@@ -195,18 +229,43 @@ main (int argc,
"VALUE",
"amount to be transferred into the reserve",
&initial_amount)),
+ GNUNET_GETOPT_option_string ('A',
+ "auth",
+ "USERNAME:PASSWORD",
+ "use the given USERNAME and PASSWORD for
client authentication",
+ &userpass)),
+ GNUNET_GETOPT_option_string ('C',
+ "cert",
+ "CERTFILE",
+ "name of the TLS client certificate file",
+ &certfile)),
GNUNET_GETOPT_option_mandatory (
GNUNET_GETOPT_option_string ('e',
"exchange-url",
"URL",
"base URL of the exchange to create the
reserve at",
&exchange_base_url)),
+ GNUNET_GETOPT_option_string ('k',
+ "key",
+ "KEYFILE",
+ "file with the private TLS key for TLS client
authentication",
+ &keyfile)),
GNUNET_GETOPT_option_mandatory (
GNUNET_GETOPT_option_string ('m',
"merchant-url",
"URL",
"base URL of the merchant backend's REST
API",
&merchant_base_url)),
+ GNUNET_GETOPT_option_string ('p',
+ "pass",
+ "KEYFILEPASSPHRASE",
+ "passphrase needed to decrypt the TLS client
private key file",
+ &keypass)),
+ GNUNET_GETOPT_option_string ('t',
+ "type",
+ "CERTTYPE",
+ "type of the TLS client certificate, defaults
to PEM if not specified",
+ &certtype)),
GNUNET_GETOPT_option_mandatory (
GNUNET_GETOPT_option_string ('w',
"wire-method",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: implement #6418,
gnunet <=