summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-27 00:05:34 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-27 00:05:34 +0100
commit1e6091d1dd8ac9886d44969d3756868a4a359780 (patch)
tree61a09d10374a36ece3e8e48cafd4a79cc37867f4 /src/include
parent7ddd1da76d56b655d68f0ccfb3d8797167054407 (diff)
downloadexchange-1e6091d1dd8ac9886d44969d3756868a4a359780.tar.gz
exchange-1e6091d1dd8ac9886d44969d3756868a4a359780.tar.bz2
exchange-1e6091d1dd8ac9886d44969d3756868a4a359780.zip
cmd to add/del wire methods from list of accounts
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchange_service.h10
-rw-r--r--src/include/taler_signatures.h72
-rw-r--r--src/include/taler_testing_lib.h12
3 files changed, 86 insertions, 8 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 8a5ba311..4ad05a68 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -2451,7 +2451,10 @@ struct TALER_EXCHANGE_ManagementWireEnableHandle;
* @param salt salt to use when hashing the account for the signature
* @param payto_uri RFC 8905 URI of the exchange's bank account
* @param validity_start when was this decided?
- * @param master_sig signature affirming the wire addition
+ * @param master_sig1 signature affirming the wire addition
+ * of purpose #TALER_SIGNATURE_MASTER_ADD_WIRE
+ * @param master_sig2 signature affirming the validity of the account for clients;
+ * of purpose #TALER_SIGNATURE_MASTER_WIRE_DETAILS.
* @param cb function to call with the exchange's result
* @param cb_cls closure for @a cb
* @return the request handle; NULL upon error
@@ -2460,10 +2463,10 @@ struct TALER_EXCHANGE_ManagementWireEnableHandle *
TALER_EXCHANGE_management_enable_wire (
struct GNUNET_CURL_Context *ctx,
const char *url,
- const char *salt,
const char *payto_uri,
struct GNUNET_TIME_Absolute validity_start,
- const struct TALER_MasterSignatureP *master_sig,
+ const struct TALER_MasterSignatureP *master_sig1,
+ const struct TALER_MasterSignatureP *master_sig2,
TALER_EXCHANGE_ManagementWireEnableCallback cb,
void *cb_cls);
@@ -2504,6 +2507,7 @@ struct TALER_EXCHANGE_ManagementWireDisableHandle;
* @param payto_uri RFC 8905 URI of the exchange's bank account
* @param validity_end when was this decided?
* @param master_sig signature affirming the wire addition
+ * of purpose #TALER_SIGNATURE_MASTER_DEL_WIRE
* @param cb function to call with the exchange's result
* @param cb_cls closure for @a cb
* @return the request handle; NULL upon error
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index e732f13b..90d77244 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -47,6 +47,21 @@
/*********************************************/
/**
+ * The given revocation key was revoked and must no longer be used.
+ */
+#define TALER_SIGNATURE_MASTER_SIGNING_KEY_REVOKED 1020
+
+/**
+ * Add payto URI to the list of our wire methods.
+ */
+#define TALER_SIGNATURE_MASTER_ADD_WIRE 1021
+
+/**
+ * Remove payto URI from the list of our wire methods.
+ */
+#define TALER_SIGNATURE_MASTER_DEL_WIRE 1023
+
+/**
* Purpose for signing public keys signed by the exchange master key.
*/
#define TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY 1024
@@ -806,7 +821,7 @@ struct TALER_ExchangeKeySetPS
* @brief Signature made by the exchange offline key over the information of
* an auditor to be added to the exchange's set of auditors.
*/
-struct TALER_ExchangeAddAuditorPS
+struct TALER_MasterAddAuditorPS
{
/**
@@ -834,9 +849,9 @@ struct TALER_ExchangeAddAuditorPS
/**
* @brief Signature made by the exchange offline key over the information of
- * an auditor to be removed to the exchange's set of auditors.
+ * an auditor to be removed from the exchange's set of auditors.
*/
-struct TALER_ExchangeDelAuditorPS
+struct TALER_MasterDelAuditorPS
{
/**
@@ -859,6 +874,57 @@ struct TALER_ExchangeDelAuditorPS
/**
+ * @brief Signature made by the exchange offline key over the information of
+ * a payto:// URI to be added to the exchange's set of active wire accounts.
+ */
+struct TALER_MasterAddWirePS
+{
+
+ /**
+ * Purpose is #TALER_SIGNATURE_MASTER_ADD_WIRE. Signed
+ * by a `struct TALER_MasterPublicKeyP` using EdDSA.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Time of the change.
+ */
+ struct GNUNET_TIME_AbsoluteNBO start_date;
+
+ /**
+ * Hash over the exchange's payto URI.
+ */
+ struct GNUNET_HashCode h_wire GNUNET_PACKED;
+};
+
+
+/**
+ * @brief Signature made by the exchange offline key over the information of
+ * a wire method to be removed to the exchange's set of active accounts.
+ */
+struct TALER_MasterDelWirePS
+{
+
+ /**
+ * Purpose is #TALER_SIGNATURE_MASTER_DEL_WIRE. Signed
+ * by a `struct TALER_MasterPublicKeyP` using EdDSA.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Time of the change.
+ */
+ struct GNUNET_TIME_AbsoluteNBO end_date;
+
+ /**
+ * Hash over the exchange's payto URI.
+ */
+ struct GNUNET_HashCode h_wire GNUNET_PACKED;
+
+};
+
+
+/**
* @brief Information about a denomination key. Denomination keys
* are used to sign coins of a certain value into existence.
*/
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index b89a775e..05172644 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -2057,11 +2057,15 @@ TALER_TESTING_cmd_auditor_del (const char *label,
*
* @param label command label.
* @param payto_uri URI identifying the bank account
+ * @param expected_http_status expected HTTP status from exchange
+ * @param bad_sig should we use a bogus signature?
* @return the command
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_wire_add (const char *label,
- const char *payto_uri);
+ const char *payto_uri,
+ unsigned int expected_http_status,
+ bool bad_sig);
/**
@@ -2070,11 +2074,15 @@ TALER_TESTING_cmd_wire_add (const char *label,
*
* @param label command label.
* @param payto_uri URI identifying the bank account
+ * @param expected_http_status expected HTTP status from exchange
+ * @param bad_sig should we use a bogus signature?
* @return the command
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_wire_del (const char *label,
- const char *payto_uri);
+ const char *payto_uri,
+ unsigned int expected_http_status,
+ bool bad_sig);
/**