LibItsSecurity_TypesAndValues.ttcn 6.62 KB
Newer Older
garciay's avatar
garciay committed
/**
garciay's avatar
garciay committed
 *  @author   ETSI / STF481 / STF507 / STF517
garciay's avatar
garciay committed
 *  @version  $URL$
 *            $Id$
 *  @desc     Module containing types and values for Security Protocol
 *  @see Draft ETSI TS 103 097 V1.1.14
garciay's avatar
garciay committed
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
garciay's avatar
garciay committed
 */
garciay's avatar
garciay committed
module LibItsSecurity_TypesAndValues {
garciay's avatar
garciay committed
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
garciay's avatar
garciay committed
    
    // LibIts
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    import from IEEE1609dot2 language "ASN.1:1997" all;
    import from EtsiTs103097Module language "ASN.1:1997" all;
    
    /** 
     * @desc Specification of basic format elements
     * @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2
    group basicFormatElements {
        
        /**
         * @desc Service specific permissions definition for CAM
         * @see ETSI EN 302 637-2 V1.3.2 (2014-11) Clause 6.2.2.2  Service Specific Permissions (SSP)
         */
        type record SspCAM {
            Bit1        cenDsrcTollingZone,
            Bit1        publicTransport,
            Bit1        specialTransport,
            Bit1        dangerousGoods,
            Bit1        roadwork,
            Bit1        rescue,
            Bit1        emergency,
            Bit1        safetyCar,
            Bit1        closedLanes,
            Bit1        requestForRightOfWay,
            Bit1        requestForFreeCrossingAtATrafficLight,
            Bit1        noPassing,
            Bit1        noPassingForTrucks,
            Bit1        speedLimit,
garciay's avatar
garciay committed
            Bit18       reserved
        } with {
          variant "FIELDORDER(msb)"
        /**
         * @desc Service specific permissions definition for DENM
         * @member trafficCondition
         * @member accident
         * @member roadworks
         * @member adverseWeatherCondition_Adhesion
         * @member hazardousLocation_SurfaceCondition
         * @member hazardousLocation_ObstacleOnTheRoad
         * @member hazardousLocation_AnimalOnTheRoad
         * @member humanPresenceOnTheRoad
         * @member wrongWayDriving
         * @member rescueAndRecoveryWorkInProgress
         * @member adverseWeatherCondition_ExtremeWeatherCondition  
         * @member adverseWeatherCondition_Visibility
         * @member adverseWeatherCondition_Precipitation
         * @member slowVehicle
         * @member dangerousEndOfQueue
         * @member vehicleBreakdown
         * @member postCrash
         * @member humanProblem
         * @member stationaryVehicle
         * @member emergencyVehicleApproaching
         * @member hazardousLocation_DangerousCurve
         * @member collisionRisk
         * @member signalViolation
         * @member dangerousSituation
         * @member reserved                                             Reserved for Future Usage
         * @see Draft ETSI EN 302 637-3 V1.2.10 Clause 6.2.2.2  Service Specific Permissions (SSP)
         */
        type record SspDENM {
            Bit1        trafficCondition,
            Bit1        accident,
            Bit1        roadworks,
            Bit1        adverseWeatherCondition_Adhesion,
            Bit1        hazardousLocation_SurfaceCondition,
            Bit1        hazardousLocation_ObstacleOnTheRoad,
            Bit1        hazardousLocation_AnimalOnTheRoad,
            Bit1        humanPresenceOnTheRoad,
            Bit1        wrongWayDriving,
            Bit1        rescueAndRecoveryWorkInProgress,
            Bit1        adverseWeatherCondition_ExtremeWeatherCondition,
            Bit1        adverseWeatherCondition_Visibility,
            Bit1        adverseWeatherCondition_Precipitation,
            Bit1        slowVehicle,
            Bit1        dangerousEndOfQueue,
            Bit1        vehicleBreakdown,
            Bit1        postCrash,
            Bit1        humanProblem,
            Bit1        stationaryVehicle,
            Bit1        emergencyVehicleApproaching,
            Bit1        hazardousLocation_DangerousCurve,
            Bit1        collisionRisk,
            Bit1        signalViolation,
garciay's avatar
garciay committed
            Bit1        dangerousSituation,
            Bit8        reserved
        } with {
          variant "FIELDORDER(msb)"
    } // End of group certificateSpecification
    /**
     * @desc Send/receive templates for profiles for certificates
     * @see Draft ETSI TS 103 097 V1.1.14 Clause 7.4    Profiles for certificate
     */
    group profileCertificates {
        
garciay's avatar
garciay committed
        type record CertificatesCachingItem {
            HashedId8               hashedId8,
            EtsiTs103097Certificate certificate
garciay's avatar
garciay committed
        }
        type record of CertificatesCachingItem CertificatesCaching;
        
        
    } // End of group profileCertificates 
    
    group taConfiguration {
        
        /**
         * @desc Describes the Test Adapter security configuration
         * @member signingPrivateKey    Signing private keys generated by the PKI Infrastructire tool (CertChainGenerator\src\org\etsi\stf440\pki\MainApp.java)
         * @member encryptPrivateKey    Encryption private keys generated by the PKI Infrastructire tool (CertChainGenerator\src\org\etsi\stf440\pki\MainApp.java)
         * @member caCertificate        Certificates Authorization certificate generated by the PKI Infrastructire tool
         * @member aaCertificate        Enrolment Credential certificate generated by the PKI Infrastructire tool
         * @member atCertificate        Authorization Tickate certificate generated by the PKI Infrastructire tool
         * @member location             3D location associated to each configuration
         */
        type record TaConfig {
            Oct32                       signingPrivateKey,
            Oct32                       encryptPrivateKey,
            EtsiTs103097Certificate     caCertificate,
            EtsiTs103097Certificate     aaCertificate,
            EtsiTs103097Certificate     atCertificate,
            ThreeDLocation              location
        } // End of type TaConfig
        
        /**
garciay's avatar
garciay committed
         * @desc Describes the Test Adapter security configurations
        type set of TaConfig TaConfigs;
        
    } // End of group taConfiguration
    
garciay's avatar
garciay committed
    group utPrimitives {
        
    }
    with {
        encode "UpperTester"
    } // End of group utPrimitives
garciay's avatar
garciay committed
} with {
garciay's avatar
garciay committed
    variant ""
garciay's avatar
garciay committed
    encode "LibItsSecurity"
} // End of module LibItsSecurity_TypesAndValues