diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-21 21:49:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-21 21:49:05 +0200 |
commit | 6d323a50d2387a74f5822d83cb81c45682eae478 (patch) | |
tree | 387b7fa24b1b211eb4f04ecf1591482ec1f539b1 /src/mint-lib/mint_api_json.h | |
parent | a334005e3d6dd349923dea3030b4105be73a3e06 (diff) | |
download | exchange-6d323a50d2387a74f5822d83cb81c45682eae478.tar.gz exchange-6d323a50d2387a74f5822d83cb81c45682eae478.tar.bz2 exchange-6d323a50d2387a74f5822d83cb81c45682eae478.zip |
marking remaining FIXMEs for #3516
Diffstat (limited to 'src/mint-lib/mint_api_json.h')
-rw-r--r-- | src/mint-lib/mint_api_json.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/mint-lib/mint_api_json.h b/src/mint-lib/mint_api_json.h index 78107ed9e..91679831d 100644 --- a/src/mint-lib/mint_api_json.h +++ b/src/mint-lib/mint_api_json.h @@ -69,9 +69,9 @@ enum MAJ_Command MAJ_CMD_RSA_SIGNATURE, /** - * Parse at current position. + * Parse object with EdDSA signature and purpose at current position. */ - MAJ_CMD_A, + MAJ_CMD_EDDSA_SIGNATURE, /** * Parse at current position. @@ -159,6 +159,23 @@ struct MAJ_Specification */ struct GNUNET_CRYPTO_rsa_Signature **rsa_signature; + /** + * Details for #MAJ_CMD_EDDSA_SIGNATURE + */ + struct { + + /** + * Where to store the purpose. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose **purpose_p; + + /** + * Key to verify the signature against. + */ + const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key; + + } eddsa_signature; + } details; }; @@ -224,6 +241,20 @@ MAJ_spec_amount (const char *name, /** + * Specification for parsing an EdDSA object signature with purpose. + * Also validates the signature (!). + * + * @param name name of the JSON field + * @param purpose_p where to store the purpose + * @param pub_key public key to use for validation + */ +struct MAJ_Specification +MAJ_spec_eddsa_signed_purpose (const char *name, + struct GNUNET_CRYPTO_EccSignaturePurpose **purpose_p, + const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key); + + +/** * Specification for parsing an RSA public key. * * @param name name of the JSON field |