LibItsSecurity_Templates.ttcn3 116 KB
Newer Older
                        adverseWeatherCondition_Visibility              := ?,
                        adverseWeatherCondition_Precipitation           := ?,
                        slowVehicle                                     := ?,
                        dangerousEndOfQueue                             := ?,
                        vehicleBreakdown                                := ?,
                        postCrash                                       := ?,
                        humanProblem                                    := ?,
                        stationaryVehicle                               := ?,
                        emergencyVehicleApproaching                     := ?,
                        hazardousLocation_DangerousCurve                := ?,
                        collisionRisk                                   := ?,
                        signalViolation                                 := ?,
                        dangerousSituation                              := ?
                    } // End of template mw_sspDENMContainer_dummy
                    
                    /**
                     * @desc 
                     */
                    template (present) SspDENM mw_sspDENMContainer_vehicle
                    modifies mw_sspDENMContainer_dummy := {
                        trafficCondition                                := '0'B,
                        accident                                        := '0'B,
                        roadworks                                       := '0'B,
                        adverseWeatherCondition_Adhesion                := '0'B,
                        hazardousLocation_SurfaceCondition              := '0'B,
                        hazardousLocation_ObstacleOnTheRoad             := '0'B,
                        hazardousLocation_AnimalOnTheRoad               := '0'B,
                        slowVehicle                                     := '0'B,
                        dangerousEndOfQueue                             := '0'B,
                        vehicleBreakdown                                := '0'B,
                        stationaryVehicle                               := '0'B
                    } // End of template mw_sspDENMContainer_vehicle
                    
                    /**
                     * @desc 
                     */
                    template (present) SspDENM mw_sspDENMContainer_roadSideUnit
                    modifies mw_sspDENMContainer_dummy := {
                        trafficCondition                                := '0'B,
                        accident                                        := '0'B,
                        roadworks                                       := '0'B,
                        adverseWeatherCondition_Adhesion                := '0'B,
                        hazardousLocation_SurfaceCondition              := '0'B,
                        hazardousLocation_ObstacleOnTheRoad             := '0'B,
                        hazardousLocation_AnimalOnTheRoad               := '0'B,
                        humanPresenceOnTheRoad                          := '0'B,
                        wrongWayDriving                                 := '0'B,
                        rescueAndRecoveryWorkInProgress                 := '0'B,
                        adverseWeatherCondition_ExtremeWeatherCondition := '0'B,
                        adverseWeatherCondition_Visibility              := '0'B,
                        adverseWeatherCondition_Precipitation           := '0'B,
                        postCrash                                       := '0'B,
                        humanProblem                                    := '0'B,
                        stationaryVehicle                               := '0'B,
                        hazardousLocation_DangerousCurve                := '0'B,
                        collisionRisk                                   := '0'B,
                        dangerousSituation                              := '0'B
                    } // End of template m_sspDENMContainer_roadSideUnit
                    
                    /**
                     * @desc 
                     */
                    template (present) ServiceSpecificPermissions mw_sspDENM_dummy := {
                        version         := '01'O,
                        sspContainer    := {
                            sspDENM := mw_sspDENMContainer_dummy
                        }
                    } // End of template mw_sspDENM_dummy
                    
                    /**
                     * @desc 
                     */
                    template (present) ServiceSpecificPermissions mw_sspDENM_vehicle
                    modifies mw_sspDENM_dummy := {
                        sspContainer    := {
                            sspDENM := mw_sspDENMContainer_vehicle
                        }
                    } // End of template mw_sspDENM_vehicle
                    
                    /**
                     * @desc 
                     */
                    template (present) ServiceSpecificPermissions mw_sspDENM_roadSideUnit
                    modifies mw_sspDENM_dummy := {
                        sspContainer    := {
                            sspDENM := mw_sspDENMContainer_roadSideUnit
                        }
                    } // End of template mw_sspDENM_roadSideUnit
                    
                } // End of group sspDenmRecv
                
            } // End of group sspDenm
            
        } // End of group ssp
        
    } // End of group certificates
