LibItsSecurity_Templates.ttcn 112 KB
Newer Older
garciay's avatar
garciay committed
1
/**
Yann Garcia's avatar
Yann Garcia committed
2
 *  @author   ETSI / STF481 / STF507 / STF517 / STF538 / STF545
garciay's avatar
garciay committed
3
4
5
 *  @version  $URL$
 *            $Id$
 *  @desc     Module containing templates for Security Protocol
garciay's avatar
garciay committed
6
7
8
9
 *  @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
10
11
12
13
 *
 */
module LibItsSecurity_Templates {
    
14
    // LibCommon
15
16
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
garciay's avatar
garciay committed
17
18
19
    
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
20
    
garciay's avatar
garciay committed
21
22
23
    // LibItsGeoNetworking
    import from LibItsGeoNetworking_TypesAndValues all;
    
garciay's avatar
garciay committed
24
    // LibIts
garciay's avatar
garciay committed
25
26
27
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    import from IEEE1609dot2 language "ASN.1:1997" all;
    import from EtsiTs103097Module language "ASN.1:1997" all;
garciay's avatar
garciay committed
28
    
garciay's avatar
garciay committed
29
    // LibItsSecurity
30
    import from LibItsSecurity_TypesAndValues all;
31
    import from LibItsSecurity_Pixits all;
32
    
garciay's avatar
garciay committed
33
34
35
    /**
     * @desc Constants declaration
     */
36
37
38
39
    group constants {
        
        /**
         * @desc Protocol version
garciay's avatar
garciay committed
40
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.1 Ieee1609Dot2Data
41
         */
garciay's avatar
garciay committed
42
        const UInt8 c_protocol_version := 3;
43
44
        
        /**
45
         * @desc Certificate version
garciay's avatar
garciay committed
46
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 6.1 Certificate
47
         */
garciay's avatar
garciay committed
48
        const UInt8 c_certificate_version := 3;
49
        
50
51
        /**
         * @desc Its AID for Other
garciay's avatar
garciay committed
52
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 7.3 Security profile for DENMs
53
         */
54
55
//FIXME RGY definition type is changed to modulepar, as Titan doesn't support dynamic constants
//        const IntX c_its_aid_Other := PX_OTHER_ITS_AID;
garciay's avatar
garciay committed
56
        template Psid c_its_aid_Other := PX_OTHER_ITS_AID;
garciay's avatar
garciay committed
57
58
        
        /**
59
         * @desc Minimal value of Longitude
garciay's avatar
garciay committed
60
         */
garciay's avatar
garciay committed
61
        const SecLongitude c_minLongitude := -1799999999; // TODO Use constant from IEEE1609dot2BaseTypes
62
        
63
        /**
64
         * @desc Maximal value of Longitude
65
         */
garciay's avatar
garciay committed
66
        const SecLongitude c_maxLongitude :=  1800000000; // TODO Use constant from IEEE1609dot2BaseTypes
67
68
        
        /**
69
         * @desc Minimal value of Latitude
70
         */
garciay's avatar
garciay committed
71
        const SecLatitude c_minLatitude  := -900000000;  // TODO Use constant from IEEE1609dot2BaseTypes
72
73
74
75
        
        /**
         * @desc Maximal value of Latitude
         */
garciay's avatar
garciay committed
76
        const SecLatitude c_maxLatitude  :=  900000000; // TODO Use constant from IEEE1609dot2BaseTypes
filatov's avatar
filatov committed
77
        
78
79
80
        /**
         * @desc List of ISO-3166 country codes
         */
garciay's avatar
garciay committed
81
        const SequenceOfUint16 c_iso3166Codes := {
filatov's avatar
filatov committed
82
83
84
85
86
87
88
89
90
91
92
93
94
95
            4,   8,  10,  12,  16,  20,  24,  28,  31,  32,  36,  40,  44,  48,  50,  51,  52,  56,
           60,  64,  68,  70,  72,  74,  76,  84,  86,  90,  92,  96, 100, 104, 108, 112, 116, 120,
          124, 132, 136, 140, 144, 148, 152, 156, 158, 162, 166, 170, 174, 175, 178, 180, 184, 188,
          191, 192, 196, 203, 204, 208, 212, 214, 218, 222, 226, 231, 232, 233, 234, 238, 239, 242,
          246, 248, 250, 254, 258, 260, 262, 266, 268, 270, 275, 276, 288, 292, 296, 300, 304, 308,
          312, 316, 320, 324, 328, 332, 334, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376,
          380, 384, 388, 392, 398, 400, 404, 408, 410, 414, 417, 418, 422, 426, 428, 430, 434, 438,
          440, 442, 446, 450, 454, 458, 462, 466, 470, 474, 478, 480, 484, 492, 496, 498, 499, 500,
          504, 508, 512, 516, 520, 524, 528, 531, 533, 534, 535, 540, 548, 554, 558, 562, 566, 570,
          574, 578, 580, 581, 583, 584, 585, 586, 591, 598, 600, 604, 608, 612, 616, 620, 624, 626,
          630, 634, 638, 642, 643, 646, 652, 654, 659, 660, 662, 663, 666, 670, 674, 678, 682, 686,
          688, 690, 694, 702, 703, 704, 705, 706, 710, 716, 724, 728, 729, 732, 740, 744, 748, 752,
          756, 760, 762, 764, 768, 772, 776, 780, 784, 788, 792, 795, 796, 798, 800, 804, 807, 810,
          818, 826, 831, 832, 833, 834, 840, 850, 854, 858, 860, 862, 876, 882, 887, 894 
filatov's avatar
filatov committed
96
97
        };
        
98
99
100
        /**
         * @desc List of United Nations Statistics Division country codes
         */
garciay's avatar
garciay committed
101
        const SequenceOfUint16 c_unStatsAdditionalCodes := {
filatov's avatar
filatov committed
102
103
104
            1,   2,   5,   9,  11,  13,  14,  15,  17,  18,  19,  21,  29,  30,  34,  35,  39,  53,
           54,  57,  61, 142, 143, 145, 150, 151, 154, 155, 199, 419, 432, 680, 722, 830
       };
filatov's avatar
filatov committed
105
        
106
    } // End of group constants
garciay's avatar
garciay committed
107
    
108
    /**
garciay's avatar
garciay committed
109
     * @desc Dummy send/receive templates for security headers
garciay's avatar
garciay committed
110
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 4   Basic format elements
111
     */
garciay's avatar
garciay committed
112
113
    group dummyBasicFormatElements {
        
114
115
        /**
         * @desc Dummy receive templates for security headers
garciay's avatar
garciay committed
116
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2    Specification of basic format elements
117
118
         */
        group dummyBasicFormatElementsRecv {
garciay's avatar
garciay committed
119
                        
120
121
122
123
            /**
             * @desc Dummy receive template for TwoDLocation
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
garciay's avatar
garciay committed
124
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.19    TwoDLocation
125
126
127
128
129
130
131
132
133
134
135
             */
            template (present) TwoDLocation mw_twoDLocation_dummy := {
                latitude    := ?,
                longitude   := ?
            } // End of template mw_twoDLocation_dummy
            
            /**
             * @desc Dummy send template for ThreeDLocation
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
             * @param p_elevation   Elevation relative to the WGS-84 ellipsoid in decimetres
garciay's avatar
garciay committed
136
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.20    ThreeDLocation
137
             */
garciay's avatar
garciay committed
138
            template (present) ThreeDLocation mw_threeDLocation_dummy := {
139
140
141
                latitude    := ?,
                longitude   := ?,
                elevation   := ?
garciay's avatar
garciay committed
142
            } // End of template mw_threeDLocation_dummy
143
144
145
146
147
148
149
            
        } // End of group dummyBasicFormatElementsRecv
        
    } // End of group dummyBasicFormatElements 
    
