donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 2af44c14378ae9a8fbae9eb95c170528f2a1e5ba
parent b2ea5fd242e33c60b3639738c90ff8a283a1df64
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Mon, 20 Nov 2023 22:49:08 +0100

[db] rename

Diffstat:
Msrc/donaudb/pg_activate_signing_key.c | 4++--
Msrc/donaudb/pg_activate_signing_key.h | 4++--
Msrc/donaudb/pg_add_donation_unit_key.c | 4++--
Msrc/donaudb/pg_add_donation_unit_key.h | 4++--
Msrc/donaudb/pg_get_donation_unit_info.c | 4++--
Msrc/donaudb/pg_get_donation_unit_info.h | 4++--
Msrc/donaudb/pg_insert_charity.c | 2+-
Msrc/donaudb/pg_insert_charity.h | 2+-
Msrc/donaudb/pg_insert_issued_receipt.c | 4++--
Msrc/donaudb/pg_insert_issued_receipt.h | 4++--
Dsrc/donaudb/pg_insert_signkey_revocation.c | 53-----------------------------------------------------
Dsrc/donaudb/pg_insert_signkey_revocation.h | 39---------------------------------------
Msrc/donaudb/pg_lookup_donation_unit_key.c | 4++--
Msrc/donaudb/pg_lookup_donation_unit_key.h | 4++--
Msrc/donaudb/pg_lookup_signing_key.c | 4++--
Msrc/donaudb/pg_lookup_signing_key.h | 4++--
Dsrc/donaudb/pg_lookup_signkey_revocation.c | 59-----------------------------------------------------------
Dsrc/donaudb/pg_lookup_signkey_revocation.h | 40----------------------------------------
18 files changed, 26 insertions(+), 217 deletions(-)

