30 using Time64 = std::uint64_t;
31 using SignerIdentifier = boost::variant<const asn1::HashedId8*, const asn1::Certificate*>;
34 static SecuredMessage with_signed_data();
35 static SecuredMessage with_signed_data_hash();
36 static SecuredMessage with_encrypted_data();
38 uint8_t protocol_version()
const;
39 ItsAid its_aid()
const;
40 PacketVariant payload()
const;
41 bool is_signed()
const;
42 bool is_encrypted()
const;
43 boost::optional<Time64> generation_time()
const;
44 boost::optional<Signature> signature()
const;
45 SignerIdentifier signer_identifier()
const;
46 ByteBuffer signing_payload()
const;
47 HashAlgorithm hash_id()
const;
49 void set_its_aid(ItsAid its_aid);
50 void set_generation_time(Time64 time);
51 void set_generation_location(
const asn1::ThreeDLocation& location);
52 void set_payload(
const ByteBuffer& payload);
53 void set_external_payload_hash(
const Sha256Digest& hash);
54 void set_hash_id(HashAlgorithm);
55 void set_signature(
const Signature& signature);
56 std::list<HashedId3> get_inline_p2pcd_request()
const;
57 void set_inline_p2pcd_request(std::list<HashedId3> requests);
58 void add_inline_p2pcd_request(HashedId3 unkown_certificate_digest);
59 void set_signature(
const SomeEcdsaSignature& signature);
60 void set_dummy_signature();
61 void set_signer_identifier_self();
62 void set_signer_identifier(
const HashedId8&);
66 void get_aes_ccm_ciphertext(ByteBuffer& ccm_ciphertext, std::array<uint8_t, 12>& nonce)
const;
67 void set_aes_ccm_ciphertext(
const ByteBuffer& ccm_ciphertext,
const std::array<uint8_t, 12>& nonce);
68 void set_cert_recip_info(
const HashedId8& recipient_id,
69 const KeyType curve_type,
70 const std::array<uint8_t, 16>& ecies_ciphertext,
71 const std::array<uint8_t, 16>& ecies_tag,
73 bool check_psk_match(
const std::array<uint8_t, 16>& psk)
const;