merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 06825b77136e5b978b10152583fff594ae0206a3
parent 43d3e62ab5321cfcbe1e4d7e77601f3f251a4a2a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 27 Jul 2020 11:31:09 +0200

Merge branch 'master' of git+ssh://git.taler.net/merchant

Diffstat:
Msrc/merchant-tools/taler-merchant-setup-reserve.c | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/merchant-tools/taler-merchant-setup-reserve.c b/src/merchant-tools/taler-merchant-setup-reserve.c @@ -87,6 +87,11 @@ static char *certfile; static char *keyfile; /** + * This value goes in the Authorization:-header. + */ +static char *apikey; + +/** * Passphrase to decrypt client's TLS private key file (optional). */ static char *keypass; @@ -189,6 +194,18 @@ run (void *cls, certfile, keyfile, keypass); + if (NULL != apikey) + { + // not assuming that libcurl copies this value. + char *auth_header; + + GNUNET_assert (GNUNET_OK == GNUNET_asprintf (&auth_header, + "Authorizattion: ApiKey %s", + apikey)); + GNUNET_CURL_append_header (ctx, + auth_header); + } + /* setup termination logic */ GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); @@ -261,6 +278,11 @@ main (int argc, "KEYFILEPASSPHRASE", "passphrase needed to decrypt the TLS client private key file", &keypass), + GNUNET_GETOPT_option_string ('K', + "apikey", + "APIKEY", + "API key to use in the HTTP request", + &apikey), GNUNET_GETOPT_option_string ('t', "type", "CERTTYPE",