    /**
     * @desc Send/receive templates for security headers
garciay's avatar
garciay committed
150
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 4   Basic format elements
151
152
153
154
155
     */
    group basicFormatElements {
        
        /**
         * @desc Send templates for security headers
garciay's avatar
garciay committed
156
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2    Specification of basic format elements
157
158
159
         */
        group basicFormatElementsSend {
            
garciay's avatar
garciay committed
160
            /**
161
             * @desc Send templates for Signature description
garciay's avatar
garciay committed
162
163
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.9   Signature
             * @see Draft ETSI TS 103 097 V1.3.1 Table 2: Derivation of field sizes depending on the used algorithm
garciay's avatar
garciay committed
164
165
166
             */
            group signatures {
                
garciay's avatar
garciay committed
167
168
169
                /**
                 * @desc Send template for signatures based on ECDSA algorithm
                 * @member p_ecdsaSignature The ECDSA based signature
garciay's avatar
garciay committed
170
                 * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.9   Signature
garciay's avatar
garciay committed
171
                 */
garciay's avatar
garciay committed
172
                template (value) Signature m_signature(
garciay's avatar
garciay committed
173
                                                       in template (value) EcdsaP256Signature p_ecdsaSignature
garciay's avatar
garciay committed
174
                ):= {
garciay's avatar
garciay committed
175
                    ecdsaNistP256Signature := p_ecdsaSignature
garciay's avatar
garciay committed
176
177
                } // End of template m_signature_ecdsa
                
garciay's avatar
garciay committed
178
179
180
                /**
                 * @desc Send template for ECDSA based signature
                 * @member p_r          The coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
181
                 * @member p_s          The signature
garciay's avatar
garciay committed
182
                 * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.10   EcdsaP256Signature
garciay's avatar
garciay committed
183
                 */
garciay's avatar
garciay committed
184
                template (value) EcdsaP256Signature m_ecdsaSignature(
garciay's avatar
garciay committed
185
186
                                                                     in template (value) EccP256CurvePoint p_rSig,
                                                                     in template (value) octetstring p_sSig
187
                ) := {
garciay's avatar
garciay committed
188
189
                    rSig := p_rSig,
                    sSig := p_sSig
garciay's avatar
garciay committed
190
191
                } // End of template m_ecdsaSignature
                
garciay's avatar
garciay committed
192
193
194
195
196
197
198
            } // End of group signatures 
            
            group signerInfos {
                
                /**
                 * @desc Send template for self signed message
                 */
garciay's avatar
garciay committed
199
200
201
                template (value) SignerIdentifier m_signerIdentifier_self := {
                    self_ := NULL
                } // End of template m_signerIdentifier_self
garciay's avatar
garciay committed
202
                
garciay's avatar
garciay committed
203
204
205
                /**
                 * @desc Send template for certificate signed message
                 */
garciay's avatar
garciay committed
206
                template (value) SignerIdentifier m_signerIdentifier_certificate(
garciay's avatar
garciay committed
207
                                                                                 in template (value) Certificate p_certificate // TODO Use SingleEtsiTs103097Certificate
garciay's avatar
garciay committed
208
                ) := {
garciay's avatar
garciay committed
209
210
                    certificate := { p_certificate } // Only one
                } // End of template m_signerIdentifier_certificate
garciay's avatar
garciay committed
211
                
garciay's avatar
garciay committed
212
213
214
215
                /**
                 * @desc Send template for digest signed message
                 */
                template (value) SignerIdentifier m_signerIdentifier_digest(
garciay's avatar
garciay committed
216
                                                                            in template (value) HashedId8 p_digest := '0000000000000000'O
garciay's avatar
garciay committed
217
218
219
220
                ) := {
                    digest := p_digest
                } // End of template m_signerIdentifier_digest
                
garciay's avatar
garciay committed
221
                /**
garciay's avatar
garciay committed
222
                 * @desc Send template for certificate signed message
garciay's avatar
garciay committed
223
                 */
garciay's avatar
garciay committed
224
                template (value) SignerIdentifier m_signerIdentifier_certificates(
garciay's avatar
garciay committed
225
                                                                                  in template (value) SequenceOfCertificate p_certificates := {}
garciay's avatar
garciay committed
226
                ) := {
garciay's avatar
garciay committed
227
228
                    certificate := p_certificates
                } // End of template m_signerIdentifier_certificates
garciay's avatar
garciay committed
229
                
garciay's avatar
garciay committed
230
            } // End of group signerInfos
garciay's avatar
garciay committed
231
            
garciay's avatar
garciay committed
232
233
234
235
            /**
             * @desc Send template for TwoDLocation
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
garciay's avatar
garciay committed
236
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.19    TwoDLocation
garciay's avatar
garciay committed
237
238
             */
            template (value) TwoDLocation m_twoDLocation(
garciay's avatar
garciay committed
239
240
                                                         in template (value) SecLatitude p_latitude,
                                                         in template (value) SecLongitude p_longitude
garciay's avatar
garciay committed
241
242
243
244
245
246
247
248
249
250
            ) := {
                latitude    := p_latitude,
                longitude   := p_longitude
            } // End of template m_twoDLocation
            
            /**
             * @desc Send template for ThreeDLocation
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
             * @param p_elevation   Elevation relative to the WGS-84 ellipsoid in decimetres
garciay's avatar
garciay committed
251
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.20    ThreeDLocation
garciay's avatar
garciay committed
252
253
             */
            template (value) ThreeDLocation m_threeDLocation(
garciay's avatar
garciay committed
254
255
256
                                                             in template (value) SecLatitude p_latitude,
                                                             in template (value) SecLongitude p_longitude,
                                                             in template (value) SecElevation p_elevation
garciay's avatar
garciay committed
257
258
259
260
261
262
            ) := {
                latitude    := p_latitude,
                longitude   := p_longitude,
                elevation := p_elevation
            } // End of template m_threeDLocation
            
garciay's avatar
garciay committed
263
264
265
266
            /**
             * @desc Send template circular geographic region
             * @param p_center  Circle center 
             * @param p_radius  Circle radius
garciay's avatar
garciay committed
267
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
garciay's avatar
garciay committed
268
269
270
271
             */
            template (value) GeographicRegion m_geographicRegion_circle(
                                                                        in template (value) TwoDLocation p_center,
                                                                        in template (value) UInt16 p_radius
garciay's avatar
garciay committed
272
            ) := {
garciay's avatar
garciay committed
273
274
275
276
                circularRegion := {
                    center := p_center,
                    radius := p_radius
                }
garciay's avatar
garciay committed
277
278
279
            } // End of template m_geographicRegion_circle
            
            /**
280
             * @desc Send template rectangular geographic region
garciay's avatar
garciay committed
281
282
             * @param p_northwest  Upper left corner 
             * @param p_southeast  Lower rigth corner
garciay's avatar
garciay committed
283
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
garciay's avatar
garciay committed
284
             */
285
286
287
            template (value) GeographicRegion m_geographicRegion_rectangular(
                                                                             in template (value) TwoDLocation p_northwest,
                                                                             in template (value) TwoDLocation p_southeast
garciay's avatar
garciay committed
288
            ) := {
garciay's avatar
garciay committed
289
290
291
292
293
294
                rectangularRegion := {
                    {
                        northWest := p_northwest,
                        southEast := p_southeast 
                    }
                }
295
            } // End of template m_geographicRegion_rectangular
garciay's avatar
garciay committed
296
297
298
299
            
            /**
             * @desc Send template polygonial geographic region
             * @param p_polygonal_region  Polygonial region description
garciay's avatar
garciay committed
300
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
garciay's avatar
garciay committed
301
302
303
             */
            template (value) GeographicRegion m_geographicRegion_polygonial(
                                                                            in template (value) PolygonalRegion p_polygonal_region
garciay's avatar
garciay committed
304
            ) := {
garciay's avatar
garciay committed
305
                polygonalRegion := p_polygonal_region
garciay's avatar
garciay committed
306
307
            } // End of template m_geographicRegion_polygonial
            
308
309
            /**
             * @desc Send template for geographic identified region
garciay's avatar
garciay committed
310
311
             * @param p_identifiedRegion  Indentified region
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
312
             */
garciay's avatar
garciay committed
313
            template (value) GeographicRegion m_geographicRegion_identifiedRegion(
garciay's avatar
garciay committed
314
                                                                                  in template (value) SequenceOfIdentifiedRegion p_identifiedRegions
garciay's avatar
garciay committed
315
            ) := {
garciay's avatar
garciay committed
316
                identifiedRegion := p_identifiedRegions
garciay's avatar
garciay committed
317
318
            } // End of template m_geographicRegion_identifiedRegion
            
garciay's avatar
garciay committed
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
            template (value) IdentifiedRegion m_identifiedRegion_country_only(
                                                                              in template (value) CountryOnly p_countryOnly
            ) := {
                countryOnly := p_countryOnly
            } // End of template m_identifiedRegion_country_only
            
            template (value) IdentifiedRegion m_identifiedRegion_country_and_region(
                                                                                    in template (value) CountryOnly p_countryOnly,
                                                                                    in template (value) SequenceOfUint8 p_regions       
            ) := {
                countryAndRegions := {
                    countryOnly := p_countryOnly,
                    regions     := p_regions
                }
            } // End of template m_identifiedRegion_country_and_region
garciay's avatar
garciay committed
334
            
335
        } // End of group basicFormatElementsSend 
garciay's avatar
garciay committed
336
337
        
        /**
338
         * @desc Receive templates for security headers
garciay's avatar
garciay committed
339
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2    Specification of basic format elements
garciay's avatar
garciay committed
340
         */
341
        group basicFormatElementsRecv {
garciay's avatar
garciay committed
342
            
garciay's avatar
garciay committed
343
            group signerIdentifiers {
filatov's avatar
filatov committed
344
345
346
347
                
                /**
                 * @desc Recv template for message signed with digest 
                 */
garciay's avatar
garciay committed
348
349
                template (present) SignerIdentifier mw_signerIdentifier_digest(
                                                                               in template (present) HashedId8 p_digest  := ?
filatov's avatar
filatov committed
350
                ) := {
garciay's avatar
garciay committed
351
352
                    digest := p_digest
                } // End of template mw_signerIdentifier_digest
filatov's avatar
filatov committed
353
                
garciay's avatar
garciay committed
354
                template (present) SignerIdentifier mw_signerIdentifier_certificate(
355
                                                                                    in template (present) EtsiTs103097Certificate p_certificate  := ?
filatov's avatar
filatov committed
356
                ) := {
garciay's avatar
garciay committed
357
358
                    certificate := { p_certificate }
                } // End of template m_signerIdentifier_certificate
filatov's avatar
filatov committed
359
                
garciay's avatar
garciay committed
360
361
                template (present) SignerIdentifier mw_signerIdentifier_certificates(
                                                                                     in template (present) SequenceOfCertificate p_certificates := ?
filatov's avatar
filatov committed
362
                ) := {
garciay's avatar
garciay committed
363
364
                    certificate := p_certificates
                } // End of template mw_signerIdentifier_certificates
filatov's avatar
filatov committed
365
                
garciay's avatar
garciay committed
366
            } // End of group signerIdentifiers
filatov's avatar
filatov committed
367
            
368
369
            /**
             * @desc Receive templates for Signature description
garciay's avatar
garciay committed
370
371
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.9   Signature
             * @see Draft ETSI TS 103 097 V1.3.1 Table 2: Derivation of field sizes depending on the used algorithm
372
373
374
375
376
377
             */
            group signatures {
                
                /**
                 * @desc Receive template for signatures based on ECDSA algorithm
                 * @member p_ecdsaSignature The ECDSA based signature
garciay's avatar
garciay committed
378
                 * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.9   Signature
379
380
                 */
                template (present) Signature mw_signature(
garciay's avatar
garciay committed
381
                                                          in template (present) EcdsaP256Signature p_ecdsaSignature := ?
382
                ):= {
garciay's avatar
garciay committed
383
                    ecdsaNistP256Signature := p_ecdsaSignature
384
385
386
387
388
389
                } // End of template mw_signature
                
                /**
                 * @desc Receive template for ECDSA based signature
                 * @member p_r          The coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
                 * @member p_s          The signature
garciay's avatar
garciay committed
390
                 * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.10   EcdsaP256Signature
391
                 */
garciay's avatar
garciay committed
392
393
394
                template (present) EcdsaP256Signature mw_ecdsaSignature(
                                                                        in template (present) EccP256CurvePoint p_rSig := ?,
                                                                        in template (present) octetstring p_sSig := ?
395
                ) := {
garciay's avatar
garciay committed
396
397
                    rSig := p_rSig,
                    sSig := p_sSig
398
399
400
401
                } // End of template mw_ecdsaSignature
                
            } // End of group signatures 
            
garciay's avatar
garciay committed
402
            /**
403
             * @desc Receive template for TwoDLocation
garciay's avatar
garciay committed
404
405
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
garciay's avatar
garciay committed
406
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.19    TwoDLocation
garciay's avatar
garciay committed
407
408
             */
            template (present) TwoDLocation mw_twoDLocation(
garciay's avatar
garciay committed
409
410
                                                            in template (present) SecLatitude p_latitude,
                                                            in template (present) SecLongitude p_longitude
garciay's avatar
garciay committed
411
412
413
414
415
416
417
418
419
420
            ) := {
                latitude    := p_latitude,
                longitude   := p_longitude
            } // End of template mw_twoDLocation
            
            /**
             * @desc Receive template for ThreeDLocation
             * @param p_latitude    Latitude range from  900 000 000 to +900 000 000
             * @param p_longitude   Longitude range from  1 800 000 000 to +1 800 000 000
             * @param p_elevation   Elevation relative to the WGS-84 ellipsoid in decimetres
garciay's avatar
garciay committed
421
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.20    ThreeDLocation
garciay's avatar
garciay committed
422
423
             */
            template (present) ThreeDLocation mw_threeDLocation(
garciay's avatar
garciay committed
424
425
426
                                                                in template (present) SecLatitude p_latitude,
                                                                in template (present) SecLongitude p_longitude,
                                                                in template (present) SecElevation p_elevation
garciay's avatar
garciay committed
427
428
429
430
431
432
            ) := {
                latitude    := p_latitude,
                longitude   := p_longitude,
                elevation   := p_elevation
            } // End of template mw_threeDLocation
            
garciay's avatar
garciay committed
433
434
435
436
            /**
             * @desc Receive template circular geographic region
             * @param p_center  Circle center 
             * @param p_radius  Circle radius
garciay's avatar
garciay committed
437
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
garciay's avatar
garciay committed
438
439
             */
            template (present) GeographicRegion mw_geographicRegion_circle(
440
441
                                                                           in template (present) TwoDLocation p_center := ?,
                                                                           in template (present) UInt16 p_radius := ?
garciay's avatar
garciay committed
442
            ) := {
garciay's avatar
garciay committed
443
444
445
446
                circularRegion := {
                    center := p_center,
                    radius := p_radius
                }
garciay's avatar
garciay committed
447
448
            } // End of template mw_geographicRegion_circle
            
449
450
451
452
            /**
             * @desc Basic receive template rectangular geographic region
             * @param p_northwest  Upper left corner 
             * @param p_southeast  Lower rigth corner
garciay's avatar
garciay committed
453
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
454
             */
455
456
            template (present) GeographicRegion mw_geographicRegion_rectangular := {
                rectangularRegion := ?
457
            } // End of template mw_geographicRegion_rectangular
458
            
garciay's avatar
garciay committed
459
460
461
            /**
             * @desc Receive template polygonial geographic region
             * @param p_polygonal_region  Polygonial region description
garciay's avatar
garciay committed
462
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
garciay's avatar
garciay committed
463
             */
filatov's avatar
filatov committed
464
465
            template (present) GeographicRegion mw_geographicRegion_polygonal(
                                                                              in template (present) PolygonalRegion p_polygonal_region := ?
garciay's avatar
garciay committed
466
            ) := {
garciay's avatar
garciay committed
467
                polygonalRegion := p_polygonal_region
garciay's avatar
garciay committed
468
469
            } // End of template mw_geographicRegion_polygonial
            
470
471
            /**
             * @desc Receive template for geographic identified region
garciay's avatar
garciay committed
472
473
             * @param p_identifiedRegion  Indentified region
             * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.21  GeographicRegion
474
             */
filatov's avatar
filatov committed
475
            template (present) GeographicRegion mw_geographicRegion_identified(
garciay's avatar
garciay committed
476
                                                                               in template (present) SequenceOfIdentifiedRegion p_identifiedRegion := ?
garciay's avatar
garciay committed
477
            ) := {
garciay's avatar
garciay committed
478
                identifiedRegion := p_identifiedRegion
garciay's avatar
garciay committed
479
480
            } // End of template mw_geographicRegion_identifiedRegion
            
garciay's avatar
garciay committed
481
            template (present) IdentifiedRegion mw_identifiedRegion_country_only
filatov's avatar
filatov committed
482
            := {
garciay's avatar
garciay committed
483
                countryOnly := ?// FIXME ((all from c_iso3166Codes), (all from c_unStatsAdditionalCodes))
filatov's avatar
filatov committed
484
            }
garciay's avatar
garciay committed
485
            
garciay's avatar
garciay committed
486
487
488
489
490
            template (present) IdentifiedRegion mw_identifiedRegion_country_and_region := {
                countryAndRegions := {
                    countryOnly := ?, // FIXME ((all from c_iso3166Codes), (all from c_unStatsAdditionalCodes)),
                    regions     := ?
                }
filatov's avatar
filatov committed
491
492
            }
            
493
        } // End of group basicFormatElementsRecv
garciay's avatar
garciay committed
494
        
garciay's avatar
garciay committed
495
496
    } // End of group dummyBasicFormatElements 
    
497
    /**
garciay's avatar
garciay committed
498
499
     * @desc Send templates for security headers
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.1 EtsiTs103097Data
500
     */
garciay's avatar
garciay committed
501
    group etsiTs103097Data {
garciay's avatar
garciay committed
502
        
503
        /**
garciay's avatar
garciay committed
504
         * @desc Generic send template for EtsiTs103097Data message
505
         */
garciay's avatar
garciay committed
506
507
508
        template (value) EtsiTs103097Data m_etsiTs103097Data(
                                                             in template (value) Ieee1609Dot2Content p_content
        ) := {
509
510
            protocolVersion := c_protocol_version,
            content         := p_content
garciay's avatar
garciay committed
511
512
        } // End of template m_etsiTs103097Data
        
513
514
515
516
517
518
519
520
521
522
        /**
         * @desc Generic receive template for EtsiTs103097Data message
         */
        template (present) EtsiTs103097Data mw_etsiTs103097Data(
                                                                template (present) Ieee1609Dot2Content p_content := ?
        ) := {
            protocolVersion := c_protocol_version,
            content         := p_content
        } // End of template mw_etsiTs103097Data
        
garciay's avatar
garciay committed
523
524
525
        template (value) EtsiTs103097Data m_etsiTs103097Data_unsecured(
                                                                       in template (value) Opaque p_unsecuredData
        ) := {
526
            protocolVersion := c_protocol_version,
garciay's avatar
garciay committed
527
528
529
530
531
532
            content         := { unsecuredData := p_unsecuredData }
        } // End of template m_secured_data_unsecured
        
        template (value) EtsiTs103097Data m_etsiTs103097Data_signed(
                                                                    in template (value) SignedData p_signedData
        ) := {
533
            protocolVersion := c_protocol_version,
garciay's avatar
garciay committed
534
535
            content         := { signedData := p_signedData }
        } // End of template m_secured_data_signed
536
        
garciay's avatar
garciay committed
537
538
539
540
541
542
543
        template (present) EtsiTs103097Data mw_etsiTs103097Data_signed(
                                                                       template (present) SignedData p_signedData := ?
        ) := {
            protocolVersion := c_protocol_version,
            content         := { signedData := p_signedData }
        } // End of template mw_secured_data_signed
        
544
545
546
547
548
549
550
551
552
553
554
        template (value) EtsiTs103097Data m_etsiTs103097Data_encrypted(
                                                                       in template (value) EncryptedData p_encryptedData
        ) := {
            protocolVersion := c_protocol_version,
            content         := { encryptedData := p_encryptedData }
        } // End of template m_etsiTs103097Data_encrypted
        
        template (present) EtsiTs103097Data mw_etsiTs103097Data_encrypted(
                                                                          template (present) EncryptedData p_encryptedData := ?
        ) := {
            protocolVersion := c_protocol_version,
555
            content         := { encryptedData := p_encryptedData }
556
557
        } // End of template mw_etsiTs103097Data_encrypted
        
garciay's avatar
garciay committed
558
559
560
561
562
563
564
        /**
         * @desc Generic send template for EtsiTs103097Data message
         */
        template (value) EtsiTs103097Data m_etsiTs103097Data_wrong_protocol(
                                                                            in template (value) UInt8 p_protocol_version,
                                                                            in template (value) Ieee1609Dot2Content p_content
        ) := {
565
566
            protocolVersion := c_protocol_version,
            content         := p_content
garciay's avatar
garciay committed
567
        } // End of template m_etsiTs103097Data_wrong_protocol
568
        
garciay's avatar
garciay committed
569
    } // End of group etsiTs103097Data
570
571
    
