Skip to content

Commit

Permalink
Add missing Certificate::issuer_is_self()
Browse files Browse the repository at this point in the history
  • Loading branch information
khevessy committed Nov 13, 2024
1 parent 0fbb071 commit 877d181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vanetza/security/v3/certificate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,11 @@ void Certificate::set_signature(const SomeEcdsaSignature& signature)
m_struct->signature = boost::apply_visitor(signature_visitor(), signature);
}

bool Certificate::issuer_is_self() const
{
return m_struct->issuer.present == Vanetza_Security_IssuerIdentifier_PR_self;
}

Certificate fake_certificate()
{
Certificate certi;
Expand Down
2 changes: 2 additions & 0 deletions vanetza/security/v3/certificate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ struct Certificate : public asn1::asn1c_oer_wrapper<asn1::EtsiTs103097Certificat
void add_cert_permission(asn1::PsidGroupPermissions* group_permission);

void set_signature(const SomeEcdsaSignature& signature);

bool issuer_is_self() const;
};

/**
Expand Down

0 comments on commit 877d181

Please sign in to comment.