#include <location_checker.hpp>
Public Member Functions | |
| bool | valid_at_location (const asn1::EtsiTs103097Certificate &cert, const PositionFix &location) const override |
| void | set_permissive_identified_region (bool permissive) |
| bool | permissive_identified_region () const |
| void | use_country_database (const geodesy::CountryDatabase *db) |
Private Member Functions | |
| bool | check_identified_region (const PositionFix &location, const Vanetza_Security_SequenceOfIdentifiedRegion &seq) const |
Private Attributes | |
| bool | permissive_identified_region_ = false |
| const geodesy::CountryDatabase * | country_db_ = nullptr |
Default implementation that checks whether a position lies within a certificate's GeographicRegion. Supports: no restriction, CircularRegion, RectangularRegion, PolygonalRegion, IdentifiedRegion (only ISO 3166/M49 country codes). For unsupported IdentifiedRegion variants, the permissive flag controls their acceptance or rejection. IdentifiedRegion (ISO 3166 country codes): unsupported; returns false (conservative) unless Entirely unknown region types are always rejected conservatively.
Definition at line 59 of file location_checker.hpp.
|
private |
Definition at line 52 of file location_checker.cpp.
|
inline |
Definition at line 77 of file location_checker.hpp.
|
inline |
Change permissive behaviour regarding unsupported IdentifiedRegion types.
When set to true, unsupported IdentifiedRegion (country and region, country and sub-regions) are not checked but still accepted. These regions are only defined for the United States, i.e. they have no meaning for European C-ITS deployments. Default behaviour is conservative rejection (false), user must explicitly opt in.
Definition at line 72 of file location_checker.hpp.
|
inline |
Register country database for IdentifiedRegion validations.
If a database is registered, validation of countryOnly IdentifiedRegion takes place. If database is missing, validation falls back to the defined permissive behaviour.
Definition at line 88 of file location_checker.hpp.
|
overridevirtual |
Implements vanetza::security::v3::LocationChecker.
Definition at line 29 of file location_checker.cpp.
|
private |
Definition at line 97 of file location_checker.hpp.
|
private |
Definition at line 96 of file location_checker.hpp.