From 35bec60894510a3833358183db02e0c1c9cc41a2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 10 Dec 2020 11:49:20 +0100 Subject: implement POST /managment/keys --- src/include/taler_exchangedb_plugin.h | 52 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 16 deletions(-) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 65c317267..2380e71e9 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -3339,7 +3339,7 @@ struct TALER_EXCHANGEDB_Plugin /** - * Lookup information about a future denomination key. + * Lookup information about current denomination key. * * @param cls closure * @param session a session @@ -3348,7 +3348,7 @@ struct TALER_EXCHANGEDB_Plugin * @return transaction status code */ enum GNUNET_DB_QueryStatus - (*lookup_future_denomination_key)( + (*lookup_denomination_key)( void *cls, struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_denom_pub, @@ -3356,45 +3356,65 @@ struct TALER_EXCHANGEDB_Plugin /** - * Lookup information about current denomination key. + * Add denomination key. * * @param cls closure * @param session a session * @param h_denom_pub hash of the denomination public key - * @param[out] meta set to various meta data about the key + * @param denom_pub the denomination public key + * @param meta meta data about the denomination + * @param master_pub master public key (consider removing this in the future!) + * @param master_sig master signature to add * @return transaction status code */ enum GNUNET_DB_QueryStatus - (*lookup_denomination_key)( + (*add_denomination_key)( void *cls, struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_denom_pub, - struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta); + const struct TALER_DenominationPublicKey *denom_pub, + const struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta, + const struct TALER_MasterPublicKeyP *master_pub, + const struct TALER_MasterSignatureP *master_sig); /** - * Activate future denomination key, turning it into a "current" or "valid" - * denomination key by adding the master signature. Deletes the - * denomination key from the 'future' table an inserts the data into the - * main denominations table. Because this function will trigger multiple SQL - * statements, it must be run within a transaction. + * Activate future signing key, turning it into a "current" or "valid" + * denomination key by adding the master signature. * * @param cls closure * @param session a session - * @param h_denom_pub hash of the denomination public key - * @param master_pub master public key used for @a master_sig + * @param exchange_pub the exchange online signing public key + * @param meta meta data about @a exchange_pub * @param master_sig master signature to add * @return transaction status code */ enum GNUNET_DB_QueryStatus - (*activate_denomination_key)( + (*activate_signing_key)( void *cls, struct TALER_EXCHANGEDB_Session *session, - const struct GNUNET_HashCode *h_denom_pub, - const struct TALER_MasterPublicKeyP *master_pub, + const struct TALER_ExchangePublicKeyP *exchange_pub, + const struct TALER_EXCHANGEDB_SignkeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig); + /** + * Lookup signing key meta data. + * + * @param cls closure + * @param session a session + * @param exchange_pub the exchange online signing public key + * @param[out] meta meta data about @a exchange_pub + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*lookup_signing_key)( + void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_ExchangePublicKeyP *exchange_pub, + struct TALER_EXCHANGEDB_SignkeyMetaData *meta); + + /** * Insert information about an auditor auditing a denomination key. * -- cgit v1.2.3