    /**
garciay's avatar
garciay committed
572
573
     * @desc Send templates for ToBeSignedData header
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 SignedData
574
     */
garciay's avatar
garciay committed
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
    group signedData {
    
        template (value) SignedData m_signedData(
                                                 in template (value) HashAlgorithm p_hashId,
                                                 in template (value) ToBeSignedData p_tbsData,
                                                 in template (value) SignerIdentifier p_signer,
                                                 in template (value) Signature p_signature_      
        ) := {
            hashId     := p_hashId,
            tbsData    := p_tbsData,
            signer     := p_signer,
            signature_ := p_signature_
        } // End of template m_signedData
        
        template (present) SignedData mw_signedData(
                                                    template (present) HashAlgorithm p_hashId := ?,
                                                    template (present) ToBeSignedData p_tbsData := ?,
                                                    template (present) SignerIdentifier p_signer := ?,
                                                    template (present) Signature p_signature_ := ?     
        ) := {
            hashId     := p_hashId,
            tbsData    := p_tbsData,
            signer     := p_signer,
            signature_ := p_signature_
        } // End of template mw_signedData
        
        template (value) ToBeSignedData m_toBeSignedData(
                                                         in template (value) SignedDataPayload p_payload,
                                                         in template (value) HeaderInfo p_headerInfo      
        ) := {
            payload    := p_payload,
            headerInfo := p_headerInfo
        } // End of template m_toBeSignedData
        
        template (present) ToBeSignedData mw_toBeSignedData(
                                                            template (present) SignedDataPayload p_payload := ?,
                                                            template (present) HeaderInfo p_headerInfo := ?   
        ) := {
            payload    := p_payload,
            headerInfo := p_headerInfo
        } // End of template mw_toBeSignedData
        
        template (value) SignedDataPayload m_signedDataPayload(
                                                               in template (value) Ieee1609Dot2Data p_data
        ) := {
            data        := p_data,
            extDataHash := omit
        } // End of template m_signedDataPayload
    
garciay's avatar
garciay committed
624
625
626
627
628
629
630
        template (present) SignedDataPayload mw_signedDataPayload(
                                                                  template (present) Ieee1609Dot2Data p_data := ?
        ) := {
            data        := p_data,
            extDataHash := *
        } // End of template mw_signedDataPayload
    
garciay's avatar
garciay committed
631
632
633
        template (value) SignedDataPayload m_signedDataPayload_ext(
                                                                   in template (value) Oct32 p_extDataHash
        ) := {
634
            data        := omit,
garciay's avatar
garciay committed
635
636
            extDataHash := { sha256HashedData := p_extDataHash }
        } // End of template m_signedDataPayload_ext
637
        
garciay's avatar
garciay committed
638
639
    } // End of group signedData
    
640
641
642
643
    /**
     * @desc Send templates for ToBeSignedData header
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.3 EncryptedData
     */
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
    group encryptedData {
        
        template (value) EncryptedData m_encryptedData(
                                                       in template (value) SequenceOfRecipientInfo p_recipients,
                                                       in template (value) SymmetricCiphertext p_ciphertex
        ) := {
            recipients := p_recipients,
            ciphertext := p_ciphertex
        } // End of template m_encryptedData
        
        template (present) EncryptedData mw_encryptedData(
                                                          template (present) SequenceOfRecipientInfo p_recipients := ?,
                                                          template (present) SymmetricCiphertext p_ciphertex := ?
        ) := {
            recipients := p_recipients,
            ciphertext := p_ciphertex
        } // End of template mw_encryptedData
        
662
663
664
665
666
667
        template (value) RecipientInfo m_recipientInfo_pskRecipInfo(
                                                                    in template (value) PreSharedKeyRecipientInfo p_pskRecipInfo
        ) := {
            pskRecipInfo := p_pskRecipInfo
        } // End of template m_recipientInfo_pskRecipInfo
        
668
669
670
671
672
673
        template (present) RecipientInfo mw_recipientInfo_pskRecipInfo(
                                                                       template (present) PreSharedKeyRecipientInfo p_pskRecipInfo := ?
        ) := {
            pskRecipInfo := p_pskRecipInfo
        } // End of template mw_recipientInfo_pskRecipInfo
        
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
        template (value) RecipientInfo m_recipientInfo_symmRecipInfo(
                                                                     in template (value) SymmRecipientInfo p_symmRecipInfo
        ) := {
            symmRecipInfo := p_symmRecipInfo
        } // End of template m_recipientInfo_symmRecipInfo
        
        template (value) RecipientInfo m_recipientInfo_certRecipInfo(
                                                                     in template (value) PKRecipientInfo p_certRecipInfo
        ) := {
            certRecipInfo := p_certRecipInfo
        } // End of template m_recipientInfo_certRecipInfo
        
        template (present) RecipientInfo mw_recipientInfo_certRecipInfo(
                                                                        template (present) PKRecipientInfo p_certRecipInfo := ?
        ) := {
            certRecipInfo := p_certRecipInfo
        } // End of template mw_recipientInfo_certRecipInfo
        
        template (value) RecipientInfo m_recipientInfo_signedDataRecipInfo(
                                                                           in template (value) PKRecipientInfo p_signedDataRecipInfo
        ) := {
            signedDataRecipInfo := p_signedDataRecipInfo
        } // End of template m_recipientInfo_signedDataRecipInfo
        
        template (value) RecipientInfo m_recipientInfo_rekRecipInfo(
                                                                    in template (value) PKRecipientInfo p_rekRecipInfo
        ) := {
            rekRecipInfo := p_rekRecipInfo
        } // End of template m_recipientInfo_rekRecipInfo
                
        template (value) PKRecipientInfo m_pKRecipientInfo(
                                                           in template (value) HashedId8 p_recipientId,
                                                           in template (value) EncryptedDataEncryptionKey p_encKey
        ) := { 
            recipientId := p_recipientId, 
            encKey      := p_encKey
        } // End of template m_pKRecipientInfo
        
        template (present) PKRecipientInfo mw_pKRecipientInfo(
                                                              template (present) HashedId8 p_recipientId := ?, 
                                                              template (present) EncryptedDataEncryptionKey p_encKey := ?
        ) := { 
            recipientId := p_recipientId, 
            encKey      := p_encKey
        } // End of template mw_pKRecipientInfo
        
        template (value) EciesP256EncryptedKey m_evciesP256EncryptedKey(
                                                                        in template (value) EccP256CurvePoint p_v,
                                                                        in template (value) Oct16 p_c,
                                                                        in template (value) Oct16 p_t
        ) :={
            v := p_v,
            c := p_c,
            t := p_t
        } // End of template m_evciesP256EncryptedKey
        
        template (present) EciesP256EncryptedKey mw_evciesP256EncryptedKey(
                                                                           template (present) EccP256CurvePoint p_v := ?,
                                                                           template (present) Oct16 p_c := ?,
                                                                           template (present) Oct16 p_t := ?
        ) :={
            v := p_v,
            c := p_c,
            t := p_t
        } // End of template mw_evciesP256EncryptedKey
        
        template (value) EncryptedDataEncryptionKey m_encryptedDataEncryptionKey_eciesNistP256(
                                                                                               in template (value) EciesP256EncryptedKey p_eciesNistP256
        ) := { 
            eciesNistP256 := p_eciesNistP256
        } // End of template m_encryptedDataEncryptionKey_eciesNistP256
        
        template (present) EncryptedDataEncryptionKey mw_encryptedDataEncryptionKey_eciesNistP256(
                                                                                                  template (present) EciesP256EncryptedKey p_eciesNistP256 := ?
        ) := { 
            eciesNistP256 := p_eciesNistP256
        } // End of template mw_encryptedDataEncryptionKey_eciesNistP256
        
        template (value) EncryptedDataEncryptionKey m_encryptedDataEncryptionKey_eciesBrainpoolP256r1(
                                                                                                      in template (value) EciesP256EncryptedKey p_eciesBrainpoolP256r1
        ) := { 
            eciesBrainpoolP256r1 := p_eciesBrainpoolP256r1
        } // End of template m_encryptedDataEncryptionKey_eciesBrainpoolP256r1
        
        template (present) EncryptedDataEncryptionKey mw_encryptedDataEncryptionKey_eciesBrainpoolP256r1(
                                                                                                         template (present) EciesP256EncryptedKey p_eciesBrainpoolP256r1 := ?
        ) := { 
            eciesBrainpoolP256r1 := p_eciesBrainpoolP256r1
        } // End of template mw_encryptedDataEncryptionKey_eciesBrainpoolP256r1
        
        template (value) SymmetricCiphertext m_SymmetricCiphertext_aes128ccm(
                                                                             in template (value) AesCcmCiphertext p_aes128ccm
        ) := {
            aes128ccm := p_aes128ccm
        } // End of template m_SymmetricCiphertext_aes128ccm
        
        template (present) SymmetricCiphertext mw_SymmetricCiphertext_aes128ccm(
                                                                                template (present) AesCcmCiphertext p_aes128ccm := ?
        ) := {
            aes128ccm := p_aes128ccm
        } // End of template mw_SymmetricCiphertext_aes128ccm

        template (value) AesCcmCiphertext m_aesCcmCiphertext(
                                                             in template (value) Oct12 p_nonce,
                                                             in template (value) Opaque p_ccmCiphertext
        ) := {
            nonce         := p_nonce,
            ccmCiphertext := p_ccmCiphertext
        } // End of template m_aesCcmCiphertext
        
        template (present) AesCcmCiphertext mw_aesCcmCiphertext(
                                                                template (present) Oct12 p_nonce := ?,
                                                                template (present) Opaque p_ccmCiphertext := ?
        ) := {
            nonce         := p_nonce,
            ccmCiphertext := p_ccmCiphertext
        } // End of template mw_aesCcmCiphertext
        
792
793
    } // End of group encryptedData
    
garciay's avatar
garciay committed
794
795
796
797
798
799
    /**
     * @desc Send/Receive templates for Payload
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
     */
    group ieee1609Dot2Data {
            
800
        /**
garciay's avatar
garciay committed
801
802
         * @desc Send template for Ieee1609Dot2Data 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
803
         */
garciay's avatar
garciay committed
804
805
806
807
808
        template (value) Ieee1609Dot2Data m_ieee1609Dot2Data(
                                                             in template (value) Ieee1609Dot2Content p_content
        ) := { 
            content := p_content
        } // End of template m_ieee1609Dot2Data
garciay's avatar
garciay committed
809
            
garciay's avatar
garciay committed
810
811
812
813
814
        /**
         * @desc Receive template for Ieee1609Dot2Data 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
         */
        template (present) Ieee1609Dot2Data mw_ieee1609Dot2Data(
garciay's avatar
garciay committed
815
                                                                template (present) Ieee1609Dot2Content p_content := ?
garciay's avatar
garciay committed
816
817
818
        ) := { 
            content := p_content
        } // End of template mw_ieee1609Dot2Data
819
820
        
        /**
garciay's avatar
garciay committed
821
822
         * @desc Send template for 'unsecured' Payload 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
823
         */
garciay's avatar
garciay committed
824
825
826
827
828
        template (value) Ieee1609Dot2Content m_ieee1609Dot2Data_unsecured(
                                                                          in template (value) Opaque p_unsecuredData
        ) := {
            unsecuredData := p_unsecuredData 
        } // End of template m_ieee1609Dot2Data_unsecured
829
        
830
831
832
833
834
835
836
837
838
839
        /**
         * @desc Receive template for 'unsecured' Payload 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
         */
        template (present) Ieee1609Dot2Content mw_ieee1609Dot2Data_unsecured(
                                                                             template (present) Opaque p_unsecuredData := ?
        ) := {
            unsecuredData := p_unsecuredData 
        } // End of template mw_ieee1609Dot2Data_unsecured
        
840
        /**
garciay's avatar
garciay committed
841
842
         * @desc Send template for 'signed' Payload 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
843
         */
garciay's avatar
garciay committed
844
845
846
847
848
849
        template (value) Ieee1609Dot2Content m_ieee1609Dot2Data_signed(
                                                                       in template (value) SignedData p_signedData
        ) := {
            signedData := p_signedData
        } // End of template m_ieee1609Dot2Data_signed
        
850
851
852
853
854
855
856
857
858
859
        /**
         * @desc Send template for 'signed' Payload 
         * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.2 Payload
         */
        template (present) Ieee1609Dot2Content mw_ieee1609Dot2Data_signed(
                                                                          template (present) SignedData p_signedData := ?
        ) := {
            signedData := p_signedData
        } // End of template mw_ieee1609Dot2Data_signed
        
garciay's avatar
garciay committed
860
861
862
863
864
865
866
867
    } // End of group ieee1609Dot2Data
    
