Implement scoped authority trust overlay
This commit is contained in:
1 parent
1eeb8bac05
commit
d479c459fc
17 files changed
+712
-65
No files matched your search
@@ -41,6 +41,7 @@ const villagePlugin = {
|
||||
reasonEntryIds: journal.entries
|
||||
.filter((entry) => entry.code === "known-community-key")
|
||||
.map((entry) => entry.id),
|
||||
overriddenErrors: [...facts.errors],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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: [] };
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user