summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-02 15:07:24 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-02 15:07:24 +0100
commit068433c5e7c99866a58d6be146fe25b36bb4d5b8 (patch)
treeff7b102d567a96c0bd83b38b6e5e22b5d8d67168 /src/include
parent96726fd5ab6dc067af4957c3d1826f9fd2745c95 (diff)
downloadmerchant-068433c5e7c99866a58d6be146fe25b36bb4d5b8.tar.gz
merchant-068433c5e7c99866a58d6be146fe25b36bb4d5b8.tar.bz2
merchant-068433c5e7c99866a58d6be146fe25b36bb4d5b8.zip
add rudimentary test logic for #6731
Diffstat (limited to 'src/include')
-rw-r--r--src/include/platform.h12
-rw-r--r--src/include/taler_merchant_testing_lib.h65
2 files changed, 44 insertions, 33 deletions
diff --git a/src/include/platform.h b/src/include/platform.h
index b843c298..70c296fd 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015, 2016 GNUnet e.V. and INRIA
+ Copyright (C) 2014, 2015, 2016, 2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -55,6 +55,16 @@
to "ancient" MHD releases. */
#define MHD_NO_DEPRECATION 1
+
+/**
+ * Required prefix for the authorization header as per RFC 8959.
+ * (Follows RFC 6750 albeit technically violates RFC 7235, but
+ * Mark Nottingham thinks this should be fixed by revising HTTP
+ * spec (https://github.com/httpwg/http-core/issues/733))
+ */
+#define RFC_8959_PREFIX "Bearer secret-token:"
+
+
#endif /* PLATFORM_H_ */
/* end of platform.h */
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index c1f8d4dc..4eafd6fa 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2018 Taler Systems SA
+ (C) 2018-2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
@@ -542,20 +542,19 @@ TALER_TESTING_cmd_merchant_post_orders_no_claim (const char *label,
* @return the command
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_merchant_post_orders2 (const char *label,
- const char *merchant_url,
- unsigned int http_status,
- const char *order_id,
- struct GNUNET_TIME_Absolute
- refund_deadline,
- struct GNUNET_TIME_Absolute
- pay_deadline,
- bool claim_token,
- const char *amount,
- const char *payment_target,
- const char *products,
- const char *locks,
- const char *duplicate_of);
+TALER_TESTING_cmd_merchant_post_orders2 (
+ const char *label,
+ const char *merchant_url,
+ unsigned int http_status,
+ const char *order_id,
+ struct GNUNET_TIME_Absolute refund_deadline,
+ struct GNUNET_TIME_Absolute pay_deadline,
+ bool claim_token,
+ const char *amount,
+ const char *payment_target,
+ const char *products,
+ const char *locks,
+ const char *duplicate_of);
/**
@@ -1329,15 +1328,15 @@ TALER_TESTING_cmd_tip_authorize_with_ec (const char *label,
* @param ec expected Taler-defined error code.
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_tip_authorize_from_reserve_with_ec (const char *label,
- const char *merchant_url,
- const char *exchange_url,
- const char *
- reserve_reference,
- unsigned int http_status,
- const char *justification,
- const char *amount,
- enum TALER_ErrorCode ec);
+TALER_TESTING_cmd_tip_authorize_from_reserve_with_ec (
+ const char *label,
+ const char *merchant_url,
+ const char *exchange_url,
+ const char *reserve_reference,
+ unsigned int http_status,
+ const char *justification,
+ const char *amount,
+ enum TALER_ErrorCode ec);
/**
@@ -1437,9 +1436,9 @@ TALER_TESTING_get_trait_merchant_sig (
* @return the trait
*/
struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_claim_nonce (unsigned int index,
- const struct
- GNUNET_CRYPTO_EddsaPublicKey *nonce);
+TALER_TESTING_make_trait_claim_nonce (
+ unsigned int index,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *nonce);
/**
@@ -1449,14 +1448,13 @@ TALER_TESTING_make_trait_claim_nonce (unsigned int index,
* @param index which nonce to pick if @a
* cmd has multiple on offer
* @param[out] nonce set to the wanted data.
- *
* @return #GNUNET_OK on success
*/
int
-TALER_TESTING_get_trait_claim_nonce (const struct TALER_TESTING_Command *cmd,
- unsigned int index,
- const struct
- GNUNET_CRYPTO_EddsaPublicKey **nonce);
+TALER_TESTING_get_trait_claim_nonce (
+ const struct TALER_TESTING_Command *cmd,
+ unsigned int index,
+ const struct GNUNET_CRYPTO_EddsaPublicKey **nonce);
/**
@@ -1542,6 +1540,7 @@ TALER_TESTING_get_trait_planchet_secrets (
unsigned int index,
struct TALER_PlanchetSecretsP **planchet_secrets);
+
/**
* Offer planchet secrets.
*
@@ -1554,6 +1553,7 @@ TALER_TESTING_make_trait_planchet_secrets (
unsigned int index,
const struct TALER_PlanchetSecretsP *planchet_secrets);
+
/**
* Offer tip id.
*
@@ -1566,6 +1566,7 @@ struct TALER_TESTING_Trait
TALER_TESTING_make_trait_tip_id (unsigned int index,
const struct GNUNET_HashCode *tip_id);
+
/**
* Obtain tip id from a @a cmd.
*