    /**
     * @desc Send/Receive templates for HeaderInfo
     * @see Draft ETSI TS 103 097 V1.3.1 Clause 5.4 HeaderInfo
     */
    group headerFields {
        
garciay's avatar
garciay committed
868
869
870
        /**
         * @desc Basic send HeaderInfo template with ETSI ITS restrction
         */
garciay's avatar
garciay committed
871
872
873
874
875
876
877
878
879
880
881
882
883
        template (omit) HeaderInfo m_ieee1609Dot2_headerInfo(
                                                             in template (value) Psid p_psid
        ) := { 
            psid                 := p_psid,
            generationTime       := omit,
            expiryTime           := omit,
            generationLocation   := omit,
            p2pcdLearningRequest := omit,
            missingCrlIdentifier := omit,
            encryptionKey        := omit,
            inlineP2pcdRequest   := omit,
            requestedCertificate := omit
        } // End of template m_ieee1609Dot2_headerInfo
884
        
885
        /**
garciay's avatar
garciay committed
886
887
888
889
890
891
892
893
894
895
896
897
         * @desc Basic receive HeaderInfo template with ETSI ITS restrction
         */
        template (present) HeaderInfo mw_ieee1609Dot2_headerInfo(
                                                                 template (present) Psid p_psid := ?
        ) := { 
            psid                 := p_psid,
            generationTime       := *,
            expiryTime           := *,
            generationLocation   := *,
            p2pcdLearningRequest := omit,
            missingCrlIdentifier := omit,
            encryptionKey        := omit,
garciay's avatar
garciay committed
898
            inlineP2pcdRequest   := omit,
garciay's avatar
garciay committed
899
            requestedCertificate := omit
garciay's avatar
garciay committed
900
901
        } // End of template mw_ieee1609Dot2_headerInfo
        
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
        /**
         * @desc Basic receive HeaderInfo template with ETSI ITS restrction
         */
        template (present) HeaderInfo mw_ieee1609Dot2_headerInfo_request_certificate(
                                                                                     template (present) Psid p_psid := ?,
                                                                                     template (present) Certificate p_requestedCertificate := ?
        ) modifies mw_ieee1609Dot2_headerInfo := { 
            psid                 := p_psid,
            generationTime       := *,
            expiryTime           := *,
            generationLocation   := *,
            p2pcdLearningRequest := omit,
            missingCrlIdentifier := omit,
            encryptionKey        := omit,
            inlineP2pcdRequest   := omit,
            requestedCertificate := p_requestedCertificate
        } // End of template mw_ieee1609Dot2_headerInfo
        
garciay's avatar
garciay committed
920
921
        /**
         * @desc CAM specific send HeaderInfo template with ETSI ITS restrction
garciay's avatar
garciay committed
922
         * 
garciay's avatar
garciay committed
923
         * @see Clause 7.1.1 Security profile for CAMs
924
         */
garciay's avatar
garciay committed
925
        template (omit) HeaderInfo m_headerInfo_cam(
garciay's avatar
garciay committed
926
                                                    in template (value) Psid p_psid := c_its_aid_CAM,
garciay's avatar
garciay committed
927
                                                    in template (value) Time64 p_generationTime,
garciay's avatar
garciay committed
928
929
                                                    in template (omit) Time64 p_expiryTime := omit,
                                                    in template (omit) SequenceOfHashedId3 p_inlineP2pcdRequest := omit
garciay's avatar
garciay committed
930
931
932
        ) modifies m_ieee1609Dot2_headerInfo := {
            generationTime     := p_generationTime,
            expiryTime         := p_expiryTime,
garciay's avatar
garciay committed
933
934
            generationLocation := omit,
            inlineP2pcdRequest := p_inlineP2pcdRequest
garciay's avatar
garciay committed
935
        } // End of template m_headerInfo_cam
936
        
garciay's avatar
garciay committed
937
938
939
940
941
942
943
        /**
         * @desc CAM specific receive HeaderInfo template with ETSI ITS restrction
         * 
         * Clause 7.1.1 Security profile for CAMs
         */
        template (present) HeaderInfo mw_headerInfo_cam(
                                                        template (present) Psid p_psid := c_its_aid_CAM,
garciay's avatar
garciay committed
944
                                                        template (present) Time64 p_generationTime := ?,
garciay's avatar
garciay committed
945
946
                                                        template SequenceOfHashedId3 p_inlineP2pcdRequest := omit,
                                                        template Certificate p_requestedCertificate := omit
garciay's avatar
garciay committed
947
        ) modifies mw_ieee1609Dot2_headerInfo := {
garciay's avatar
garciay committed
948
949
            psid                    := c_its_aid_CAM,
            generationTime          := p_generationTime,
950
            expiryTime              := omit,
garciay's avatar
garciay committed
951
952
953
            generationLocation      := omit,
            inlineP2pcdRequest      := p_inlineP2pcdRequest,
            requestedCertificate    := p_requestedCertificate
garciay's avatar
garciay committed
954
955
        } // End of template mw_headerInfo_cam
        
956
        /**
garciay's avatar
garciay committed
957
958
         * 
         * Clause 7.1.2 Security profile for DENMs
959
         */
garciay's avatar
garciay committed
960
        template (omit) HeaderInfo m_headerInfo_denm(
garciay's avatar
garciay committed
961
                                                     in template (value) Psid p_psid := c_its_aid_DENM,
garciay's avatar
garciay committed
962
                                                     in template (value) Time64 p_generationTime,
garciay's avatar
garciay committed
963
964
                                                     in template (value) ThreeDLocation p_generationLocation,
                                                     in template (omit) Time64 p_expiryTime := omit
965
        ) modifies m_ieee1609Dot2_headerInfo := {
garciay's avatar
garciay committed
966
967
968
969
            generationTime     := p_generationTime,
            expiryTime         := p_expiryTime,
            generationLocation := p_generationLocation
        } // End of template m_headerInfo_denm
970
        
garciay's avatar
garciay committed
971
972
973
974
975
976
977
978
979
        /**
         * 
         * Clause 7.1.2 Security profile for DENMs
         */
        template (present) HeaderInfo mw_headerInfo_denm(
                                                         template (present) Psid p_psid := c_its_aid_DENM,
                                                         template (present) Time64 p_generationTime := ?,
                                                         template (present) ThreeDLocation p_generationLocation := ?,
                                                         template Time64 p_expiryTime := omit
980
        ) modifies mw_ieee1609Dot2_headerInfo := {
garciay's avatar
garciay committed
981
982
983
984
985
            generationTime     := p_generationTime,
            expiryTime         := p_expiryTime,
            generationLocation := p_generationLocation
        } // End of template mw_headerInfo_denm
        
986
        /**
garciay's avatar
garciay committed
987
988
         * 
         * Clause 7.1.3 Generic security profile for other signed messages
989
         */
garciay's avatar
garciay committed
990
        template (omit) HeaderInfo m_headerInfo_gn(
garciay's avatar
garciay committed
991
                                                   in template (value) Psid p_psid := c_its_aid_GN,
992
                                                   in template (value) Time64 p_generationTime
garciay's avatar
garciay committed
993
        ) modifies m_ieee1609Dot2_headerInfo := {
994
            generationTime     := p_generationTime
garciay's avatar
garciay committed
995
        } // End of template m_headerInfo_gn
996
        
997
998
999
1000
        /**
         * 
         * Clause 7.1.3 Generic security profile for other signed messages
         */
For faster browsing, not all history is shown. View entire blame