Commit ff026187 authored by garciay's avatar garciay
Browse files

Prepare support of certificate signature check

parent e2e6f981
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -1736,7 +1736,7 @@ module LibItsSecurity_Templates {
             */
             */
            group securityProfilesCAMsSend {
            group securityProfilesCAMsSend {
                
                
                template (value) ToBeSignedData m_toBeSignedData_cam(
                template (value) ToBeSignedSecuredMessage m_ToBeSignedSecuredMessage_cam(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFieldType p_trailer_field_type
                    in template (value) TrailerFieldType p_trailer_field_type
@@ -1746,7 +1746,7 @@ module LibItsSecurity_Templates {
                    header_fields    := p_header_fields,
                    header_fields    := p_header_fields,
                    payload_fields   := p_payload_fields,
                    payload_fields   := p_payload_fields,
                    trailerFieldType := p_trailer_field_type
                    trailerFieldType := p_trailer_field_type
                } // End of template m_toBeSignedData_profileOther
                } // End of template m_ToBeSignedSecuredMessage_profileOther
                
                
                /**
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 * @desc Generic send template for Security profile for CAMs with several payloads
@@ -1804,7 +1804,7 @@ module LibItsSecurity_Templates {
            
            
            group securityProfilesDENMsSend {
            group securityProfilesDENMsSend {
                
                
                template (value) ToBeSignedData m_toBeSignedData_denm(
                template (value) ToBeSignedSecuredMessage m_ToBeSignedSecuredMessage_denm(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFieldType p_trailer_field_type
                    in template (value) TrailerFieldType p_trailer_field_type
@@ -1814,7 +1814,7 @@ module LibItsSecurity_Templates {
                    header_fields    := p_header_fields,
                    header_fields    := p_header_fields,
                    payload_fields   := p_payload_fields,
                    payload_fields   := p_payload_fields,
                    trailerFieldType := p_trailer_field_type
                    trailerFieldType := p_trailer_field_type
                } // End of template m_toBeSignedData_profileOther
                } // End of template m_ToBeSignedSecuredMessage_profileOther
                
                
            } // End of group securityProfilesDENMsSend
            } // End of group securityProfilesDENMsSend
            
            
@@ -1848,7 +1848,7 @@ module LibItsSecurity_Templates {
            
            
            group otherSecurityProfilesSend {
            group otherSecurityProfilesSend {
                
                
                template (value) ToBeSignedData m_toBeSignedData_profileOther(
                template (value) ToBeSignedSecuredMessage m_ToBeSignedSecuredMessage_profileOther(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFieldType p_trailer_field_type
                    in template (value) TrailerFieldType p_trailer_field_type
@@ -1858,7 +1858,7 @@ module LibItsSecurity_Templates {
                    header_fields    := p_header_fields,
                    header_fields    := p_header_fields,
                    payload_fields   := p_payload_fields,
                    payload_fields   := p_payload_fields,
                    trailerFieldType := p_trailer_field_type
                    trailerFieldType := p_trailer_field_type
                } // End of template m_toBeSignedData_profileOther
                } // End of template m_ToBeSignedSecuredMessage_profileOther
                
                
                template (value) SecuredMessage m_securedMessage_profileOther(
                template (value) SecuredMessage m_securedMessage_profileOther(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
@@ -1900,7 +1900,7 @@ module LibItsSecurity_Templates {
         * @desc Enable security support
         * @desc Enable security support
         */
         */
        template (value) AcEnableSecurity m_enableSecurity(
        template (value) AcEnableSecurity m_enableSecurity(
                                                           in octetstring p_toBeSignedDataTemplate
                                                           in octetstring p_ToBeSignedSecuredMessageTemplate
        ) := {
        ) := {
            signingPrivateKey       := PX_PRIVATE_SIGNING_KEYS[PX_CERTIFICATE_CONFIG_IDX],
            signingPrivateKey       := PX_PRIVATE_SIGNING_KEYS[PX_CERTIFICATE_CONFIG_IDX],
            signingPublicKeyX       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[0].attribute.key.public_key.eccPoint.x,
            signingPublicKeyX       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[0].attribute.key.public_key.eccPoint.x,
@@ -1908,7 +1908,7 @@ module LibItsSecurity_Templates {
            encryptPrivateKey       := PC_PRIVATE_ENCRYPTION_KEYS[PX_CERTIFICATE_CONFIG_IDX],
            encryptPrivateKey       := PC_PRIVATE_ENCRYPTION_KEYS[PX_CERTIFICATE_CONFIG_IDX],
            encryptPublicKeyX       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.x,
            encryptPublicKeyX       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.x,
            encryptPublicKeyY       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.y.y,
            encryptPublicKeyY       := PX_AT_CERTIFICATES[PX_CERTIFICATE_CONFIG_IDX].subject_attributes[1].attribute.key.public_key.aesCcm.eccPoint.y.y,
            toBeSignedDataTemplate  := p_toBeSignedDataTemplate
            ToBeSignedSecuredMessageTemplate  := p_ToBeSignedSecuredMessageTemplate
        } // End of template m_enableSecurity
        } // End of template m_enableSecurity
        
        
        /**
        /**
+20 −3
Original line number Original line Diff line number Diff line
@@ -402,13 +402,13 @@ module LibItsSecurity_TypesAndValues {
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.1 SecuredMessage
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.1 SecuredMessage
         * @see Draft ETSI TS 103 097 V1.1.6 Table 5
         * @see Draft ETSI TS 103 097 V1.1.6 Table 5
         */
         */
        type record ToBeSignedData {
        type record ToBeSignedSecuredMessage {
            UInt8               protocol_version,
            UInt8               protocol_version,
            UInt8               security_profile,
            UInt8               security_profile,
            HeaderFields        header_fields,
            HeaderFields        header_fields,
            SecPayloads         payload_fields optional, // Used by the codec to fill it with the secured packet in case of 'omit' value
            SecPayloads         payload_fields optional, // Used by the codec to fill it with the secured packet in case of 'omit' value
            TrailerFieldType    trailerFieldType
            TrailerFieldType    trailerFieldType
        } // End of type ToBeSignedData
        } // End of type ToBeSignedSecuredMessage
        
        
        /**
        /**
         * @desc Secured message description
         * @desc Secured message description
@@ -568,6 +568,23 @@ module LibItsSecurity_TypesAndValues {
    
    
    group certificateSpecification {
    group certificateSpecification {
        
        
        /**
         * @desc Certificate description, part to be signed
         * @member version                  The certificate's version. Shall be set to 2
         * @member signer_infos             The certificate's signers 
         * @member subject_info             Information on the certificate's subject
         * @member subject_attributes       The certificate's subject
         * @member validity_restrictions    Restrictions regarding the certificate's validity
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 6.1 Certificate
         */
        type record ToBeSignedCertificate {
            UInt8                   version,
            SignerInfos             signer_infos,
            SubjectInfo             subject_info,
            SubjectAttributes       subject_attributes,
            ValidityRestrictions    validity_restrictions
        } // End of type ToBeSignedCertificate
        
        /**
        /**
         * @desc Certificate description
         * @desc Certificate description
         * @member version                  The certificate's version. Shall be set to 2
         * @member version                  The certificate's version. Shall be set to 2
@@ -764,7 +781,7 @@ module LibItsSecurity_TypesAndValues {
            Oct32       encryptPrivateKey,
            Oct32       encryptPrivateKey,
            Oct32       encryptPublicKeyX,
            Oct32       encryptPublicKeyX,
            Oct32       encryptPublicKeyY,
            Oct32       encryptPublicKeyY,
            octetstring toBeSignedDataTemplate
            octetstring ToBeSignedSecuredMessageTemplate
        } // End of type AcEnableSecurity
        } // End of type AcEnableSecurity
        
        
        /**
        /**