insert_exchange_signkey.h (2077B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2022 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify it under the 6 terms of the GNU General Public License as published by the Free Software 7 Foundation; either version 3, or (at your option) any later version. 8 9 TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along with 14 TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file insert_exchange_signkey.h 18 * @brief implementation of the insert_exchange_signkey function 19 * @author Christian Grothoff 20 */ 21 #ifndef AUDITOR_DATABASE_INSERT_EXCHANGE_SIGNKEY_H 22 #define AUDITOR_DATABASE_INSERT_EXCHANGE_SIGNKEY_H 23 24 #include "taler/taler_auditordb_lib.h" 25 26 27 /** 28 * Information about a signing key of an exchange. 29 */ 30 struct TALER_AUDITORDB_ExchangeSigningKey 31 { 32 33 /** 34 * When does @e exchange_pub start to be used? 35 */ 36 struct GNUNET_TIME_Timestamp ep_start; 37 38 /** 39 * When will the exchange stop signing with @e exchange_pub? 40 */ 41 struct GNUNET_TIME_Timestamp ep_expire; 42 43 /** 44 * When does the signing key expire (for legal disputes)? 45 */ 46 struct GNUNET_TIME_Timestamp ep_end; 47 48 /** 49 * What is the public offline signing key this is all about? 50 */ 51 struct TALER_ExchangePublicKeyP exchange_pub; 52 53 /** 54 * Signature by the offline master key affirming the above. 55 */ 56 struct TALER_MasterSignatureP master_sig; 57 }; 58 59 60 /** 61 * Insert information about a signing key of the exchange. 62 * 63 * @param pg the database context 64 * @param sk signing key information to store 65 * @return query result status 66 */ 67 enum GNUNET_DB_QueryStatus 68 AUDITORDB_insert_exchange_signkey (struct AUDITORDB_PostgresContext *pg, 69 const struct 70 TALER_AUDITORDB_ExchangeSigningKey *sk); 71 72 #endif