Expand description
Certificate validity restrictions (IEEE Std 1609.2-2016, clauses 5.2.3.2.2, 6.4.8 and 6.4.17, as profiled by ETSI TS 103 097 V2.2.1).
- time: the validityPeriod of a certificate (start + duration);
- region: the circular, rectangular or polygonal region of a certificate; a certificate without region inherits the region of its issuer;
- permissions: the appPermissions entry (PSID and SSP) of a certificate.
Identified regions (clauses 6.4.22 to 6.4.26) name countries (UN M.49
codes; 65535 is the EU-27 in ETSI TS 103 097 clause 6), regions and
subregions. The stack ships no border data: the application registers the
geometry of the identifiers it recognises (register_identified_region),
and the PICS conformance claim is the list of registered identifiers
(TS 103 097 clause 5). An identifier without geometry cannot be evaluated
(None).
Mirrors flexstack/security/validity.py.
Structs§
- Region
Key - An identified region: a country, a region of a country (CountryAndRegions) or a subregion of a region (RegionAndSubregions).
Constants§
- EU27_
COUNTRY_ ID - ETSI TS 103 097 clause 6: UnCountryId 65535 is the European Union “27 countries as of 31 January 2020”.
Functions§
- app_
permission - (permitted, SSP) for
psidin the appPermissions of a certificate. The SSP is the BitmapSsp or opaque octets, orNonewhen the entry has no SSP. - effective_
region - Region of the certificate, or of the closest issuer that has one.
- identified_
region_ contains - SequenceOfIdentifiedRegion: inside when any recognised identifier contains
the position (IEEE 1609.2 allows unrecognised values when the recognised
ones establish validity); outside when every identifier is recognised and
none contains it; otherwise
None. - location_
permitted - Region consistency (IEEE 1609.2 clause 5.2.3.2.2): the position lies in the effective region of the certificate chain. A region that cannot be evaluated is not treated as a violation.
- recognized_
identified_ regions - Identifiers the stack can evaluate (the PICS list of recognised values).
- region_
contains - Whether a position (1/10 µdeg) lies inside a GeographicRegion.
Some(true)for no region (no restriction);Nonewhen the region cannot be evaluated (identifiedRegion without registered geometry). - register_
identified_ region - Register the borders of an identified region so that certificates
restricted to it can be evaluated.
polygonsis a list of polygons (several for territories with islands), each a list of (latitude, longitude) vertices in 1/10 µdeg. - ssp_
covers - True when the BitmapSsp of an AT grants every permission bit requested (octets after the SSP version octet). Without requested bits any SSP covers the request.
- unregister_
identified_ region - Forget the geometry of an identified region (no-op if unknown).
- valid_
at - True when
time_us(Time64, TAI µs since 2004) lies in the validity period of the certificate and of every issuer in its chain. - validity_
window_ us - (start, end) of the validityPeriod in TAI microseconds since 2004.