Skip to main content

Module validity

Module validity 

Source
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§

RegionKey
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 psid in the appPermissions of a certificate. The SSP is the BitmapSsp or opaque octets, or None when 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); None when 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. polygons is 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.