1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//! Countersignature signer paths for the common participant census.
//!
//! Path checking, revocation binding and the participant census itself are
//! format-neutral and live in [`structured_ltv::pki`]. This module associates
//! every incorporated `XMLDSig` countersignature with its signer's checked path
//! and presents that census to it.
//!
//! [`participants`] derives the [`Xades`] participant census from
//! this crate's own receipts. Another crate cannot derive one from receipts it
//! implements itself, such as a signer that reports an unrelated path:
//!
//! ```compile_fail
//! use structured_ltv::pki::{self, CheckedPath, SignerReceipt};
//! use structured_ltv::source::{Location, Query};
//! use structured_ltv::timestamp::TimestampPaths;
//! use structured_xades::{Xades, credential::ParticipantCredentials, pki::CounterPaths};
//!
//! struct Forged<N, D, G>(Location<N, D, G>, &'static CheckedPath<'static>);
//! impl<N: Copy, D: Copy, G: Copy> SignerReceipt<'static, 'static> for Forged<N, D, G> {
//! type Id = N;
//! type Document = D;
//! type Generation = G;
//! fn signature(&self) -> Location<N, D, G> {
//! self.0
//! }
//! fn path(&self) -> Option<&'static CheckedPath<'static>> {
//! Some(self.1)
//! }
//! }
//!
//! fn forge<Q: Query>(
//! signer: &'static Forged<Q::Id, Q::Document, Q::Generation>,
//! counters: &'static CounterPaths<'static, 'static, Q::Id, Q::Document, Q::Generation>,
//! credentials: &'static ParticipantCredentials<
//! 'static, 'static, (), Q::Id, Q::Document, Q::Generation,
//! >,
//! timestamps: &'static TimestampPaths<
//! 'static, 'static, 'static, Q::Id, Q::Document, Q::Generation, Xades,
//! >,
//! query: &Q,
//! ) {
//! let _ = pki::participants(signer, counters, credentials, timestamps, query);
//! }
//! ```
use crate::;
use ParticipantResult;
use Query;
use TimestampPaths;
pub use ;
/// The complete participant census of one validation-data scope, derived by
/// [`structured_ltv::pki::participants`] from this crate's checked signer,
/// complete counter census and authenticated credentials.
///
/// # Errors
///
/// Every refusal of [`structured_ltv::pki::participants`]: inputs of another
/// signature or generation, an unproven signer, timestamp obligations without
/// the counter census, incomplete credential authorities and resource refusal.