ETSI TS 119 612 trusted lists: verify, read and query the EU lists
README.md

trusted-list #

The trusted lists of
ETSI TS 119 612
(version 2): the XML list in which a member state's supervisory body names the
trust service providers it supervises, their services and the history of each
service's status, and the European Commission's List of Trusted Lists (LOTL),
which points to each member state's list and names the certificates allowed to
sign it.

A relying party reads them to accept qualified signatures, seals, timestamps
and electronic attestations of attributes under eIDAS: it asks whether a
certificate was issued by a service of a given type whose status was a
qualified one at a given time.

Contents #

Installation #

$ opam install trusted-list

The library is trusted-list and its module is Trusted_list.

Usage #

A list is read once its signature verifies: an enveloped XML signature over
the whole list, with XAdES signed properties naming its signing certificate,
by a certificate trusted for it. The LOTL is trusted from the certificates
the Official Journal of the European Union publishes, and a member state's
list from those the LOTL's pointer to it names:

let qualified ~oj_certificates ~lotl_xml ~xx_xml ~cert ~at =
  let ( let* ) = Result.bind in
  let* lotl = Trusted_list.verify ~signers:oj_certificates lotl_xml in
  let* pointer =
    Option.to_result ~none:(Trusted_list.Malformed "no pointer to XX")
      (Trusted_list.pointer lotl.list ~territory:"XX")
  in
  let* xx = Trusted_list.verify_pointed pointer xx_xml in
  Ok
    (Trusted_list.qualified ~service_type:Trusted_list.Service_type.ca_qc ~at
       xx.list cert)

The status a service had at a time is read from its history. A qualified
status is granted, or one a qualified service held before eIDAS applied on
1 July 2016:

# Trusted_list.Status.qualifying Trusted_list.Status.granted;;
- : bool = true
# Trusted_list.Status.qualifying Trusted_list.Status.withdrawn;;
- : bool = false
# Trusted_list.Status.qualifying Trusted_list.Status.under_supervision;;
- : bool = true

Command line #

$ trusted-list verify --signer oj.pem eu-lotl.xml
$ trusted-list services --lotl eu-lotl.xml --lotl-signer oj.pem --territory XX xx.xml
$ trusted-list check --lotl eu-lotl.xml --lotl-signer oj.pem --territory XX \
    --cert alice.pem --type http://uri.etsi.org/TrstSvc/Svctype/CA/QC \
    --at 2026-11-28T00:00:00Z xx.xml
qualified: Example QTSP, Example QTSP CA, http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/granted since 2016-06-30T22:00:00-00:00

check exits 0 when the certificate was issued by a qualified service of the
type, and 1 otherwise. --algorithm and --digest, each repeatable, replace
the allowlists of the signature verification. The command reads files: it
fetches no list.

What it covers #

  • The scheme information (section 5.3): version, sequence number, type,
    operator, territory, issue date, next update and the pointers to other
    lists with what their additional information says (type, territory,
    operator, MIME type).
  • The trust service providers (section 5.4), their services (section 5.5)
    and each service's history (section 5.6): type, names, digital identity
    (certificates, subject names, key identifiers), status, starting time and
    the AdditionalServiceInformation extensions. Other extensions are kept
    with their Critical attribute.
  • The signature (section 5.7), through xmldsig: it must cover the whole
    list, carry XAdES signed properties naming its signer, and be by a
    certificate the caller trusts.
  • An issuer is a service whose certificate has the issuer's name and a key
    that verifies the certificate's signature.

Whether a certificate is itself a qualified certificate also depends on its
QC statements and on the Qualifications extension of its issuer's service
(ETSI TS 119 615), which are not evaluated here.

License #

ISC. See LICENSE.md.