aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Blättler <blatc2@bfh.ch>2024-04-21 12:32:48 +0200
committerChristian Blättler <blatc2@bfh.ch>2024-04-21 12:32:48 +0200
commitf81ee7ff118bd3c2da5ca21fd6707ba7751832e6 (patch)
treea0b44dbff857ac92793af8a2495c033d4a12afb2 /src/include
parent75588f40ec9140ceb74b80e31fbf830f5341fde7 (diff)
downloadexchange-f81ee7ff118bd3c2da5ca21fd6707ba7751832e6.tar.xz
add token issue sig helper
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h10
-rw-r--r--src/include/taler_json_lib.h12
2 files changed, 21 insertions, 1 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index bd7164ca5..429cf1cc0 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -5961,7 +5961,7 @@ struct TALER_TokenUseSignature
*/
struct TALER_TokenIssueSignature
{
- struct GNUNET_CRYPTO_UnblindedSignature signature;
+ struct GNUNET_CRYPTO_UnblindedSignature *signature;
};
/**
@@ -5972,4 +5972,12 @@ struct TALER_TokenIssueBlindSignature
struct GNUNET_CRYPTO_BlindedSignature signature;
};
+/**
+ * Free internals of @a issue_sig, but not @a issue_sig itself.
+ *
+ * @param[in] issue_sig signature to free
+ */
+void
+TALER_token_issue_sig_free (struct TALER_TokenIssueSignature *issue_sig);
+
#endif
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 98e565f0c..dad493cb6 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -588,6 +588,18 @@ TALER_JSON_spec_i18n_str (const char *name,
/**
+ * Generate line in parser specification for a
+ * token issue signature.
+ *
+ * @param field name of the field
+ * @param[out] sig the signature to initialize
+ * @return corresponding field spec
+ */
+struct GNUNET_JSON_Specification
+TALER_JSON_spec_token_issue_sig (const char *field,
+ struct TALER_TokenIssueSignature *sig);
+
+/**
* Hash a JSON for binary signing.
*
* See https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-15