#include <certificate.hpp>
Public Member Functions | |
| CertificateView (const asn1::EtsiTs103097Certificate *cert) | |
| boost::optional< HashedId8 > | calculate_digest () const |
| StartAndEndValidity | get_start_and_end_validity () const |
| KeyType | get_verification_key_type () const |
| boost::optional< HashedId8 > | issuer_digest () const |
| bool | issuer_is_self () const |
| bool | is_ca_certificate () const |
| bool | is_at_certificate () const |
| bool | has_region_restriction () const |
| bool | valid_at_location (const PositionFix &location, const LocationChecker *lc) const |
| bool | valid_at_timepoint (const Clock::time_point &time_point) const |
| bool | valid_for_application (ItsAid aid) const |
| bool | is_allowed_to_issue (ItsAid aid) const |
| boost::optional< std::uint8_t > | assurance_level () const |
| bool | region_is_within (const CertificateView &issuer) const |
| bool | is_canonical () const |
| boost::optional< Certificate > | canonicalize () const |
| ByteBuffer | encode () const |
Protected Attributes | |
| const asn1::EtsiTs103097Certificate * | m_cert = nullptr |
Read-only view on a certificate
In contrast to Certificate, a view does not own the certificate data. A view can be created with low overhead as no heavy copying is required.
Definition at line 36 of file certificate.hpp.
|
explicit |
Definition at line 49 of file certificate.cpp.
| boost::optional< std::uint8_t > vanetza::security::v3::CertificateView::assurance_level | ( | ) | const |
Get subject assurance level encoded in this certificate.
Definition at line 186 of file certificate.cpp.
| boost::optional< HashedId8 > vanetza::security::v3::CertificateView::calculate_digest | ( | ) | const |
Calculate digest of certificate
Definition at line 96 of file certificate.cpp.
| boost::optional< Certificate > vanetza::security::v3::CertificateView::canonicalize | ( | ) | const |
Convert certificate into its canonical format if possible.
Definition at line 350 of file certificate.cpp.
| ByteBuffer vanetza::security::v3::CertificateView::encode | ( | ) | const |
| StartAndEndValidity vanetza::security::v3::CertificateView::get_start_and_end_validity | ( | ) | const |
Get start and end validity
Definition at line 271 of file certificate.cpp.
| KeyType vanetza::security::v3::CertificateView::get_verification_key_type | ( | ) | const |
Get verification key type
Definition at line 101 of file certificate.cpp.
Check if certificate has an region restriction
Definition at line 251 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::is_allowed_to_issue | ( | ItsAid | aid | ) | const |
Check if certificate issue permissions allow issuing a given application.
| aid | application to be checked |
Definition at line 159 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::is_at_certificate | ( | ) | const |
Check if certificate is an Authorization Ticket certificate
Definition at line 261 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::is_ca_certificate | ( | ) | const |
Check if certificate is a Certification Authority certificate
Definition at line 256 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::is_canonical | ( | ) | const |
Check if certificate has a canonical format
Definition at line 266 of file certificate.cpp.
| boost::optional< HashedId8 > vanetza::security::v3::CertificateView::issuer_digest | ( | ) | const |
| bool vanetza::security::v3::CertificateView::issuer_is_self | ( | ) | const |
Check if certificate is self-signed
Definition at line 246 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::region_is_within | ( | const CertificateView & | issuer | ) | const |
Check if this certificate's region restriction is within issuer's region restriction.
If issuer has no region restriction, any subject region is accepted. Currently supports circular regions and exact rectangular-region equality; unsupported region combinations are rejected conservatively.
| issuer | issuing certificate |
Definition at line 195 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::valid_at_location | ( | const PositionFix & | location, |
| const LocationChecker * | lc ) const |
Check if certificate is valid at given location
| location | location to be checked |
Definition at line 106 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::valid_at_timepoint | ( | const Clock::time_point & | time_point | ) | const |
Check if certificate is valid at given time point
| time_point | time point to be checked |
Definition at line 111 of file certificate.cpp.
| bool vanetza::security::v3::CertificateView::valid_for_application | ( | ItsAid | aid | ) | const |
Check if certificate is valid for given application
| aid | application to be checked |
Definition at line 154 of file certificate.cpp.
|
protected |
Definition at line 159 of file certificate.hpp.