garciay's avatar
garciay committed
    group securityProfiles {
        
berge's avatar
berge committed
        group camSecurityProfiles {
            
            /**
             */
            group securityProfilesCAMsSend {
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 */
                template (value) SecuredMessage md_secureMessage_profileCam(
berge's avatar
berge committed
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFields p_trailer_fields,
                    in UInt8 p_securityProfile := 0                                                                            
                ) modifies m_secureMessage := {
                    security_profile    := c_security_profileCAMs,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fields      := p_trailer_fields
                } // End of template md_secureMessage_profileCam
                
            } // End of group securityProfilesCAMsSend
garciay's avatar
garciay committed
            group securityProfilesCAMsRecv {
                
                /**
                 * @desc Generic received template for Security profile for CAMs
                 */
                template (present) SecuredMessage mdw_secureMessageCAMs_dummy
                modifies mw_securedMessage_dummy := {
                    security_profile    := c_security_profileCAMs
                } // End of template mdw_secureMessageCAMs_dummy
berge's avatar
berge committed

                /**
                 * @desc Generic received template for SecuredMessage
                 */
                template (present) SecuredMessage mdw_securedMessageCAM(
                                                                        in template (present) HeaderFields p_header := ?,
garciay's avatar
garciay committed
                                                                        in template SecPayloads p_payloads := ?, 
                                                                        in template (present) TrailerFields p_trailer := ? 
berge's avatar
berge committed
                )
                modifies mw_securedMessage := {
                    security_profile    := c_security_profileCAMs
                } // End of template mdw_securedMessageCAMs
garciay's avatar
garciay committed
                
                /**
                 * @desc Generic received template for Security profile for CAMs
                 */
                template (present) SecuredMessage mdw_secureMessageCAMs
                modifies mdw_secureMessageCAMs_dummy := { // TODO To be continued
                    header_fields       := ?,
                    payload_fields      := ?,
                    trailer_fields      := ?
                } // End of template mdw_secureMessageCAMs
            } // End of group securityProfilesCAMsRecv
garciay's avatar
garciay committed
            
        } // End of group securityProfilesCAMs
garciay's avatar
garciay committed
        
        group denmSecurityProfiles {
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 */
                template (value) SecuredMessage md_secureMessage_profileDenm(
berge's avatar
berge committed
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFields p_trailer_fields,
                    in UInt8 p_securityProfile := 0
                ) modifies m_secureMessage := {
                    security_profile    := c_security_profileDENMs,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fields      := p_trailer_fields
                } // End of template md_secureMessage_profileDenm
                
            } // End of group securityProfilesDENMsSend
            
            group securityProfilesDENMsRecv {
                
filatov's avatar
filatov committed
                /**
                 * @desc Generic received template for Security profile for DENMs
                 */
                template (present) SecuredMessage mdw_secureMessageDENMs_dummy
                modifies mw_securedMessage_dummy := {
                    security_profile    := c_security_profileDENMs
                } // End of template mdw_secureMessageDENMs_dummy
filatov's avatar
filatov committed
                /**
                 * @desc Generic received template for SecuredMessage in DENM profile
                 */
                template (present) SecuredMessage mdw_securedMessageDENM(
                                                                         in template (present) HeaderFields p_header := ?,
                                                                         in template SecPayloads p_payloads := ?, 
                                                                         in template (present) TrailerFields p_trailer := ? 
filatov's avatar
filatov committed
                )
                modifies mw_securedMessage := {
                    security_profile    := c_security_profileDENMs
                } // End of template mdw_securedMessageDENMs
filatov's avatar
filatov committed
                
garciay's avatar
garciay committed
        } // End of group denmSecurityProfiles
        
        group otherSecurityProfiles {
                template (value) SecuredMessage md_securedMessage_profileOther(
berge's avatar
berge committed
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFields p_trailer_fields,
                    in UInt8 p_securityProfile := 0
                ) modifies m_secureMessage := {
                    security_profile    := c_security_profileOthers,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fields      := p_trailer_fields
                } // End of template md_securedMessage_profileOther
                
            } // End of group m_securedMessage_profileOther
            
            group otherSecurityProfilesRecv {
                
                /**
                 * @desc Generic received template for SecuredMessage in DENM profile
                 */
                template (present) SecuredMessage mdw_securedMessageOther(
                                                                          in template (present) HeaderFields p_header := ?,
garciay's avatar
garciay committed
                                                                          in template SecPayloads p_payloads := ?,
                                                                          in template (present) TrailerFields p_trailer := ? 
                )
                modifies mw_securedMessage := {
                    security_profile    := c_security_profileOthers
                } // End of template mdw_securedMessageOther
garciay's avatar
garciay committed
            
        } // End of group otherSecurityProfiles
        
    } // End of group securityProfiles
    /**
     * @desc Send/receive templates for profiles for certificates
     * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.4    Profiles for certificate
     */
    group profileCertificates {
        
        /**
         * @desc SecuredMesage payload to be signed
         * @member p_security_profile   The secury profile 
         * @member p_header_fields      The headers list
         * @member p_payload_fields     The payloads list 
         * @member p_trailer_field_type The trailer type
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 7    Security profiles 
         */
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage(
            in UInt8 p_security_profile,
            in template (value) HeaderFields p_header_fields,
            in template (value) SecPayloads p_payload_fields,
            in template (value) TrailerFieldType p_trailer_field_type
        ) := {
            protocol_version        := c_protocol_version,
            security_profile        := p_security_profile,
            header_fields           := p_header_fields,
            payload_fields          := p_payload_fields,
            trailer_fieldsLength    := 67, // 43h = lengthof(trailer_fields) // FIXME To be enhanced
            trailerFieldType        := p_trailer_field_type
        } // End of template m_toBeSignedSecuredMessage
        
        /**
         * @desc The certificate paylaod to be signed
         * @member p_certificate    The signed certificate to be verified
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.4    Profiles for certificate
         */
        template (value) ToBeSignedCertificate m_toBeSignedCertificate(
                                                                       in template (value) Certificate p_certificate
        ) := {
            version                 := p_certificate.version, 
            signer_infos            := p_certificate.signer_infos,
            subject_info            := p_certificate.subject_info,
            subject_attributes      := p_certificate.subject_attributes,
garciay's avatar
garciay committed
            validity_restrictions   := p_certificate.validity_restrictions
        } // End of template m_toBeSignedCertificate
        
    } // End of group profileCertificates
    
    group taPrimitives {
        
        /**
         * @desc Enable security support
         */
        template (value) AcEnableSecurity m_enableSecurity(
                                                           in Oct32 p_signingPrivateKey,
                                                           in Oct32 p_signingPublicKeyX,
                                                           in Oct32 p_signingPublicKeyY,
                                                           in Oct32 p_encryptPrivateKey,
                                                           in Oct32 p_encryptPublicKeyX,
                                                           in Oct32 p_encryptPublicKeyY,
                                                           in octetstring p_toBeSignedSecuredMessageTemplateDigest,
                                                           in octetstring p_toBeSignedSecuredMessageTemplateCertificate
            signingPrivateKey                           := p_signingPrivateKey,
            signingPublicKeyX                           := p_signingPublicKeyX,
            signingPublicKeyY                           := p_signingPublicKeyY,
            encryptPrivateKey                           := p_encryptPrivateKey,
            encryptPublicKeyX                           := p_encryptPublicKeyX,
            encryptPublicKeyY                           := p_encryptPublicKeyY,
            toBeSignedSecuredMessageTemplateDigest      := p_toBeSignedSecuredMessageTemplateDigest,
            toBeSignedSecuredMessageTemplateCertificate := p_toBeSignedSecuredMessageTemplateCertificate
        } // End of template m_enableSecurity
        
        /**
         * @desc Disable security support
         */
        template (value) AcDisableSecurity m_disableSecurity := {
            disable := true
        } // End of template m_disableSecurity
        
    } // End of group taPrimitives
    
garciay's avatar
garciay committed
    group utPrimitives {
        
    } // End of group utPrimitives
    
} // End of module LibItsSecurity_Templates