fix: scope server pins by port (fumi-core rev 1468f3c)

This commit is contained in:
randogoth 2026-09-30 08:52:57 +03:00
parent 996e879509
commit 7d2a147fec
16 changed files with 109 additions and 79 deletions

View file

@ -13,6 +13,7 @@ import "dart:typed_data";
import "package:flutter_test/flutter_test.dart";
import "package:hive_flutter/hive_flutter.dart";
import "package:smol_mail/smol/address.dart";
import "package:smol_mail/smol/store.dart";
const fumiBinary = "../fumi/target/release/fumi";
@ -38,7 +39,7 @@ void main() {
stateBox: "interop-state",
readBox: "interop-read");
mine.restoreMaster(master, 0);
mine.pinServer("example.org", pinKey);
mine.pinServer("example.org", pinKey, defaultPort);
// One contact, bound to the current key; rotation history is written by
// the trust engine on a validated rotation, not by a plain re-save.
await mine.saveContact("alice@example.org", pinKey, verified: true);
@ -72,6 +73,6 @@ void main() {
// The binding survived both directions of the round trip.
final contact = restored.contact("alice@example.org")!;
expect(contact.key, pinKey);
expect(restored.serverPin("example.org"), pinKey);
expect(restored.serverPin("example.org", defaultPort), pinKey);
});
}