Implement scoped authority trust overlay

This commit is contained in:
sergeych committed 2026-08-16 19:42:53 +04:00
1 parent 1eeb8bac05
commit d479c459fc
17 files changed
+712 -65

No files matched your search

+1
View File
@@ -41,6 +41,7 @@ const villagePlugin = {
reasonEntryIds: journal.entries
.filter((entry) => entry.code === "known-community-key")
.map((entry) => entry.id),
overriddenErrors: [...facts.errors],
};
},
},
+5 -4
View File
@@ -37,13 +37,14 @@ export default defineTrustPlugin({
});
if (trusted === undefined) return undefined;
return {
trusted,
const common = {
scope: exactCertificateScope(facts),
lifetime: { kind: "session" },
lifetime: { kind: "session" } as const,
reasonEntryIds: journal.entries.map((entry) => entry.id),
};
return trusted
? { ...common, trusted: true, overriddenErrors: [...facts.errors] }
: { ...common, trusted: false, overriddenErrors: [] };
},
},
});
+1 -1
View File
@@ -24,6 +24,7 @@ const verdictWithoutLifetime: TrustVerdict = {
certificateSha256: "leaf-sha256",
},
reasonEntryIds: [],
overriddenErrors: [],
};
const voteWithoutBoolean: PluginContribution = {
@@ -40,4 +41,3 @@ const voteWithoutBoolean: PluginContribution = {
void asynchronousFastHook;
void verdictWithoutLifetime;
void voteWithoutBoolean;