EU Trusted Lists
openvc.trustlist consumes the EU List of Trusted Lists (LOTL) and the national
Trusted Lists it points at (eIDAS 2.0 / EUDI, ETSI TS 119 612) as a source of
X.509 trust anchors for the verifier. walk_lotl(...) returns a
TrustAnchorSet whose .certificates feed the existing X.509 path directly — it
adds no verification surface; openvc.x5c stays the path validator.
from openvc import verify_credential
from openvc.trustlist import walk_lotl, verify_xades_enveloped
from openvc.fetch import https_bytes_fetch
anchors = walk_lotl(
"https://ec.europa.eu/tools/lotl/eu-lotl.xml",
lotl_signer_certs=[commission_cert], # caller-pinned root — no implicit trust
verify_signature=verify_xades_enveloped, # the [trustlist] extra's XAdES verifier
fetch=https_bytes_fetch)
verify_credential(vc, x5c_trust_anchors=anchors.certificates)
Trust is caller-pinned (the LOTL signer certs), fail-closed (a list that
cannot be fetched, verified, or is expired contributes zero anchors and is recorded
in problems), and selective (default: granted qualified-CA services). XML
parsing is hardened stdlib (no DTD/XXE, bounded). XML-signature (XAdES) verification
is an injected callback kept out of core: install openvc-core[trustlist] for
the reference verify_xades_enveloped (signxml), or inject your own. See
ADR-0003.
openvc.trustlist
openvc.trustlist — consume EU Trusted Lists (LOTL → national TL) as a verifier X.509 trust-anchor source (eIDAS 2.0 / EUDI, ETSI TS 119 612).
A Trusted List is, for a verifier, a source of EU-recognised X.509 anchors.
:func:walk_lotl turns the Commission's List of Trusted Lists and the national
lists it points at into a :class:TrustAnchorSet; its .certificates feed the
existing X.509 path directly:
from openvc import verify_credential
from openvc.trustlist import walk_lotl
from openvc.fetch import https_bytes_fetch
anchors = walk_lotl(
"https://ec.europa.eu/tools/lotl/eu-lotl.xml",
lotl_signer_certs=[commission_cert], # caller-pinned root (no implicit trust)
verify_signature=my_xades_verifier, # injected, fail-closed
fetch=https_bytes_fetch)
verify_credential(vc, x5c_trust_anchors=anchors.certificates)
This adds no verification surface — :mod:openvc.x5c remains the path validator;
trust lists only tell it which roots are EU-recognised. Parsing is hardened
stdlib XML (no DTD/XXE, bounded); XML-signature verification is an injected
callback (the [trustlist] extra ships a reference XAdES one). See
docs/adr/ADR-0003-eu-trusted-lists.md.
Select
dataclass
A filter over trust services. A None facet matches everything; a set
restricts to its members. The default (see :data:DEFAULT_SELECT) keeps
granted qualified-CA services — the ones that issue EUDI issuer certs.
Source code in src/openvc/trustlist/consume.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
ServiceStatus
ETSI TS 119 612 ServiceStatus URIs (the ones a verifier usually gates on).
Source code in src/openvc/trustlist/consume.py
42 43 44 45 46 | |
ServiceType
ETSI TS 119 612 ServiceTypeIdentifier URIs.
A convenience set of the identifiers observed on the live EU Trusted Lists under
TLv6 (ETSI TS 119 612 v2.4.1, mandatory since 29 Apr 2026). These are just
names — :class:Select matches ServiceTypeIdentifier verbatim, so any URI
works, including the EUDI-wallet trust services (issuance of QEAA / EAA / PuB-EAA,
qualified electronic ledgers) that v2.4.1 introduces but national lists have not
widely populated yet: pass their URI to :class:Select as it rolls out.
Source code in src/openvc/trustlist/consume.py
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 | |
TrustListError
Bases: OpenvcError
Base class for every Trusted List failure.
Source code in src/openvc/trustlist/errors.py
7 8 | |
TrustListParseError
Bases: TrustListError
The Trusted List XML is malformed, oversize, or carries a forbidden construct (a DTD/DOCTYPE — an XXE / entity-expansion vector).
Source code in src/openvc/trustlist/errors.py
11 12 13 | |
TrustListSignatureBackendUnavailable
Bases: TrustListSignatureUnavailable
XAdES signature verification was requested (via the reference
:func:openvc.trustlist.verify_xades_enveloped) but the [trustlist] extra
(signxml) is not installed (pip install openvc-core[trustlist]). A
subclass of :class:TrustListSignatureUnavailable: no verifier is available, so
a list is still never trusted unverified.
Source code in src/openvc/trustlist/errors.py
28 29 30 31 32 33 | |
TrustListSignatureError
Bases: TrustListError
The Trusted List's XML signature did not verify against the expected signer certificate(s) — the list is not authentic.
Source code in src/openvc/trustlist/errors.py
23 24 25 | |
TrustListSignatureUnavailable
Bases: TrustListError
A Trusted List had to be verified but no verify_signature callback was
supplied (fail-closed — a list is never trusted unverified). Pass the reference
:func:openvc.trustlist.verify_xades_enveloped (pip install
openvc-core[trustlist]), or inject your own.
Source code in src/openvc/trustlist/errors.py
16 17 18 19 20 | |
TrustAnchorSet
dataclass
The result of a LOTL→TL walk: the anchors that verified + the problems.
Source code in src/openvc/trustlist/model.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
certificates
property
The bare x509.Certificate anchors — pass straight to
verify_credential(..., x5c_trust_anchors=...). Deduplicated by DER.
x509_hashes
property
The HAIP x509_hash (hex SHA-256) of every anchor certificate.
TrustList
dataclass
A parsed ETSI TS 119 612 Trusted List — the LOTL (pointers) or a national
TL (providers).
Source code in src/openvc/trustlist/model.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
is_lotl
property
Whether this is the List of Trusted Lists (by TSLType).
TrustListProblem
dataclass
Why a TL (or the LOTL) contributed no anchors — surfaced, never silent.
Source code in src/openvc/trustlist/model.py
77 78 79 80 81 82 | |
TrustServiceAnchor
dataclass
One trust-service X.509 certificate with the metadata that lets a verifier decide whether to trust it (service type, status, provider, territory).
Source code in src/openvc/trustlist/model.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
sha256
property
The hex SHA-256 of the certificate DER — HAIP x509_hash for this anchor.
TrustServiceProvider
dataclass
A Trust Service Provider and its services (national TL entry).
Source code in src/openvc/trustlist/model.py
50 51 52 53 54 | |
TslPointer
dataclass
One OtherTSLPointer in the LOTL: where a national TL lives and the
certificate(s) that TL's XML signature must verify against (the LOTL vouches
for these — ADR-0003 D5).
Source code in src/openvc/trustlist/model.py
20 21 22 23 24 25 26 27 28 29 | |
consume_trust_list(xml, *, verify_signature, expected_signer_certs, max_bytes=DEFAULT_MAX_BYTES)
Verify a TL's XML signature (fail-closed) then parse it into a
:class:TrustList.
verify_signature is handed the raw bytes and expected_signer_certs and must
raise on any failure; if it is None this raises
:class:TrustListSignatureUnavailable — a list is never parsed-and-trusted
unverified. Signature verification runs before parsing so an unauthentic list is
rejected outright.
Source code in src/openvc/trustlist/consume.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
default_trust_list_fetch(url)
The blessed SSRF-guarded TL fetch: :func:openvc.fetch.https_bytes_fetch with a
TL-sized byte cap (national TLs run to a few MB).
Source code in src/openvc/trustlist/consume.py
102 103 104 105 106 | |
walk_lotl(lotl_url, *, lotl_signer_certs, verify_signature, fetch=default_trust_list_fetch, select=DEFAULT_SELECT, now=None, max_bytes=DEFAULT_MAX_BYTES)
Walk the LOTL at lotl_url down to each national TL and return the selected X.509 trust anchors.
Trust is rooted in lotl_signer_certs (the caller-pinned Commission keys). Each
TL's XML signature is verified via verify_signature (fail-closed). select
filters the trust services (default: granted qualified-CA — pass None for
all); fetch performs the SSRF-guarded GETs. A TL that cannot be fetched /
verified / is expired contributes no anchors and is recorded in the result's
problems — never silently trusted (ADR-0003 D6). Pass now to pin the
expiry evaluation instant.
Source code in src/openvc/trustlist/consume.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
parse_trust_list(xml, *, max_bytes=DEFAULT_MAX_BYTES)
Parse a Trusted List (or the LOTL) XML document into a :class:TrustList.
Hardened against XXE / entity-expansion (no DTD) and oversize input. Raises
:class:TrustListParseError on malformed, oversize, or DTD-bearing XML.
Source code in src/openvc/trustlist/parse.py
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 | |
verify_xades_enveloped(xml, signer_certs, *, max_bytes=DEFAULT_MAX_BYTES)
Verify a Trusted List's enveloped XAdES / XML-DSig signature against
signer_certs, returning None on success and raising on any failure — the
exact shape :func:openvc.trustlist.walk_lotl's verify_signature expects.
The signature must verify against one of signer_certs (the certificates the
parent list vouched for); each is tried in turn and the first that verifies wins.
Accepted signature shapes: plain enveloped XML-DSig (one Reference over the
document) and XAdES-BASELINE (document + the signature's own SignedProperties,
optionally a co-signed ds:KeyInfo) — the shape real EU trusted lists carry.
Raises :class:TrustListSignatureError on a bad/absent signature, tampered
content, a DTD-bearing document, oversize input, unexpected signed references,
or no matching signer; :class:TrustListSignatureBackendUnavailable if the
[trustlist] extra (signxml) is not installed.
Source code in src/openvc/trustlist/xades.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |