#include <delegating_security_entity.hpp>
Public Member Functions | |
DelegatingSecurityEntity (std::unique_ptr< SignService > sign, std::unique_ptr< VerifyService > verify) | |
Create security entity from primitive services. | |
EncapConfirm | encapsulate_packet (EncapRequest &&encap_request) override |
Creates a security envelope covering the given payload. | |
DecapConfirm | decapsulate_packet (DecapRequest &&decap_request) override |
Decapsulates the payload within a SecuredMessage. | |
Private Attributes | |
std::unique_ptr< SignService > | m_sign_service |
std::unique_ptr< VerifyService > | m_verify_service |
Implementation of SecurityEntity delegating to SignService and VerifyService
Definition at line 17 of file delegating_security_entity.hpp.
vanetza::security::DelegatingSecurityEntity::DelegatingSecurityEntity | ( | std::unique_ptr< SignService > | sign, |
std::unique_ptr< VerifyService > | verify | ||
) |
Create security entity from primitive services.
A std::invalid_argument exception is thrown at construction if any given service is not callable.
sign | SN-SIGN service |
verify | SN-VERIFY service |
Definition at line 10 of file delegating_security_entity.cpp.
|
overridevirtual |
Decapsulates the payload within a SecuredMessage.
Verifies the Signature and SignerInfo of a SecuredMessage.
request | containing a SecuredMessage |
Implements vanetza::security::SecurityEntity.
Definition at line 33 of file delegating_security_entity.cpp.
|
overridevirtual |
Creates a security envelope covering the given payload.
The payload consists of the CommonHeader, ExtendedHeader and the payload of the layers above the network layer. The entire security envelope is used to calculate a signature which gets added to the resulting SecuredMessage.
request | containing payload to sign |
Implements vanetza::security::SecurityEntity.
Definition at line 21 of file delegating_security_entity.cpp.
|
private |
Definition at line 35 of file delegating_security_entity.hpp.
|
private |
Definition at line 36 of file delegating_security_entity.hpp.