Commit 1c6ffae8 authored by berge's avatar berge
Browse files

Added TC_SEC_ITSS_REC_CAM_01_01_NB

Added TC_SEC_ITSS_REC_CAM_01_02_NB
Added TC_SEC_ITSS_REC_CAM_01_03_NB
parent 0f4704eb
......@@ -2563,8 +2563,8 @@ module LibItsGeoNetworking_Functions {
f_buildGnSecuredCam(
v_securedMessage,
bit2oct(encvalue(v_gnNonSecuredPacket)),
true,
{ m_header_field_digest(f_HashedId3FromHashedId8(p_digest)) }
e_certificate,
{ m_header_field_unrecognised_certificate(f_HashedId3FromHashedId8(p_digest)) }
);
// Build secured Gn packet
......
......@@ -180,7 +180,7 @@ module LibItsSecurity_Functions {
* @param p_securedMessage The signed SecureMessage part
* @param p_unsecuredPayload The unsigned payload (e.g. a beacon)
* @param p_threeDLocation The ThreeDLocation value
* @param p_addCertificate Set to true to add the AT certificate in header fields. Otherwise, only the AA certificate digest will be added
* @param p_signerInfoType Add digest or AT certificate or certificate chain
* @param p_headerFields Additional HeaderFields
* @return true on success, false otherwise
* @verdict Unchanged
......@@ -188,7 +188,7 @@ module LibItsSecurity_Functions {
function f_buildGnSecuredCam(
out template (value) SecuredMessage p_securedMessage,
in octetstring p_unsecuredPayload,
in template (omit) boolean p_addCertificate := false,
in template (omit) SignerInfoType p_signerInfoType := e_certificate_digest_with_ecdsap256,
in template (omit) HeaderFields p_headerFields := omit,
in UInt p_configId := PX_CERTIFICATE_CONFIG_IDX
) return boolean {
......@@ -204,7 +204,7 @@ module LibItsSecurity_Functions {
}
// Create SecuredMessage payload to be signed
if (valueof(p_addCertificate) == true) { // Add the AT certificate
if (p_signerInfoType == e_certificate) { // Add the AT certificate
v_toBeSignedSecuredMessage := m_toBeSignedSecuredMessage(
c_security_profileCAMs,
{ // Field HeaderFields
......@@ -223,7 +223,31 @@ module LibItsSecurity_Functions {
}, // End of field HeaderFields
e_signature
);
} else { // Add the AT certificate digest
}
if (p_signerInfoType == e_certificate_chain) { // Add the AT certificate + AA Certificate
v_toBeSignedSecuredMessage := m_toBeSignedSecuredMessage(
c_security_profileCAMs,
{ // Field HeaderFields
m_header_field_signer_info(
m_signerInfo_certificates(
{
PX_TA_CONFIGS[p_configId].aaCertificate,
PX_TA_CONFIGS[p_configId].atCertificate
}
) // End of template m_signerInfo_certificate
), // End of template m_header_field_signer_info
m_header_field_generation_time(f_getCurrentTime()),
m_header_field_message_type(c_messageType_CAM)
}, // End of field HeaderFields
{
m_payload_unsecured(
p_unsecuredPayload
)
}, // End of field HeaderFields
e_signature
);
}
if (p_signerInfoType == e_certificate_digest_with_ecdsap256) { // Add the AT certificate digest
v_toBeSignedSecuredMessage := m_toBeSignedSecuredMessage(
c_security_profileCAMs,
{ // Field HeaderFields
......
......@@ -997,7 +997,7 @@ module LibItsSecurity_Templates {
* @desc Send template for HeaderField with generation location information
* @see Draft ETSI TS 103 097 V1.1.6 Clause 5.4 HeaderField
*/
template (value) HeaderField m_header_field_digest(
template (value) HeaderField m_header_field_unrecognised_certificate(
in template (value) HashedId3 p_digest
) := {
type_ := e_request_unrecognized_certificate,
......@@ -1010,7 +1010,7 @@ module LibItsSecurity_Templates {
* @desc Send template for HeaderField with generation location information
* @see Draft ETSI TS 103 097 V1.1.6 Clause 5.4 HeaderField
*/
template (value) HeaderField m_header_field_multiple_digests(
template (value) HeaderField m_header_field_unrecognised_certificates(
in template (value) HashedId3s p_digests
) := {
type_ := e_request_unrecognized_certificate,
......@@ -2088,7 +2088,7 @@ module LibItsSecurity_Templates {
/**
*/
group securityProfilesCAMsSend {
/**
* @desc Generic send template for Security profile for CAMs with several payloads
*/
......
......@@ -932,7 +932,7 @@ module LibItsSecurity_TypesAndValues {
with {
encode "UpperTester"
} // End of group utPrimitives
} with {
encode "LibItsSecurity"
} // End of module LibItsSecurity_TypesAndValues
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