LibItsSecurity_Templates.ttcn3 115 KB
Newer Older
                        postCrash                                       := '1'B,
                        humanProblem                                    := '1'B,
                        stationaryVehicle                               := '1'B,
                        emergencyVehicleApproaching                     := '1'B,
                        hazardousLocation_DangerousCurve                := '1'B,
                        collisionRisk                                   := '1'B,
                        signalViolation                                 := '1'B,
                        dangerousSituation                              := '1'B
                    } // End of template m_sspDENMContainer_sign_all
                    
                    /**
                     * @desc 
                     */
                    template (value) SspDENM m_sspDENMContainer_vehicle 
                    modifies m_sspDENMContainer_sign_all:= {
                        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 m_sspDENMContainer_sign_all
                    
                    /**
                     * @desc 
                     */
                    template (value) SspDENM m_sspDENMContainer_roadSideUnit 
                    modifies m_sspDENMContainer_sign_all:= {
                        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 (value) ServiceSpecificPermissions m_sspDENM_sign_all := {
                        version         := '01'O,
                        sspContainer    := {
                            sspDENM := m_sspDENMContainer_sign_all
                        } // End of field sspContainer
                    } // End of template m_sspDENM_sign_all
                    
                    /**
                     * @desc 
                     */
                    template (value) ServiceSpecificPermissions m_sspDENM_vehicle 
                    modifies m_sspDENM_sign_all := {
                        sspContainer    := {
                            sspDENM := m_sspDENMContainer_vehicle
                        } // End of field sspContainer
                    } // End of template m_sspDENM_vehicle
                    
                    /**
                     * @desc 
                     */
                    template (value) ServiceSpecificPermissions m_sspDENM_roadSideUnit 
                    modifies m_sspDENM_sign_all := {
                        sspContainer    := {
                            sspDENM := m_sspDENMContainer_vehicle
                        } // End of field sspContainer
                    } // End of template m_sspDENM_roadSideUnit
                    
                } // End of group sspDenmSend
                
                group sspDenmRecv {
                    
                    /**
                     * @desc 
                     */
                    template (present) SspDENM mw_sspDENMContainer_dummy := {
                        trafficCondition                                := ?,
                        accident                                        := ?,
                        roadworks                                       := ?,
                        adverseWeatherCondition_Adhesion                := ?,
                        hazardousLocation_SurfaceCondition              := ?,
                        hazardousLocation_ObstacleOnTheRoad             := ?,
                        hazardousLocation_AnimalOnTheRoad               := ?,
                        humanPresenceOnTheRoad                          := ?,
                        wrongWayDriving                                 := ?,
                        rescueAndRecoveryWorkInProgress                 := ?,
                        adverseWeatherCondition_ExtremeWeatherCondition := ?,
                        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
    /**
     * @desc Send/receive templates for profiles for certificates
     * @see Draft ETSI TS 103 097 V1.1.9 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_field     The payloads list 
         * @member p_trailer_field_type The trailer type
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 7    Security profiles 
         */
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage(
            in template (value) HeaderFields p_header_fields,
            in template (value) SecPayload p_payload_field,
            in template (value) TrailerFieldType p_trailer_field_type
        ) := {
            protocol_version        := c_protocol_version,
            header_fields           := p_header_fields,
            payload_field           := p_payload_field,
            trailer_fieldsLength    := 67, // 43h = lengthof(trailer_fields) // FIXME To be enhanced due to multiple signature
            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.9 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