commit 349d47e9e47396da3d003bb162deb315d25e5f43
parent dc3b2d6193a276e1d390204826e3385cd109ddae
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Tue, 17 Feb 2026 12:30:07 +0100
use different name for test DB; rename KOX field to Info
Diffstat:
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/cmd/mailbox-server/test-mailbox.conf b/cmd/mailbox-server/test-mailbox.conf
@@ -8,4 +8,4 @@ message_response_limit = 25
pending_registration_expiration = 24h
[mailbox-pq]
-connection_string = postgres:///taler-mailbox?host=/var/run/postgresql
+connection_string = postgres:///taler-mailbox-test?host=/var/run/postgresql
diff --git a/pkg/rest/db.go b/pkg/rest/db.go
@@ -63,8 +63,8 @@ type MailboxMetadata struct {
// Expiration of this mapping (UNIX Epoch seconds).
Expiration Timestamp `json:"expiration"`
- // Keyoxide claim proof
- KoxClaimProof string `json:"kox_claim_proof,omitempty"`
+ // Info field (e.g for Keyoxide claim proof)
+ Info string `json:"info,omitempty"`
}
type PendingMailboxRegistration struct {
@@ -121,7 +121,7 @@ func InsertPendingRegistrationIntoDatabase(db *sql.DB, pr *PendingMailboxRegistr
func InsertMailboxRegistrationIntoDatabase(db *sql.DB, mb *MailboxMetadata) error {
query := `INSERT INTO taler_mailbox.mailbox_metadata
VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7);`
- rows, err := db.Query(query, mb.HashedSigningKey, mb.SigningKey, mb.SigningKeyType, mb.EncryptionKey, mb.EncryptionKeyType, mb.Expiration.Seconds, mb.KoxClaimProof)
+ rows, err := db.Query(query, mb.HashedSigningKey, mb.SigningKey, mb.SigningKeyType, mb.EncryptionKey, mb.EncryptionKeyType, mb.Expiration.Seconds, mb.Info)
if err != nil {
return err
}
@@ -192,7 +192,8 @@ func GetMailboxMetadataFromDatabaseBySigningKey(db *sql.DB, mb *MailboxMetadata,
"signing_key_type",
"encryption_key",
"encryption_key_type",
- "expiration"
+ "expiration",
+ "info"
FROM taler_mailbox.mailbox_metadata
WHERE
"hashed_signing_key"=$1
@@ -216,6 +217,7 @@ func GetMailboxMetadataFromDatabaseBySigningKey(db *sql.DB, mb *MailboxMetadata,
&mb.EncryptionKey,
&mb.EncryptionKeyType,
&mb.Expiration.Seconds,
+ &mb.Info,
)
}
diff --git a/sql/taler-mailbox-0001.sql b/sql/taler-mailbox-0001.sql
@@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS mailbox_metadata
,encryption_key BYTEA NOT NULL
,encryption_key_type BYTEA NOT NULL
,expiration INT8 NOT NULL
- ,kox_claim_proof BYTEA NOT NULL
+ ,info BYTEA NOT NULL
);
COMMENT ON TABLE mailbox_metadata
IS 'Mailbox configurations / instances';