#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_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 34 of file certificate.hpp.
|
explicit |
Definition at line 36 of file certificate.cpp.
boost::optional< HashedId8 > vanetza::security::v3::CertificateView::calculate_digest | ( | ) | const |
Calculate digest of certificate
Definition at line 83 of file certificate.cpp.
boost::optional< Certificate > vanetza::security::v3::CertificateView::canonicalize | ( | ) | const |
Convert certificate into its canonical format if possible.
Definition at line 284 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 205 of file certificate.cpp.
KeyType vanetza::security::v3::CertificateView::get_verification_key_type | ( | ) | const |
Get verification key type
Definition at line 88 of file certificate.cpp.
bool vanetza::security::v3::CertificateView::has_region_restriction | ( | ) | const |
Check if certificate has an region restriction
Definition at line 185 of file certificate.cpp.
bool vanetza::security::v3::CertificateView::is_at_certificate | ( | ) | const |
Check if certificate is an Authorization Ticket certificate
Definition at line 195 of file certificate.cpp.
bool vanetza::security::v3::CertificateView::is_ca_certificate | ( | ) | const |
Check if certificate is a Certification Authority certificate
Definition at line 190 of file certificate.cpp.
bool vanetza::security::v3::CertificateView::is_canonical | ( | ) | const |
Check if certificate has a canonical format
Definition at line 200 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 180 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 93 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 98 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 141 of file certificate.cpp.
|
protected |
Definition at line 130 of file certificate.hpp.