@@ -217,8 +217,7 @@ void SecuredMessage::set_inline_p2pcd_request(std::list<HashedId3> requests)
217217 assert (m_struct->content ->choice .signedData ->tbsData );
218218
219219 if (m_struct->content ->choice .signedData ->tbsData ->headerInfo .inlineP2pcdRequest ) {
220- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_SequenceOfHashedId3,
221- &m_struct->content ->choice .signedData ->tbsData ->headerInfo .inlineP2pcdRequest );
220+ asn1::reset (m_struct->content ->choice .signedData ->tbsData ->headerInfo .inlineP2pcdRequest );
222221 }
223222
224223 for (HashedId3 request : requests) {
@@ -245,7 +244,7 @@ void SecuredMessage::set_dummy_signature()
245244 asn1::SignedData* signed_data = m_struct->content ->choice .signedData ;
246245 if (signed_data) {
247246 // Reset the signature structure
248- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_Signature, &( signed_data->signature ) );
247+ asn1::reset ( signed_data->signature );
249248
250249 // Set the signature type to ECDSA NIST P256
251250 signed_data->signature .present = Vanetza_Security_Signature_PR_ecdsaNistP256Signature;
@@ -269,7 +268,7 @@ void SecuredMessage::set_signature(const Signature& signature)
269268 asn1::SignedData* signed_data = m_struct->content ->choice .signedData ;
270269 if (signed_data) {
271270 // Reset the signature structure
272- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_Signature, &( signed_data->signature ) );
271+ asn1::reset ( signed_data->signature );
273272
274273 // Set the signature type to ECDSA NIST P256
275274 switch (signature.type )
@@ -324,7 +323,7 @@ void SecuredMessage::set_signature(const SomeEcdsaSignature& signature)
324323 }
325324 };
326325
327- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_Signature, & m_struct->content ->choice .signedData ->signature );
326+ asn1::reset ( m_struct->content ->choice .signedData ->signature );
328327 m_struct->content ->choice .signedData ->signature = boost::apply_visitor (signature_visitor (), signature);
329328}
330329
@@ -365,7 +364,7 @@ void SecuredMessage::set_external_payload_hash(const Sha256Digest& hash)
365364{
366365 assert (m_struct->content ->present == Vanetza_Security_Ieee1609Dot2Content_PR_signedData);
367366 asn1::HashedData* hashed_data = m_struct->content ->choice .signedData ->tbsData ->payload ->extDataHash ;
368- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_HashedData, hashed_data);
367+ asn1::reset ( hashed_data);
369368 hashed_data->present = Vanetza_Security_HashedData_PR_sha256HashedData;
370369 OCTET_STRING_fromBuf (&hashed_data->choice .sha256HashedData , reinterpret_cast <const char *>(hash.data ()), hash.size ());
371370}
@@ -410,15 +409,15 @@ void SecuredMessage::set_signer_identifier_self()
410409{
411410 assert (m_struct->content ->present == Vanetza_Security_Ieee1609Dot2Content_PR_signedData);
412411 asn1::SignerIdentifier* signer = &m_struct->content ->choice .signedData ->signer ;
413- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_SignerIdentifier, signer);
412+ asn1::reset ( signer);
414413 signer->present = Vanetza_Security_SignerIdentifier_PR_self;
415414}
416415
417416void SecuredMessage::set_signer_identifier (const HashedId8& digest)
418417{
419418 assert (m_struct->content ->present == Vanetza_Security_Ieee1609Dot2Content_PR_signedData);
420419 asn1::SignerIdentifier* signer = &m_struct->content ->choice .signedData ->signer ;
421- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_SignerIdentifier, signer);
420+ asn1::reset ( signer);
422421 signer->present = Vanetza_Security_SignerIdentifier_PR_digest;
423422 OCTET_STRING_fromBuf (&signer->choice .digest , reinterpret_cast <const char *>(digest.data ()), digest.size ());
424423}
@@ -427,7 +426,7 @@ void SecuredMessage::set_signer_identifier(const Certificate& cert)
427426{
428427 assert (m_struct->content ->present == Vanetza_Security_Ieee1609Dot2Content_PR_signedData);
429428 asn1::SignerIdentifier* signer = &m_struct->content ->choice .signedData ->signer ;
430- ASN_STRUCT_RESET (asn_DEF_Vanetza_Security_SignerIdentifier, signer);
429+ asn1::reset ( signer);
431430 signer->present = Vanetza_Security_SignerIdentifier_PR_certificate;
432431 ASN_SEQUENCE_ADD (&signer->choice .certificate , asn1::copy (asn_DEF_Vanetza_Security_EtsiTs103097Certificate, cert.content ()));
433432}
0 commit comments