taler-mailbox

Service for asynchronous wallet-to-wallet payment messages
Log | Files | Refs | Submodules | README | LICENSE

commit 6810de69cbe348c7bbf42d42eb28a3eaa3ab204d
parent 1046ce9f9e5549c4c657ce8870a09272af048e42
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sat,  8 Nov 2025 21:31:12 +0100

update gana go signature case

Diffstat:
Minternal/gana/taler_signatures.go | 320++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mpkg/rest/mailbox.go | 14+++++++-------
2 files changed, 167 insertions(+), 167 deletions(-)

diff --git a/internal/gana/taler_signatures.go b/internal/gana/taler_signatures.go @@ -1,23 +1,23 @@ /* - This file is part of GNU Taler - Copyright (C) 2012-2022 Taler Systems SA + This file is part of Gnu Taler + Copyright (C) 2012-2025 Taler Systems Sa - GNU Taler is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published + Gnu Taler is free software: you can redistribute it and/or modify it + under the terms of the Gnu Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - GNU Taler is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Gnu Taler is distributed in the hope that it will be useful, but + Without Any Warranty; without even the implied warranty of + Merchantability or Fitness For A Particular Purpose. See the Gnu Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License + You should have received a copy of the Gnu Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. - SPDX-License-Identifier: LGPL3.0-or-later + Spdx-License-Identifier: Lgpl3.0-or-later - Note: the LGPL does not apply to all components of GNU Taler, + Note: the Lgpl does not apply to all components of Gnu Taler, but it does apply to this file. */ @@ -27,451 +27,451 @@ const ( /** - * Initialize or update the status of an AML key for an AML officer (GNU Taler) + * Initialize or update the status of an Aml key for an Aml officer (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_AML_KEY = 1017 + TalerSignaturePurposeMasterAmlKey = 1017 /** - * Affirm wiring of exchange profits to operator account. (GNU Taler) + * Affirm wiring of exchange profits to operator account. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_DRAIN_PROFIT = 1018 + TalerSignaturePurposeMasterDrainProfit = 1018 /** - * Signature affirming a partner configuration for wads. (GNU Taler) + * Signature affirming a partner configuration for wads. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_PARTNER_DETAILS = 1019 + TalerSignaturePurposeMasterPartnerDetails = 1019 /** - * The given revocation key was revoked and must no longer be used. (GNU Taler) + * The given revocation key was revoked and must no longer be used. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_SIGNING_KEY_REVOKED = 1020 + TalerSignaturePurposeMasterSigningKeyRevoked = 1020 /** - * Add payto URI to the list of our wire methods. (GNU Taler) + * Add payto Uri to the list of our wire methods. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_ADD_WIRE = 1021 + TalerSignaturePurposeMasterAddWire = 1021 /** - * Signature over global set of fees charged by the exchange. (GNU Taler) + * Signature over global set of fees charged by the exchange. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_GLOBAL_FEES = 1022 + TalerSignaturePurposeMasterGlobalFees = 1022 /** - * Remove payto URI from the list of our wire methods. (GNU Taler) + * Remove payto Uri from the list of our wire methods. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_DEL_WIRE = 1023 + TalerSignaturePurposeMasterDelWire = 1023 /** - * Purpose for signing public keys signed by the exchange master key. (GNU Taler) + * Purpose for signing public keys signed by the exchange master key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_SIGNING_KEY_VALIDITY = 1024 + TalerSignaturePurposeMasterSigningKeyValidity = 1024 /** - * Purpose for denomination keys signed by the exchange master key. (GNU Taler) + * Purpose for denomination keys signed by the exchange master key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_DENOMINATION_KEY_VALIDITY = 1025 + TalerSignaturePurposeMasterDenominationKeyValidity = 1025 /** - * Add an auditor to the list of our auditors. (GNU Taler) + * Add an auditor to the list of our auditors. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_ADD_AUDITOR = 1026 + TalerSignaturePurposeMasterAddAuditor = 1026 /** - * Remove an auditor from the list of our auditors. (GNU Taler) + * Remove an auditor from the list of our auditors. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_DEL_AUDITOR = 1027 + TalerSignaturePurposeMasterDelAuditor = 1027 /** - * Fees charged per (aggregate) wire transfer to the merchant. (GNU Taler) + * Fees charged per (aggregate) wire transfer to the merchant. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_WIRE_FEES = 1028 + TalerSignaturePurposeMasterWireFees = 1028 /** - * The given revocation key was revoked and must no longer be used. (GNU Taler) + * The given revocation key was revoked and must no longer be used. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_DENOMINATION_KEY_REVOKED = 1029 + TalerSignaturePurposeMasterDenominationKeyRevoked = 1029 /** - * Signature where the Exchange confirms its IBAN details in the /wire response. (GNU Taler) + * Signature where the Exchange confirms its Iban details in the /wire response. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_WIRE_DETAILS = 1030 + TalerSignaturePurposeMasterWireDetails = 1030 /** - * Set the configuration of an extension (age-restriction or peer2peer) (GNU Taler) + * Set the configuration of an extension (age-restriction or peer2peer) (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MASTER_EXTENSION = 1031 + TalerSignaturePurposeMasterExtension = 1031 /** - * Purpose for the state of a reserve, signed by the exchange's signing key. (GNU Taler) + * Purpose for the state of a reserve, signed by the exchange's signing key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_RESERVE_STATUS = 1032 + TalerSignaturePurposeExchangeReserveStatus = 1032 /** - * Signature where the Exchange confirms a deposit request. (GNU Taler) + * Signature where the Exchange confirms a deposit request. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_DEPOSIT = 1033 + TalerSignaturePurposeExchangeConfirmDeposit = 1033 /** - * Signature where the exchange (current signing key) confirms the no-reveal index for cut-and-choose and the validity of the melted coins. (GNU Taler) + * Signature where the exchange (current signing key) confirms the no-reveal index for cut-and-choose and the validity of the melted coins. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_MELT = 1034 + TalerSignaturePurposeExchangeConfirmMelt = 1034 /** - * Signature where the Exchange confirms the full /keys response set. (GNU Taler) + * Signature where the Exchange confirms the full /keys response set. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_KEY_SET = 1035 + TalerSignaturePurposeExchangeKeySet = 1035 /** - * Signature where the Exchange confirms the /track/transaction response. (GNU Taler) + * Signature where the Exchange confirms the /track/transaction response. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_WIRE = 1036 + TalerSignaturePurposeExchangeConfirmWire = 1036 /** - * Signature where the Exchange confirms the /wire/deposit response. (GNU Taler) + * Signature where the Exchange confirms the /wire/deposit response. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_WIRE_DEPOSIT = 1037 + TalerSignaturePurposeExchangeConfirmWireDeposit = 1037 /** - * Signature where the Exchange confirms a refund request. (GNU Taler) + * Signature where the Exchange confirms a refund request. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_REFUND = 1038 + TalerSignaturePurposeExchangeConfirmRefund = 1038 /** - * Signature where the Exchange confirms a recoup. (GNU Taler) + * Signature where the Exchange confirms a recoup. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_RECOUP = 1039 + TalerSignaturePurposeExchangeConfirmRecoup = 1039 /** - * Signature where the Exchange confirms it closed a reserve. (GNU Taler) + * Signature where the Exchange confirms it closed a reserve. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_RESERVE_CLOSED = 1040 + TalerSignaturePurposeExchangeReserveClosed = 1040 /** - * Signature where the Exchange confirms a recoup-refresh operation. (GNU Taler) + * Signature where the Exchange confirms a recoup-refresh operation. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_RECOUP_REFRESH = 1041 + TalerSignaturePurposeExchangeConfirmRecoupRefresh = 1041 /** - * Signature where the Exchange confirms that it does not know a denomination (hash). (GNU Taler) + * Signature where the Exchange confirms that it does not know a denomination (hash). (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_AFFIRM_DENOM_UNKNOWN = 1042 + TalerSignaturePurposeExchangeAffirmDenomUnknown = 1042 /** - * Signature where the Exchange confirms that it does not consider a denomination valid for the given operation at this time. (GNU Taler) + * Signature where the Exchange confirms that it does not consider a denomination valid for the given operation at this time. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_AFFIRM_DENOM_EXPIRED = 1043 + TalerSignaturePurposeExchangeAffirmDenomExpired = 1043 /** - * Signature by which the exchange affirms that a purse was created with a certain amount deposited into it. (GNU Taler) + * Signature by which the exchange affirms that a purse was created with a certain amount deposited into it. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_PURSE_CREATION = 1045 + TalerSignaturePurposeExchangeConfirmPurseCreation = 1045 /** - * Signature by which the exchange affirms that a purse was merged into a reserve with a certain amount in it. (GNU Taler) + * Signature by which the exchange affirms that a purse was merged into a reserve with a certain amount in it. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_PURSE_MERGED = 1046 + TalerSignaturePurposeExchangeConfirmPurseMerged = 1046 /** - * Purpose for the state of a purse, signed by the exchange's signing key. (GNU Taler) + * Purpose for the state of a purse, signed by the exchange's signing key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_PURSE_STATUS = 1047 + TalerSignaturePurposeExchangePurseStatus = 1047 /** - * Signature by which the exchange attests identity attributes of a particular reserve owner. (GNU Taler) + * Signature by which the exchange attests identity attributes of a particular reserve owner. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_RESERVE_ATTEST_DETAILS = 1048 + TalerSignaturePurposeExchangeReserveAttestDetails = 1048 /** - * Signature by which the exchange confirms that a purse expired and a coin was refunded. (GNU Taler) + * Signature by which the exchange confirms that a purse expired and a coin was refunded. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_PURSE_REFUND = 1049 + TalerSignaturePurposeExchangeConfirmPurseRefund = 1049 /** - * Signature where the Exchange confirms an (age-)withdraw. (GNU Taler) + * Signature where the Exchange confirms an (age-)withdraw. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_CONFIRM_WITHDRAW = 1050 + TalerSignaturePurposeExchangeConfirmWithdraw = 1050 /** - * Signature where the auditor confirms that he is aware of certain denomination keys from the exchange. (GNU Taler) + * Signature where the auditor confirms that he is aware of certain denomination keys from the exchange. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_AUDITOR_EXCHANGE_KEYS = 1064 + TalerSignaturePurposeAuditorExchangeKeys = 1064 /** - * Signature where the merchant confirms a contract (to the customer). (GNU Taler) + * Signature where the merchant confirms a contract (to the customer). (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_CONTRACT = 1101 + TalerSignaturePurposeMerchantContract = 1101 /** - * Signature where the merchant confirms a refund (of a coin). (GNU Taler) + * Signature where the merchant confirms a refund (of a coin). (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_REFUND = 1102 + TalerSignaturePurposeMerchantRefund = 1102 /** - * Signature where the merchant confirms that he needs the wire transfer identifier for a deposit operation. (GNU Taler) + * Signature where the merchant confirms that he needs the wire transfer identifier for a deposit operation. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_TRACK_TRANSACTION = 1103 + TalerSignaturePurposeMerchantTrackTransaction = 1103 /** - * Signature where the merchant confirms that the payment was successful (GNU Taler) + * Signature where the merchant confirms that the payment was successful (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_PAYMENT_OK = 1104 + TalerSignaturePurposeMerchantPaymentOk = 1104 /** - * Signature where the merchant confirms its own (salted) wire details (not yet really used). (GNU Taler) + * Signature where the merchant confirms its own (salted) wire details (not yet really used). (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_WIRE_DETAILS = 1107 + TalerSignaturePurposeMerchantWireDetails = 1107 /** - * Signature where the merchant issues a token by blindly signing it. Signed with the token issue private key. (GNU Taler) + * Signature where the merchant issues a token by blindly signing it. Signed with the token issue private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MERCHANT_TOKEN_ISSUE = 1108 + TalerSignaturePurposeMerchantTokenIssue = 1108 /** - * Signature where the reserve key confirms a withdraw request. Signed with the reserve private key. (GNU Taler) + * Signature where the reserve key confirms a withdraw request. Signed with the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_WITHDRAW = 1200 + TalerSignaturePurposeWalletReserveWithdraw = 1200 /** - * Signature made by the wallet of a user to confirm a deposit of a coin. (GNU Taler) + * Signature made by the wallet of a user to confirm a deposit of a coin. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_DEPOSIT = 1201 + TalerSignaturePurposeWalletCoinDeposit = 1201 /** - * Signature using a coin key confirming the melting of a coin. Signed with the coin's private key. (GNU Taler) + * Signature using a coin key confirming the melting of a coin. Signed with the coin's private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_MELT = 1202 + TalerSignaturePurposeWalletCoinMelt = 1202 /** - * Signature using a coin key requesting recoup. Signed with the coin's private key. (GNU Taler) + * Signature using a coin key requesting recoup. Signed with the coin's private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_RECOUP = 1203 + TalerSignaturePurposeWalletCoinRecoup = 1203 /** - * Signature using a coin key authenticating link data. Signed with the old coin's private key. (GNU Taler) + * Signature using a coin key authenticating link data. Signed with the old coin's private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_LINK = 1204 + TalerSignaturePurposeWalletCoinLink = 1204 /** - * Signature using a reserve key by which a wallet requests a payment target UUID for itself. Signs over just a purpose (no body), as the signature only serves to demonstrate that the request comes from the wallet controlling the private key, and not some third party. (GNU Taler) + * Signature using a reserve key by which a wallet requests a payment target Uuid for itself. Signs over just a purpose (no body), as the signature only serves to demonstrate that the request comes from the wallet controlling the private key, and not some third party. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_ACCOUNT_SETUP = 1205 + TalerSignaturePurposeWalletAccountSetup = 1205 /** - * Signature using a coin key requesting recoup-refresh. Signed with the coin private key. (GNU Taler) + * Signature using a coin key requesting recoup-refresh. Signed with the coin private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_RECOUP_REFRESH = 1206 + TalerSignaturePurposeWalletCoinRecoupRefresh = 1206 /** - * Signature using a age restriction key for attestation of a particular age/age-group. (GNU Taler) + * Signature using a age restriction key for attestation of a particular age/age-group. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_AGE_ATTESTATION = 1207 + TalerSignaturePurposeWalletAgeAttestation = 1207 /** - * Request full or partial reserve history. Signed with the reserve private key. (GNU Taler) + * Request full or partial reserve history. Signed with the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_HISTORY = 1208 + TalerSignaturePurposeWalletReserveHistory = 1208 /** - * Request full or partial coin history. Signed with the coin private key. (GNU Taler) + * Request full or partial coin history. Signed with the coin private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_COIN_HISTORY = 1209 + TalerSignaturePurposeWalletCoinHistory = 1209 /** - * Request purse creation (without reserve). Signed by the purse private key. (GNU Taler) + * Request purse creation (without reserve). Signed by the purse private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_CREATE = 1210 + TalerSignaturePurposeWalletPurseCreate = 1210 /** - * Request coin to be deposited into a purse. Signed with the coin private key. (GNU Taler) + * Request coin to be deposited into a purse. Signed with the coin private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_DEPOSIT = 1211 + TalerSignaturePurposeWalletPurseDeposit = 1211 /** - * Request purse status. Signed with the purse private key. (GNU Taler) + * Request purse status. Signed with the purse private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_STATUS = 1212 + TalerSignaturePurposeWalletPurseStatus = 1212 /** - * Request purse to be merged with a reserve. Signed with the purse private key. (GNU Taler) + * Request purse to be merged with a reserve. Signed with the purse private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_MERGE = 1213 + TalerSignaturePurposeWalletPurseMerge = 1213 /** - * Request purse to be merged with a reserve. Signed by the reserve private key. (GNU Taler) + * Request purse to be merged with a reserve. Signed by the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_ACCOUNT_MERGE = 1214 + TalerSignaturePurposeWalletAccountMerge = 1214 /** - * Request account to be closed. Signed with the reserve private key. (GNU Taler) + * Request account to be closed. Signed with the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_CLOSE = 1215 + TalerSignaturePurposeWalletReserveClose = 1215 /** - * Associates encrypted contract with a purse. Signed with the purse private key. (GNU Taler) + * Associates encrypted contract with a purse. Signed with the purse private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_ECONTRACT = 1216 + TalerSignaturePurposeWalletPurseEcontract = 1216 /** - * Request reserve to be kept open. Signed with the reserve private key. (GNU Taler) + * Request reserve to be kept open. Signed with the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_OPEN = 1217 + TalerSignaturePurposeWalletReserveOpen = 1217 /** - * Request coin to be used to pay for reserve to be kept open. Signed with the coin private key. (GNU Taler) + * Request coin to be used to pay for reserve to be kept open. Signed with the coin private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_OPEN_DEPOSIT = 1218 + TalerSignaturePurposeWalletReserveOpenDeposit = 1218 /** - * Request attestation about reserve owner. Signed by the reserve private key. (GNU Taler) + * Request attestation about reserve owner. Signed by the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_ATTEST_DETAILS = 1219 + TalerSignaturePurposeWalletReserveAttestDetails = 1219 /** - * Signature by which a wallet requests a purse to be deleted. (GNU Taler) + * Signature by which a wallet requests a purse to be deleted. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_PURSE_DELETE = 1220 + TalerSignaturePurposeWalletPurseDelete = 1220 /** - * Signature where the reserve key confirms an age-withdraw request. Signed with the reserve private key. (GNU Taler) + * Signature where the reserve key confirms an age-withdraw request. Signed with the reserve private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_RESERVE_AGE_WITHDRAW = 1221 + TalerSignaturePurposeWalletReserveAgeWithdraw = 1221 /** - * Signature where the token use key confirms the usage of a token on a pay request. Signed with the token use private key. (GNU Taler) + * Signature where the token use key confirms the usage of a token on a pay request. Signed with the token use private key. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_WALLET_TOKEN_USE = 1222 + TalerSignaturePurposeWalletTokenUse = 1222 /** - * Signature on a denomination key announcement. (GNU Taler) + * Signature on a denomination key announcement. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_SM_RSA_DENOMINATION_KEY = 1250 + TalerSignaturePurposeSmRsaDenominationKey = 1250 /** - * Signature on an exchange message signing key announcement. (GNU Taler) + * Signature on an exchange message signing key announcement. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_SM_SIGNING_KEY = 1251 + TalerSignaturePurposeSmSigningKey = 1251 /** - * Signature on a denomination key announcement. (GNU Taler) + * Signature on a denomination key announcement. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_SM_CS_DENOMINATION_KEY = 1252 + TalerSignaturePurposeSmCsDenominationKey = 1252 /** - * EdDSA test signature. (GNU Taler) + * EdDsa test signature. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_CLIENT_TEST_EDDSA = 1302 + TalerSignaturePurposeClientTestEddsa = 1302 /** - * EdDSA test signature. (GNU Taler) + * EdDsa test signature. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_EXCHANGE_TEST_EDDSA = 1303 + TalerSignaturePurposeExchangeTestEddsa = 1303 /** - * Signature by which an AML officer signs an AML decision. (GNU Taler) + * Signature by which an Aml officer signs an Aml decision. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_AML_DECISION = 1350 + TalerSignaturePurposeAmlDecision = 1350 /** - * Signature by which an AML officer requests AML data. (GNU Taler) + * Signature by which an Aml officer requests Aml data. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_AML_QUERY = 1351 + TalerSignaturePurposeAmlQuery = 1351 /** - * Signature by which an account owner authorizes access to a KYC operation. (GNU Taler) + * Signature by which an account owner authorizes access to a Kyc operation. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_KYC_AUTH = 1360 + TalerSignaturePurposeKycAuth = 1360 /** - * EdDSA signature for a policy upload. (GNU Taler) + * EdDsa signature for a policy upload. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_ANASTASIS_POLICY_UPLOAD = 1400 + TalerSignaturePurposeAnastasisPolicyUpload = 1400 /** - * EdDSA signature for a backup upload. (GNU Taler) + * EdDsa signature for a backup upload. (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_SYNC_BACKUP_UPLOAD = 1450 + TalerSignaturePurposeSyncBackupUpload = 1450 /** - * Signature over messages to delete in the mailbox service (GNU Taler) + * Signature over messages to delete in the mailbox service (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MAILBOX_MESSAGES_DELETE = 1551 + TalerSignaturePurposeMailboxMessagesDelete = 1551 /** - * Signature over new key set in key update (GNU Taler) + * Signature over new key set in key update (Gnu Taler) */ - TALER_SIGNATURE_PURPOSE_MAILBOX_KEYS_UPDATE = 1552 + TalerSignaturePurposeMailboxKeysUpdate = 1552 ) diff --git a/pkg/rest/mailbox.go b/pkg/rest/mailbox.go @@ -416,18 +416,18 @@ func (m *Mailbox) updateKeysResponse(w http.ResponseWriter, r *http.Request) { return } var expNbo [8]byte - var signed_msg [72]byte + var signedMsg [72]byte binary.BigEndian.PutUint64(expNbo[:], msg.Keys.Expiration.T_s) - size := signed_msg[0:4] + size := signedMsg[0:4] binary.BigEndian.PutUint32(size, 64+4+4) - purp := signed_msg[4:8] - binary.BigEndian.PutUint32(purp, gana.TALER_SIGNATURE_PURPOSE_MAILBOX_KEYS_UPDATE) + purp := signedMsg[4:8] + binary.BigEndian.PutUint32(purp, gana.TalerSignaturePurposeMailboxKeysUpdate) h := sha512.New() h.Write([]byte(msg.Keys.EncryptionKeyType)) // Currently always X25519 h.Write(encPk) h.Write(expNbo[:]) - copy(signed_msg[8:], h.Sum(nil)) - if !ed25519.Verify(pk, signed_msg[0:], sig) { + copy(signedMsg[8:], h.Sum(nil)) + if !ed25519.Verify(pk, signedMsg[0:], sig) { w.WriteHeader(http.StatusForbidden) return } @@ -500,7 +500,7 @@ func (m *Mailbox) deleteMessagesResponse(w http.ResponseWriter, r *http.Request) size := signed_msg[0:4] binary.BigEndian.PutUint32(size, 64+4+4) purp := signed_msg[4:8] - binary.BigEndian.PutUint32(purp, gana.TALER_SIGNATURE_PURPOSE_MAILBOX_MESSAGES_DELETE) + binary.BigEndian.PutUint32(purp, gana.TalerSignaturePurposeMailboxMessagesDelete) copy(signed_msg[8:], checksum) if !ed25519.Verify(pk, signed_msg[0:], sig) { w.WriteHeader(http.StatusForbidden)