diff --git a/src/donaudb/pg_activate_signing_key.c b/src/donaudb/pg_activate_signing_key.c @@ -28,8 +28,8 @@ enum GNUNET_DB_QueryStatus TEH_PG_activate_signing_key ( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - const struct TALER_DONAUDB_SignkeyMetaData *meta) + const struct DONAU_DonauPublicKeyP *donau_pub, + const struct DONAUDB_SignkeyMetaData *meta) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam iparams[] = { diff --git a/src/donaudb/pg_activate_signing_key.h b/src/donaudb/pg_activate_signing_key.h @@ -36,7 +36,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_activate_signing_key ( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - const struct TALER_DONAUDB_SignkeyMetaData *meta); + const struct DONAU_DonauPublicKeyP *donau_pub, + const struct DONAUDB_SignkeyMetaData *meta); #endif diff --git a/src/donaudb/pg_add_donation_unit_key.c b/src/donaudb/pg_add_donation_unit_key.c @@ -29,8 +29,8 @@ enum GNUNET_DB_QueryStatus TEH_PG_add_donation_unit_key ( void *cls, - const struct TALER_DonationUnitPublicKey *donation_unit_pub, - const struct TALER_DONAUDB_DonationUnitKeyMetaData *meta) + const struct DONAU_DonationUnitPublicKey *donation_unit_pub, + const struct DONAUDB_DonationUnitKeyMetaData *meta) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam iparams[] = { diff --git a/src/donaudb/pg_add_donation_unit_key.h b/src/donaudb/pg_add_donation_unit_key.h @@ -37,6 +37,6 @@ enum GNUNET_DB_QueryStatus TEH_PG_add_donation_unit_key ( void *cls, - const struct TALER_DonationUnitPublicKey *donation_unit_pub, - const struct TALER_DONAUDB_DonationUnitKeyMetaInfo *meta) + const struct DONAU_DonationUnitPublicKey *donation_unit_pub, + const struct DONAUDB_DonationUnitKeyMetaInfo *meta) #endif diff --git a/src/donaudb/pg_get_donation_unit_info.c b/src/donaudb/pg_get_donation_unit_info.c @@ -29,8 +29,8 @@ enum GNUNET_DB_QueryStatus TEH_PG_get_donation_unit_info ( void *cls, - const struct TALER_DonationUnitHashP *donation_unit_pub_hash, - struct TALER_DONAUDB_DenominationKeyMetaData *meta) + const struct DONAU_DonationUnitHashP *donation_unit_pub_hash, + struct DONAUDB_DenominationKeyMetaData *meta) { struct PostgresClosure *pg = cls; enum GNUNET_DB_QueryStatus qs; diff --git a/src/donaudb/pg_get_donation_unit_info.h b/src/donaudb/pg_get_donation_unit_info.h @@ -35,7 +35,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_get_donation_unit_info ( void *cls, - const struct TALER_DonationUNitHashP *donation_unit_pub_hash, - struct TALER_DONAUDB_DonationUnitKeyMetaData *meta); + const struct DONAU_DonationUNitHashP *donation_unit_pub_hash, + struct DONAUDB_DonationUnitKeyMetaData *meta); #endif diff --git a/src/donaudb/pg_insert_charity.c b/src/donaudb/pg_insert_charity.c @@ -27,7 +27,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_charity (void *cls, - const struct TALER_CharityPublicKeyP *charity_pub, + const struct DONAU_CharityPublicKeyP *charity_pub, const char *charity_url, const char *charity_name, uint64_t current_year) diff --git a/src/donaudb/pg_insert_charity.h b/src/donaudb/pg_insert_charity.h @@ -37,7 +37,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_charity ( void *cls, - const struct TALER_CharityPublicKey *charity_pub, + const struct DONAU_CharityPublicKey *charity_pub, const char *charity_name, const char *charity_url, struct TALER_Amount *receipts_to_date, diff --git a/src/donaudb/pg_insert_issued_receipt.c b/src/donaudb/pg_insert_issued_receipt.c @@ -27,9 +27,9 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_issued_receipt (void *cls, - const struct TALER_CharitySignatureP *charity_sig, + const struct DONAU_CharitySignatureP *charity_sig, const uint64_t charity_id, - const struct TALER_DonationReceiptHashP h_receipt, + const struct DONAU_DonationReceiptHashP h_receipt, const struct TALER_Amount *amount) { struct PostgresClosure *pg = cls; diff --git a/src/donaudb/pg_insert_issued_receipt.h b/src/donaudb/pg_insert_issued_receipt.h @@ -36,8 +36,8 @@ */ enum GNUNET_DB_QueryStatus TEH_PG_insert_issued_receipt (void *cls, - const struct TALER_CharitySignatureP *charity_sig, + const struct DONAU_CharitySignatureP *charity_sig, const uint64_t charity_id, - const struct TALER_DonationReceiptHashP *h_receipt, + const struct DONAU_DonationReceiptHashP *h_receipt, const struct TALER_Amount *amount); #endif diff --git a/src/donaudb/pg_insert_signkey_revocation.c b/src/donaudb/pg_insert_signkey_revocation.c @@ -1,53 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ -/** - * @file donaudb/pg_insert_signkey_revocation.c - * @brief Implementation of the insert_signkey_revocation function for Postgres - * @author Christian Grothoff - */ -#include "platform.h" -#include "taler_error_codes.h" -#include "taler_dbevents.h" -#include "taler_pq_lib.h" -#include "pg_insert_signkey_revocation.h" -#include "pg_helper.h" - -enum GNUNET_DB_QueryStatus -TEH_PG_insert_signkey_revocation ( - void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - const struct TALER_MasterSignatureP *master_sig) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (donau_pub), - GNUNET_PQ_query_param_auto_from_type (master_sig), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "insert_signkey_revocation", - "INSERT INTO signkey_revocations " - "(esk_serial" - ",master_sig" - ") SELECT esk_serial, $2 " - " FROM donau_sign_keys" - " WHERE donau_pub=$1;"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_signkey_revocation", - params); -} diff --git a/src/donaudb/pg_insert_signkey_revocation.h b/src/donaudb/pg_insert_signkey_revocation.h @@ -1,39 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ -/** - * @file donaudb/pg_insert_signkey_revocation.h - * @brief implementation of the insert_signkey_revocation function for Postgres - * @author Christian Grothoff - */ -#ifndef PG_INSERT_SIGNKEY_REVOCATION_H -#define PG_INSERT_SIGNKEY_REVOCATION_H - -#include "taler_util.h" -#include "taler_json_lib.h" -#include "taler_donaudb_plugin.h" - -/** - * Store information about a revoked signing key. - * - * @param cls closure - * @param donau_pub donau online signing key that was revoked - * @return transaction status code - */ -enum GNUNET_DB_QueryStatus -TEH_PG_insert_signkey_revocation ( - void *cls, - const struct TALER_DonauPublicKeyP *donau_pub); -#endif diff --git a/src/donaudb/pg_lookup_donation_unit_key.c b/src/donaudb/pg_lookup_donation_unit_key.c @@ -28,8 +28,8 @@ enum GNUNET_DB_QueryStatus TEH_PG_lookup_donation_unit_key ( void *cls, - const struct TALER_DonationUnitHashP *h_donation_unit_pub, - struct TALER_DONAUDB_DonationUnitKeyMetaData *meta) + const struct DONAU_DonationUnitHashP *h_donation_unit_pub, + struct DONAUDB_DonationUnitKeyMetaData *meta) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { diff --git a/src/donaudb/pg_lookup_donation_unit_key.h b/src/donaudb/pg_lookup_donation_unit_key.h @@ -35,7 +35,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_lookup_donation_unit_key ( void *cls, - const struct TALER_DonationUnitHashP *h_denom_pub, - struct TALER_DONAUDB_DonationUnitKeyMetaData *meta); + const struct DONAU_DonationUnitHashP *h_denom_pub, + struct DONAUDB_DonationUnitKeyMetaData *meta); #endif diff --git a/src/donaudb/pg_lookup_signing_key.c b/src/donaudb/pg_lookup_signing_key.c @@ -29,8 +29,8 @@ enum GNUNET_DB_QueryStatus TEH_PG_lookup_signing_key ( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - struct TALER_DONAUDB_SignkeyMetaData *meta) + const struct DONAU_DonauPublicKeyP *donau_pub, + struct DONAUDB_SignkeyMetaData *meta) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { diff --git a/src/donaudb/pg_lookup_signing_key.h b/src/donaudb/pg_lookup_signing_key.h @@ -37,6 +37,6 @@ enum GNUNET_DB_QueryStatus TEH_PG_lookup_signing_key ( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - struct TALER_DONAUDB_SignkeyMetaData *meta); + const struct DONAU_DonauPublicKeyP *donau_pub, + struct DONAUDB_SignkeyMetaData *meta); #endif diff --git a/src/donaudb/pg_lookup_signkey_revocation.c b/src/donaudb/pg_lookup_signkey_revocation.c @@ -1,59 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ -/** - * @file donaudb/pg_lookup_signkey_revocation.c - * @brief Implementation of the lookup_signkey_revocation function for Postgres - * @author Christian Grothoff - */ -#include "platform.h" -#include "taler_error_codes.h" -#include "taler_dbevents.h" -#include "taler_pq_lib.h" -#include "pg_lookup_signkey_revocation.h" -#include "pg_helper.h" - - -enum GNUNET_DB_QueryStatus -TEH_PG_lookup_signkey_revocation ( - void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - struct TALER_MasterSignatureP *master_sig) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (donau_pub), - GNUNET_PQ_query_param_end - }; - struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_auto_from_type ("master_sig", - master_sig), - GNUNET_PQ_result_spec_end - }; - - PREPARE (pg, - "lookup_signkey_revocation", - "SELECT " - " master_sig" - " FROM signkey_revocations" - " WHERE esk_serial=" - " (SELECT esk_serial" - " FROM donau_sign_keys" - " WHERE donau_pub=$1);"); - return GNUNET_PQ_eval_prepared_singleton_select (pg->conn, - "lookup_signkey_revocation", - params, - rs); -} diff --git a/src/donaudb/pg_lookup_signkey_revocation.h b/src/donaudb/pg_lookup_signkey_revocation.h @@ -1,40 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ -/** - * @file donaudb/pg_lookup_signkey_revocation.h - * @brief implementation of the lookup_signkey_revocation function for Postgres - * @author Johannes Casaburi - */ -#ifndef PG_LOOKUP_SIGNKEY_REVOCATION_H -#define PG_LOOKUP_SIGNKEY_REVOCATION_H - -#include "taler_util.h" -#include "taler_json_lib.h" -#include "taler_donaudb_plugin.h" - -/** - * Obtain information about a revoked online signing key. - * - * @param cls closure - * @param donau_pub donau online signing key - * @return transaction status code - */ -enum GNUNET_DB_QueryStatus -TEH_PG_lookup_signkey_revocation ( - void *cls, - const struct TALER_DonauPublicKeyP *donau_pub); - -#endif