summaryrefslogtreecommitdiff
path: root/src/include/taler_testing_lib.h
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-02-17 15:39:44 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-02-17 15:39:44 +0100
commit844f39c85ecd85f1a49881b264bf4f10c93401e2 (patch)
treeb78da8d7f2019d618d40f69ea4b6a07a4e400291 /src/include/taler_testing_lib.h
parentd20c94d870fa6127070372ff29d119407aa94f19 (diff)
downloadexchange-844f39c85ecd85f1a49881b264bf4f10c93401e2.tar.gz
exchange-844f39c85ecd85f1a49881b264bf4f10c93401e2.tar.bz2
exchange-844f39c85ecd85f1a49881b264bf4f10c93401e2.zip
hash and public key traits.
Diffstat (limited to 'src/include/taler_testing_lib.h')
-rw-r--r--src/include/taler_testing_lib.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 34f3217ff..f2219dcf5 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1167,6 +1167,33 @@ TALER_TESTING_make_trait_peer_key
/**
+ * Obtain a public key from a "peer". Used e.g. to obtain
+ * a merchant's public key to use backend's API.
+ *
+ * @param index (tipically zero) which key to return if they
+ * exist in an array.
+ * @param pub[out] set to the key coming from @a cmd.
+ * @return #GNUNET_OK on success
+ */
+int
+TALER_TESTING_get_trait_peer_key_pub
+ (const struct TALER_TESTING_Command *cmd,
+ unsigned int index,
+ const struct GNUNET_CRYPTO_EddsaPublicKey **pub);
+
+/**
+ * @param index (tipically zero) which key to return if they
+ * exist in an array.
+ * @param pub which object should be returned
+ *
+ * @return the trait, to be put in the traits array of the command
+ */
+struct TALER_TESTING_Trait
+TALER_TESTING_make_trait_peer_key_pub
+ (unsigned int index,
+ struct GNUNET_CRYPTO_EddsaPublicKey *pub);
+
+/**
* Obtain a transfer subject from @a cmd.
*
* @param cmd command to extract trait from