diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-17 19:45:30 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-17 19:45:30 +0200 |
commit | 759837da70a819ce1c32efd5e2db6537367e098b (patch) | |
tree | becf5a1f6c77a70c27b88eb6ae6e725db2894f0b /src/mint/taler-mint-httpd_test.h | |
parent | c90e479ea5dcb5c994d765110fa01e88fced7e12 (diff) |
adding /test/ecdsa and /test/eddsa to test client signing and verification over Curve25519
Diffstat (limited to 'src/mint/taler-mint-httpd_test.h')
-rw-r--r-- | src/mint/taler-mint-httpd_test.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd_test.h b/src/mint/taler-mint-httpd_test.h index 6584af581..609473ec1 100644 --- a/src/mint/taler-mint-httpd_test.h +++ b/src/mint/taler-mint-httpd_test.h @@ -50,6 +50,52 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh, /** + * Handle a "/test/ecdsa" request. Parses the JSON in the post, + * which must contain a "ecdsa_pub" with a public key and an + *"ecdsa_sig" with the corresponding signature for a purpose + * of #TALER_SIGNATURE_CLIENT_TEST_ECDSA. If the signature is + * valid, a reply with a #TALER_SIGNATURE_MINT_TEST_ECDSA is + * returned using the same JSON format. + * + * @param rh context of the handler + * @param connection the MHD connection to handle + * @param[in,out] connection_cls the connection's closure (can be updated) + * @param upload_data upload data + * @param[in,out] upload_data_size number of bytes (left) in @a upload_data + * @return MHD result code + */ +int +TMH_TEST_handler_test_ecdsa (struct TMH_RequestHandler *rh, + struct MHD_Connection *connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size); + + +/** + * Handle a "/test/eddsa" request. Parses the JSON in the post, + * which must contain a "eddsa_pub" with a public key and an + *"ecdsa_sig" with the corresponding signature for a purpose + * of #TALER_SIGNATURE_CLIENT_TEST_EDDSA. If the signature is + * valid, a reply with a #TALER_SIGNATURE_MINT_TEST_EDDSA is + * returned using the same JSON format. + * + * @param rh context of the handler + * @param connection the MHD connection to handle + * @param[in,out] connection_cls the connection's closure (can be updated) + * @param upload_data upload data + * @param[in,out] upload_data_size number of bytes (left) in @a upload_data + * @return MHD result code + */ +int +TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh, + struct MHD_Connection *connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size); + + +/** * Handle a "/test" request. Parses the JSON in the post. * * @param rh context of the handler |