Commit e463d7cf authored by garciay's avatar garciay
Browse files

Align source code with Draft ETSI TS 103 097 V1.1.13

parent 9b8f9548
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ module LibItsSecurity_Functions {
        * @desc    Calculate digest over the certificate
        * @param   p_cert The certificate
        * @return  the digest
        * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.13   HashedId8
        * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.13   HashedId8
        */
        function f_calculateDigestFromCertificate(
                                                  in Certificate p_cert
@@ -148,8 +148,7 @@ module LibItsSecurity_Functions {
                            m_header_field_generation_time(oct2int('BBBBBBBB'O)),   // To be replaced by TA with generation time
                            m_header_field_generation_location(
                                vc_location
                            ),
                            m_header_field_verification_advice_recommended
                            )
                        }, // End of field HeaderFields
                        m_payload_signed(
                            'AAAAAAAAAA'O                                           // To be replaced by TA with real payload
@@ -167,8 +166,7 @@ module LibItsSecurity_Functions {
                            m_header_field_generation_time(oct2int('BBBBBBBB'O)),   // To be replaced by TA with generation time
                            m_header_field_generation_location(
                                vc_location
                            ),
                            m_header_field_verification_advice_recommended
                            )
                        }, // End of field HeaderFields
                        m_payload_signed(
                            'AAAAAAAAAA'O                                           // To be replaced by TA with real payload
@@ -308,7 +306,7 @@ module LibItsSecurity_Functions {
            * @param p_addMissingHeaders    Whether to add mandatory headers not present in p_headerFields
            * @return true on success, false otherwise
            * 
            * @see Draft ETSI TS 103 097 V1.1.9 Clause 7.1  Security profile for CAMs
            * @see Draft ETSI TS 103 097 V1.1.13 Clause 7.1  Security profile for CAMs
            */
            function f_buildGnSecuredCam(
                                         out template (value) SecuredMessage p_securedMessage,
@@ -742,7 +740,7 @@ module LibItsSecurity_Functions {
        group certificateGetters {
            
            /**
            * @desc Set the generation location as defined in Draft ETSI TS 103 097 V1.1.9 Clause 7.2 Security profile for DENMs
            * @desc Set the generation location as defined in Draft ETSI TS 103 097 V1.1.13 Clause 7.2 Security profile for DENMs
            * @param p_latitude    The latitude value of the ITS-S position
            * @param p_longitude   The longitude value of the ITS-S position
            * @param p_elevation   The elevation value of the ITS-S position
+111 −155

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ module LibItsSecurity_TestSystem {
            var Oct32 vc_signingPrivateKey; 
            var Oct32 vc_encryptPrivateKey; 
            
            // Generation position. See Draft ETSI TS 103 097 V1.1.9 Clause 7.2    Security profiles for DENMs
            // Generation position. See Draft ETSI TS 103 097 V1.1.13 Clause 7.2    Security profiles for DENMs
            var ThreeDLocation vc_location; 
            
            // Test Adapter certificates & private keys
+58 −71
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *  @version  $URL$
 *            $Id$
 *  @desc     Module containing types and values for Security Protocol
 *  @see Draft ETSI TS 103 097 V1.1.9
 *  @see Draft ETSI TS 103 097 V1.1.13
 */
module LibItsSecurity_TypesAndValues {
    
@@ -13,19 +13,19 @@ module LibItsSecurity_TypesAndValues {
    
    /** 
     * @desc Specification of basic format elements
     * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2
     * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2
     */
    group basicFormatElements {
        
        /**
         * @desc An integer of variable length
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.1   IntX
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.1   IntX
         */
        type integer IntX with { variant "IntX" };
        
        /**
         * @desc List of supported algorithms based on public key cryptography
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.2   PublicKeyAlgorithm
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.2   PublicKeyAlgorithm
         */
        type enumerated PublicKeyAlgorithm {
            e_ecdsa_nistp256_with_sha256    (0),
@@ -34,7 +34,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc List of supported algorithms based on symmetric key cryptography
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.3   SymmetricAlgorithm
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.3   SymmetricAlgorithm
         */
        type enumerated SymmetricAlgorithm {
            e_aes_128_ccm   (0)
@@ -44,7 +44,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Wrapper for public keys by specifying the used algorithm
         * @member algorithm    Specifying the used algorithm 
         * @member public_key   The public key structure
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.4   PublicKey
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.4   PublicKey
         */
        type record PublicKey {
            PublicKeyAlgorithm  algorithm,
@@ -79,8 +79,8 @@ module LibItsSecurity_TypesAndValues {
         * @member x            The x coordinate 
         * @member y            The y coordinate
         * @remark In case of e_x_coordinate_only, e_compressed_lsb_y_0 and e_compressed_lsb_y_1, the field y shall not be present
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.5   EccPoint
         * @see Draft ETSI TS 103 097 V1.1.9 Table 2: Derivation of field sizes depending on the used algorithm
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.5   EccPoint
         * @see Draft ETSI TS 103 097 V1.1.13 Table 2: Derivation of field sizes depending on the used algorithm
         */
        type record EccPoint {
            EccPointType        type_,
@@ -100,7 +100,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc List of supported ECC key types
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.6   EccPointType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.6   EccPointType
         */
        type enumerated EccPointType { 
            e_x_coordinate_only     (0),
@@ -113,7 +113,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Parameters and additional data required for encryption and decryption of data using different symmetric encryption algorithms
         * @member symm_algorithm   The symmetric algorithm that shall be used with a public key for encryption 
         * @member public_key       The public key for encryption 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.7   EncryptionParameters
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.7   EncryptionParameters
         */
        type record EncryptionParameters {
            SymmetricAlgorithm              symm_algorithm,
@@ -134,7 +134,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Signatures based on public key cryptography
         * @member algorithm    Algorithm type
         * @member signature_   The signature
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.8   Signature
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.8   Signature
         */
        type record Signature {
            PublicKeyAlgorithm  algorithm,
@@ -155,7 +155,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Description an ECDSA based signature
         * @member r            Coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
         * @member s            TODO
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.9  EcdsaSignature
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.9  EcdsaSignature
         */
        type record EcdsaSignature {
            EccPoint            r,
@@ -168,7 +168,7 @@ module LibItsSecurity_TypesAndValues {
         * @member type_        Signature algorithm type
         * @member signerInfo   Signature algorithm information. In case of self-signed, this field is not required because of no additional data shall be given
         * @remark In case of e_self, the field signerInfo shall not be present
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.10  SignerInfo
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.10  SignerInfo
         */
        type record SignerInfo {
            SignerInfoType type_,
@@ -203,7 +203,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc The list of the methods to describe a message's signer
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.11  SignerInfoType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.11  SignerInfoType
         */
        type enumerated SignerInfoType {
            e_self                                      (0),
@@ -215,27 +215,27 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Identifies data such as a certificate
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.12  HashedId8
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.12  HashedId8
         * @see RFC2246 Clause 4.2. Miscellaneous
         */
        type Oct8 HashedId8;
        
        /**
         * @desc Indication on an identifier, where real identification is not required
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.13  HashedId3
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.13  HashedId3
         * @see RFC2246 Clause 4.2. Miscellaneous
         */
        type Oct3 HashedId3;
        
        /**
         * @desc The unsigned 32 bits number of International Atomic Time (TAI) microseconds since 00:00:00 UTC, 01 January 2004
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.14  Time64
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.14  Time64
         */
        type UInt32 Time32;
        
        /**
         * @desc The unsigned 64 bits number of International Atomic Time (TAI) microseconds since 00:00:00 UTC, 01 January 2004
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.15  Time64
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.15  Time64
         */
        type UInt64 Time64;
        
@@ -243,7 +243,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc The time along with the standard deviation of time values
         * @member time         The time being encoded
         * @member log_std_dev  The rounded up value of the log to the base 1,134666 of the implementation's estimate of the standard deviation in units of nanoseconds
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.16  Time64WithStandardDeviation
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.16  Time64WithStandardDeviation
         */
        type record Time64WithStandardDeviation {
            Time64  time,
@@ -254,7 +254,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Defines the duration of a time span (e.g. a certificate's validity)
         * @member unit     Units of the duration
         * @member duration The duration of a time span
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.17  Duration
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.17  Duration
         */
        type record Duration {
            DurationUnitType    unit,
@@ -263,8 +263,8 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc List of supported duration unit
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.17  Duration
         * @see Draft ETSI TS 103 097 V1.1.9 Table 3: Interpretation of duration unit bits
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.17  Duration
         * @see Draft ETSI TS 103 097 V1.1.13 Table 3: Interpretation of duration unit bits
         */
        type enumerated DurationUnitType {
            e_seconds       (0), // seconds
@@ -276,13 +276,13 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Define latitude range
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.18/19  Two/ThreeDLocation/permitted values
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.18/19  Two/ThreeDLocation/permitted values
         */
        type integer WGSLatitude  (-900000000 .. 900000001)  with { variant "32 bit"};
        
        /**
         * @desc Define longitude range
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.18/19  Two/hreeDLocation/permitted values
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.18/19  Two/hreeDLocation/permitted values
         */
        type integer WGSLongitude (-1800000000 .. 1800000001) with { variant "32 bit"};
        
@@ -290,7 +290,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Specify a two dimensional location
         * @member latitude     Latitude in tenths of micro degrees relative to the World Geodetic System (WGS)-84 datum 
         * @member longitude    Longitude in tenths of micro degrees relative to the World Geodetic System (WGS)-84 datum 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.18  TwoDLocation
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.18  TwoDLocation
         */
        type record TwoDLocation {
            WGSLatitude     latitude,
@@ -302,7 +302,7 @@ module LibItsSecurity_TypesAndValues {
         * @member latitude     Latitude in tenths of micro degrees relative to the World Geodetic System (WGS)-84 datum 
         * @member longitude    Longitude in tenths of micro degrees relative to the World Geodetic System (WGS)-84 datum 
         * @member elevation    Elevation relative to the WGS-84 ellipsoid in decimetres
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.19  ThreeDLocation
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.19  ThreeDLocation
         */
        type record ThreeDLocation {
            WGSLatitude     latitude,
@@ -321,7 +321,7 @@ module LibItsSecurity_TypesAndValues {
         * @member region_type  Region type 
         * @member region       Region description
         * @remark In case of e_none, the field region shall not be present
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.20  GeographicRegion
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.20  GeographicRegion
         */
        type record GeographicRegion {
            RegionType                  region_type,
@@ -338,7 +338,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc The list of the possible region types
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.21  RegionType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.21  RegionType
         */
        type enumerated RegionType {
            e_none      (0),
@@ -352,7 +352,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Defines a circular region
         * @member center   Circular center
         * @member radius   Radius given in metres
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.22  CircularRegion
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.22  CircularRegion
         */
        type record CircularRegion {
            TwoDLocation    center,
@@ -363,7 +363,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Defines a rectangular region by connecting the four points in the order (northwest.latitude, northwest.longitude), (northwest.longitude, southeast.longitude), (southeast.longitude, southeast.longitude), and (southeast.longitude, northwest.longitude)
         * @member northwest   Upper left corner
         * @member southeast   Lower rigth corner
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.23  RectangularRegion
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.23  RectangularRegion
         */
        type record RectangularRegion {
            TwoDLocation    northwest,
@@ -387,7 +387,7 @@ module LibItsSecurity_TypesAndValues {
         * @member region_dictionary   The region dictionary
         * @member region_identifier   The region identifier
         * @member local_region        The whole region. 0 if the whole region is meant
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.25  IdentifiedRegion
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.25  IdentifiedRegion
         */
        type record IdentifiedRegion {
            RegionDictionary    region_dictionary,
@@ -397,7 +397,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc The list of dictionaries containing two-octet records of globally defined regions
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.26  RegionDictionary
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 4.2.26  RegionDictionary
         */
        type enumerated RegionDictionary {
            e_iso_3166_1  (0),
@@ -412,22 +412,11 @@ module LibItsSecurity_TypesAndValues {
         */
        type set of UInt16 RegionIdentifiers;
        
        /**
         * @desc Defines an advice which tells the vrifier if a message should be cryptographically verified 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 4.2.27  VerificationAdvice
         */
        type enumerated VerificationAdvice {
            e_recommended   (0),
            e_required      (1)
        } with { 
            variant "8 bit" 
        } // End of type VerificationAdvice
        
    } // End of group basicFormatElements
    
    /** 
     * @desc Specification of security header
     * @see Draft ETSI TS 103 097 V1.1.9 Clause 5
     * @see Draft ETSI TS 103 097 V1.1.13 Clause 5
     */
    group SecurityMessages {
        
@@ -438,14 +427,14 @@ module LibItsSecurity_TypesAndValues {
         * @member payload_field   The message's payload
         * @member trailer_fields   Security information after the payload
         * 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.1 SecuredMessage
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 7 Security profiles
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.1 SecuredMessage
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 7 Security profiles
         */
        type record ToBeSignedSecuredMessage {
            UInt8               protocol_version,
            HeaderFields        header_fields,
            SecPayload          payload_field,          // Used by the codec to fill it with the secured packet in case of 'omit' value
            UInt8               trailer_fieldsLength,   // Draft ETSI TS 103 097 V1.1.9 Clauses 7.1/2/3 
            UInt8               trailer_fieldsLength,   // Draft ETSI TS 103 097 V1.1.13 Clauses 7.1/2/3 
            TrailerFieldType    trailerFieldType
        } // End of type ToBeSignedSecuredMessage
        
@@ -456,7 +445,7 @@ module LibItsSecurity_TypesAndValues {
         * @member payload_fields   The message's payload
         * @member trailer_fields   Security information after the payload
         * 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.1 SecuredMessage
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.1 SecuredMessage
         */
        type record SecuredMessage {
            UInt8           protocol_version,
@@ -476,7 +465,7 @@ module LibItsSecurity_TypesAndValues {
         * @member type_    Payload type
         * @member payload  Payload data
         * 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.2 Payload
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.2 Payload
         */
        type record SecPayload {
            SecPayloadType  type_,
@@ -486,7 +475,7 @@ module LibItsSecurity_TypesAndValues {
        /**
         * @desc Supported types of payloads
         * 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.3 PayloadType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.3 PayloadType
         */
        type enumerated SecPayloadType {
            e_unsecured             (0),
@@ -504,7 +493,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Information of interest to the security layer
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.4    HeaderField
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.4    HeaderField
         */
        type record HeaderField {
            HeaderFieldType         type_,
@@ -513,7 +502,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Supported types of header fields
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.5    HeaderFieldType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.5    HeaderFieldType
         */
        type enumerated HeaderFieldType {
            e_generation_time                       (0),
@@ -521,8 +510,7 @@ module LibItsSecurity_TypesAndValues {
            e_expiration                            (2),
            e_generation_location                   (3),
            e_request_unrecognized_certificate      (4),
            e_verification_advice                   (5),
            e_its_aid                               (6),
            e_its_aid                               (5),
            e_signer_info                           (128),
            e_encryption_parameters                 (129),
            e_recipient_info                        (130)
@@ -534,7 +522,6 @@ module LibItsSecurity_TypesAndValues {
            Time32                          expiry_time,
            ThreeDLocation                  generation_location,
            HashedId3s                      digests,
            VerificationAdvice              verification_advice,
            IntX                            its_aid,
            SignerInfo                      signer,
            EncryptionParameters            enc_params,
@@ -556,7 +543,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Information used by the security layer after processing the payload
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.6 TrailerField
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.6 TrailerField
         */
        type record TrailerField {
            TrailerFieldType        type_,
@@ -575,7 +562,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Supported types of trailer fields
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.7 TrailerFieldType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.7 TrailerFieldType
         */
        type enumerated TrailerFieldType {
            e_signature     (1)
@@ -586,7 +573,7 @@ module LibItsSecurity_TypesAndValues {
         * @member cert_id          Identifier for the recipient's certificate
         * @member pk_encryption    Type of the recipient's certificate
         * @member enc_key          The recipient's certificate
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.8 RecipientInfo
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.8 RecipientInfo
         */
        type record RecipientInfo {
            HashedId8               cert_id,
@@ -609,7 +596,7 @@ module LibItsSecurity_TypesAndValues {
         * @member v            The sender's ECC ephemeral key used for the Elliptic Curve Encryption Scheme
         * @member c            The encrypted (AES) key 
         * @member t            The authentication tag vector
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 5.9 EciesEncryptedKey
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 5.9 EciesEncryptedKey
         */
         type record EciesEncryptedKey {
            EccPoint             v,
@@ -629,7 +616,7 @@ module LibItsSecurity_TypesAndValues {
         * @member subject_attributes       The certificate's subject
         * @member validity_restrictions    Restrictions regarding the certificate's validity
         * @member signature_               The signature of this certificate signed by the responsible CA
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.1 Certificate
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.1 Certificate
         */
        type record Certificate {
            UInt8                   version,
@@ -656,7 +643,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Certificate description
         * @member subject_type The type subjet
         * @member subject_name The subject itself
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.2 SubjectInfo
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.2 SubjectInfo
         * @remark The subject_name variable-length vector shall have a maximum length of 32 bytes
         */
        type record SubjectInfo {
@@ -666,7 +653,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc The list of the possible types of subjects
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.3 SubjectInfoType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.3 SubjectInfoType
         */
        type enumerated SubjectType {
            e_enrollment_credential     (0),
@@ -681,7 +668,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Subject attribute description
         * @member type_        The type of attribute
         * @member attribute    The attribute itself
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.4 SubjectAttribute
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.4 SubjectAttribute
         */
        type record SubjectAttribute {
            SubjectAttributeType        type_,
@@ -726,7 +713,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc The list of the possible types of attributes
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.5 SubjectAttributeType
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.5 SubjectAttributeType
         */
        type enumerated SubjectAttributeType {
            e_verification_key      (0),
@@ -742,8 +729,8 @@ module LibItsSecurity_TypesAndValues {
         * @member levels   The assurance levels
         * @member reserved Out of scope
         * @member confidence The confidence
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.6 SubjectAssurance
         * @see Draft ETSI TS 103 097 V1.1.9 Table 5: Bitwise encoding of subject assurance
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.6 SubjectAssurance
         * @see Draft ETSI TS 103 097 V1.1.13 Table 5: Bitwise encoding of subject assurance
         */
        type record SubjectAssurance {
            Bit3    levels,
@@ -755,7 +742,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc Defines ways to restrict the validity restriction of the certificate
         * @member type_    The type of validity restriction of the certificate
         * @member validity The validity restriction of the certificate
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.6 SubjectAssurance
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.6 SubjectAssurance
         */
        type record ValidityRestriction {
            ValidityRestrictionType         type_,
@@ -801,7 +788,7 @@ module LibItsSecurity_TypesAndValues {
        
        /**
         * @desc Type of validity restriction of a certificate
         * @see Draft ETSI TS 103 097 V1.1.9 6.8    ValidityRestrictionType
         * @see Draft ETSI TS 103 097 V1.1.13 6.8    ValidityRestrictionType
         */
        type enumerated ValidityRestrictionType {
            e_time_end                  (0),
@@ -816,7 +803,7 @@ module LibItsSecurity_TypesAndValues {
         * @desc ITS-AID  description
         * @member its_aid                      The ITS_AID identifier
         * @member service_specific_permissions The associated Service Specific Permissions 
         * @see Draft ETSI TS 103 097 V1.1.9 Clause 6.9 ItsAidSsp
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 6.9 ItsAidSsp
         */
        type record ItsAidSsp {
            IntX                        its_aid,
@@ -903,7 +890,7 @@ module LibItsSecurity_TypesAndValues {
    
    /**
     * @desc Send/receive templates for profiles for certificates
     * @see Draft ETSI TS 103 097 V1.1.9 Clause 7.4    Profiles for certificate
     * @see Draft ETSI TS 103 097 V1.1.13 Clause 7.4    Profiles for certificate
     */
    group profileCertificates {
        
@@ -914,7 +901,7 @@ module LibItsSecurity_TypesAndValues {
         * @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.9 Clause 7.4    Profiles for certificate
         * @see Draft ETSI TS 103 097 V1.1.13 Clause 7.4    Profiles for certificate
         */
        type record ToBeSignedCertificate {
            UInt8                   version,