Commit e506ce4d authored by garciay's avatar garciay
Browse files

Add support of secured beacon with certificate in TA

parent 3322fc51
......@@ -1714,10 +1714,12 @@ module LibItsGeoNetworking_Functions {
function f_acEnableSecurity() runs on ItsBaseGeoNetworking return FncRetCode {
// Local variables
var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessage;
var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageDigest;
var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageCertificate;
// Build the beacon template
v_toBeSignedSecuredMessage := f_buildSecuredMessagePayloadToBeSigned();
v_toBeSignedSecuredMessageDigest := f_buildSecuredMessagePayloadToBeSigned();
v_toBeSignedSecuredMessageCertificate := f_buildSecuredMessagePayloadToBeSigned(true);
return f_acTriggerEvent(
AcGnPrimitive:{ acEnableSecurity := m_enableSecurity(
......@@ -1727,8 +1729,9 @@ module LibItsGeoNetworking_Functions {
PX_TA_CONFIGS[PX_CERTIFICATE_CONFIG_IDX].encryptPrivateKey,
PX_TA_CONFIGS[PX_CERTIFICATE_CONFIG_IDX].atCertificate.subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.x,
PX_TA_CONFIGS[PX_CERTIFICATE_CONFIG_IDX].atCertificate.subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.y.y,
bit2oct(encvalue(v_toBeSignedSecuredMessage
))) }
bit2oct(encvalue(v_toBeSignedSecuredMessageDigest)),
bit2oct(encvalue(v_toBeSignedSecuredMessageCertificate))
) }
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment