Newer
Older
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
//
// // Local variables
// var LongPosVector v_longPosVectorIut;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE) or not(PICS_CERTIFICATE_SELECTION) or not(PICS_USE_RECTANGULAR_REGION)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and PICS_USE_RECTANGULAR_REGION' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// vc_hashedId8ToBeUsed := cc_iutCert_C; // Load IUT certificate CERT_IUT_C
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// f_TC_SEC_ITSS_SND_GENMSG_05_BV(mw_geographicRegion_rectangular);
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_GENMSG_05_03_BV
//
// /**
// * @desc Check that the secured GN Message contains exactly one HeaderInfo generation_location
// * which is inside the polygonal region containing in the validity restriction
// * of the certificate pointed by the signer_info field
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and PICS_CERTIFICATE_SELECTION and PICS_USE_POLYGONAL_REGION
// * Config Id: CF01
// * with {
// * the IUT has been authorized with the AT certificate (CERT_AT_D)
// * containing validity_restrictions ['region']
// * containing region
// * containing region_type
// * indicating 'polygon'
// * containing polygonal_region
// * indicating REGION
// * }
// * ensure that {
// * when {
// * the IUT is requested to send a Beacon
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing exactly one header_fields ['generation_location']
// * containing generation_location
// * indicating value inside the REGION
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_GENMSG_05_04_BV
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
// * @reference ETSI TS 103 097 [1], clause 7.3
// */
// testcase TC_SEC_ITSS_SND_GENMSG_05_04_BV() runs on ItsGeoNetworking system ItsSecSystem {
//
// // Local variables
// var LongPosVector v_longPosVectorIut;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE) or not(PICS_CERTIFICATE_SELECTION) or not(PICS_USE_POLYGONAL_REGION)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and PICS_USE_POLYGONAL_REGION' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// vc_hashedId8ToBeUsed := cc_iutCert_D; // Load IUT certificate CERT_IUT_D
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// f_TC_SEC_ITSS_SND_GENMSG_05_BV(mw_geographicRegion_polygonal);
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_GENMSG_05_04_BV
//
// /**
// * @desc Check that the secured GN Message contains exactly one HeaderInfo generation_location
// * which is inside the identified region containing in the validity restriction
// * of the certificate pointed by the signer_info field
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and PICS_USE_IDENTIFIED_REGION and PICS_CERTIFICATE_SELECTION
// * Config Id: CF01
// * with {
// * the IUT has been authorized with the AT certificate (CERT_IUT_E)
// * containing validity_restrictions ['region']
// * containing region
// * containing region_type
// * indicating 'id_region'
// * containing identified_region
// * indicating REGION
// * }
// * ensure that {
// * when {
// * the IUT is requested to send a Beacon
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing exactly one header_fields ['generation_location']
// * containing generation_location
// * indicating value inside the REGION
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_GENMSG_05_05_BV
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
// * @reference ETSI TS 103 097 [1], clause 7.3
// */
// testcase TC_SEC_ITSS_SND_GENMSG_05_05_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
// var LongPosVector v_longPosVectorIut;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE) or not(PICS_CERTIFICATE_SELECTION) or not(PICS_USE_IDENTIFIED_REGION)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and PICS_USE_IDENTIFIED_REGION' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// vc_hashedId8ToBeUsed := cc_iutCert_E; // Load IUT certificate CERT_IUT_E
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// f_TC_SEC_ITSS_SND_GENMSG_05_BV(mw_geographicRegion_identified);
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_GENMSG_05_05_BV
//
// /**
// * @desc Check that the secured GN Message contains exactly one HeaderInfo generation_location
// * which is inside the certificate pointed by the signer_info field
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and not PICS_CERTIFICATE_SELECTION
// * Config Id: CF01
// * with {
// * the IUT being in the 'authorized' state
// * }
// * ensure that {
// * when {
// * the IUT is requested to send a Beacon
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signed_info'].certificate
// * containing validity_restrictions ['region']
// * containing region.region_type
// * indicating 'circle'
// * containing region.circular_region
// * indicating REGION
// * or containing region.region_type
// * indicating 'rectangle'
// * containing region.rectangular_region
// * containing array of rectangles
// * indicating REGION
// * or containing region.region_type
// * indicating 'polygonal'
// * containing region.polygonal_region
// * indicating REGION
// * or containing region.region_type
// * indicating 'id_region'
// * containing region.circular_region
// * indicating REGION
// * and containing exactly one header_fields['generation_location']
// * containing generation_location
// * indicating location inside the REGION
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_GENMSG_05_06_BV
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
// * @reference ETSI TS 103 097 [1], clause 7.3
// */
// testcase TC_SEC_ITSS_SND_GENMSG_05_06_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
// var LongPosVector v_longPosVectorIut;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE) or PICS_CERTIFICATE_SELECTION) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE and not PICS_CERTIFICATE_SELECTION' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// vc_hashedId8ToBeUsed := cc_iutCert_B; // Load IUT certificate CERT_IUT_B
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// f_TC_SEC_ITSS_SND_GENMSG_05_BV(); // any type of regions
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_GENMSG_05_06_BV
//
// group f_TC_SEC_ITSS_SND_GENMSG_05_xx {
//
// function f_TC_SEC_ITSS_SND_GENMSG_05_BV(
// in template (present) GeographicRegion p_region := ?
// ) runs on ItsGeoNetworking {
//
// // Local variables
// var GeoNetworkingInd v_geoNwInd;
//
// tc_ac.start;
// alt {
// // GN message must contain generation location and the certificate with region restrictions
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_securedMessage(
// superset(
// mw_header_field(e_generation_location),
// mw_header_info_signer_info_certificate(
// mw_certificate(
// ?,
// ?,
// ?,
// superset(
// mw_validity_restriction_region(
// p_region
// ))))))))) -> value v_geoNwInd {
// var ValidityRestriction v_vr;
// var HeaderInfo v_hf;
//
// tc_ac.stop;
// // Check that generation location
// if (
// f_getMsgHeaderField(v_geoNwInd.msgIn.gnPacket.securedMsg, e_generation_location, v_hf) and
// f_getCertificateValidityRestriction(v_geoNwInd.msgIn.gnPacket.securedMsg.header_fields[0].headerField.signer.signerInfo.certificate, e_region, v_vr)
// ) {
// if (f_isLocationInsideRegion(v_vr.validity.region, v_hf.headerField.generation_location)) {
// log("*** " & testcasename() & ": PASS: DENM contains generation location inside the certificate validity region ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// } else {
// log("v_vr.validity.region=", v_vr.validity.region);
// log("v_hf.headerField.generation_location=", v_hf.headerField.generation_location);
// log("*** " & testcasename() & ": FAIL: Invalid location");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// } else {
// log("*** " & testcasename() & ": FAIL: IMPOSSIBLE!!! DENM generation location or certificate region restriction header field does not exist");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// }
// // GN message doesn't contain generation location
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others
// ))) -> value v_geoNwInd {
// var HeaderInfo v_hf;
//
// tc_ac.stop;
//
// // Check that generation location is not present
// f_getMsgHeaderField(v_geoNwInd.msgIn.gnPacket.securedMsg, e_generation_location, v_hf);
// if (not isbound(v_hf)) {
// log("*** " & testcasename() & ": FAIL: DENM doesn't contain generation location header");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// }
// // GN signing certificate doesn't contains region restriction
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// mw_header_info_signer_info_certificate(
// mw_certificate(
// ?,
// ?,
// ?,
// { } // GN signing certificate doesn't contains region restriction
// )))))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": INCONC: DENM certificate doesn't contain region restriction");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// [] tc_ac.timeout {
// log("*** " & testcasename() & ": INCONC: Expected DENM not received ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
// }
// } // End of 'alt' statement
// } // End of function f_TC_SEC_ITSS_SND_GENMSG_05_BV
//
// } // End of group f_TC_SEC_ITSS_SND_GENMSG_05_xx
//
// /**
// * @desc Check that the secured message contains of type signed, signed_external or signed_and_encrypted
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE
// * Config Id: CF01
// * Initial conditions:
// * with {
// * the IUT being in the 'authorized' state
// * }
// * Expected results:
// * ensure that {
// * when {
// * the IUT is requested to send a Beacon
// * } then {
// * the IUT sends a Ieee1609Dot2Data {
// * containing payload_fields
// * containing exactly one element of type Payload
// * containing type
// * indicating 'signed' or 'signed_external' or 'signed_and_encrypted'
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_GENMSG_06_01_BV
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
// * @reference ETSI TS 103 097 [1], clause 7.3
// */
// testcase TC_SEC_ITSS_SND_GENMSG_06_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
//
// // Local variables
// var LongPosVector v_longPosVectorIut;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// tc_ac.start;
// alt {
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// ?,
// mw_payload(
// e_signed
// )
// ),
// mw_geoNwBeaconPacket(
// ?
// )))) {
// log("*** " & testcasename() & ": PASS: Beacon payload is 'signed'");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// ?,
// mw_payload(
// e_signed_external
// )
// ),
// mw_geoNwBeaconPacket(
// ?
// )))) {
// log("*** " & testcasename() & ": PASS: Beacon payload is 'e_signed_external'");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// ?,
// mw_payload(
// e_signed_and_encrypted
// )
// ),
// mw_geoNwBeaconPacket(
// ?
// )))) {
// log("*** " & testcasename() & ": PASS: Beacon payload is 'e_signed_and_encrypted'");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// ?,
// mw_payload
// ),
// mw_geoNwBeaconPacket(
// ?
// )))) {
// log("*** " & testcasename() & ": FAIL: Beacon payload is not signed, signed_external or signed_and_encrypted");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// [] tc_ac.timeout {
// log("*** " & testcasename() & ": INCONC: Expected Message not received ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
// }
// } // End of 'alt' statement
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_GENMSG_06_01_BV
//
// /**
// * @desc Check that the secured GN Message contains only one TrailerField of type signature ;
// * Check that the signature contained in the Ieee1609Dot2Data is calculated over the right fields by
// * cryptographically verifying the signature
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE
// * Config Id: CF01
// * Initial conditions:
// * with {
// * the IUT being in the 'authorized' state
// * }
// * ensure that {
// * when {
// * the IUT is requested to send Beacon
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields ['signer_info']
// * containing signer
// * containing type
// * and containing certificate
// * indicating CERT
// * and containing trailer_fields['signature']
// * containing signature
// * verifiable using CERT.subject_attributes['verification_key']
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_GENMSG_07_01_BV
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
// * @reference ETSI TS 103 097 [1], clause 7.3
// */
// testcase TC_SEC_ITSS_SND_GENMSG_07_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
//
// // Local variables
// var LongPosVector v_longPosVectorIut;
// var GeoNetworkingInd v_geoNwInd;
// var SignerInfo v_signerInfo;
//
// // Test adapter configuration
// if (not(PICS_GN_SECURITY) or not(PICS_ITS_AID_OTHER_PROFILE)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_AID_OTHER_PROFILE' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// f_cf01Up();
// v_longPosVectorIut := f_getPosition(c_compIut);
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// tc_ac.start;
// alt {
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others(
// mw_header_info_signer_info_certificate
// )))) -> value v_geoNwInd {
// tc_ac.stop;
// log("*** " & testcasename() & ": INFO: Beacon message with certificate received ***");
// f_getMsgSignerInfo(v_geoNwInd.msgIn.gnPacket.securedMsg, v_signerInfo);
//
// if (f_verifyGnSecuredMessageSignatureWithCertificate(v_geoNwInd.msgIn.gnPacket.securedMsg, v_signerInfo.signerInfo.certificate) == false) {
// log("*** " & testcasename() & ": FAIL: Beacon received with invalide signature");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_ieee1609Dot2Data_Others
// ))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": FAIL: Beacon message without certificate received");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// [] tc_ac.timeout {
// log("*** " & testcasename() & ": INCONC: Expected GN Message not received");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
// }
// } // End of 'alt' statement
// log("*** " & testcasename() & ": PASS: GN Message received with correct signature");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//
// // Postamble
// f_acTriggerEvent(m_stopPassBeaconing);
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_DENM_07_01_BV
//
// } // End of group sendOtherProfile
* @desc Sending behaviour test cases for certificates profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.2.7 Profiles for certificates
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
// group sendCertificatesProfile {
//
// /**
// * @desc Check that AT certificate has version 2
// * <pre>
// * Pics Selection: PICS_GN_SECURITY
// * Config Id: CF01
// * Initial conditions:
// * with {
// * the IUT being in the 'authorized' state
// * the IUT being requested to include certificate in the next CAM
// * }
// * Expected Behaviour:
// * ensure that {
// * when {
// * the IUT is requested to send a CAM
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signer_info'].signer
// * containing type
// * indicating certificate
// * containing certificate
// * containing version
// * indicating '2'
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_CERT_01_01_BV
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
// * @reference ETSI TS 103 097 [1], clauses 6.1 and 7.4.1
// */
// testcase TC_SEC_ITSS_SND_CERT_01_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
//
// // Test control
// if (not(PICS_GN_SECURITY)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// f_cf01Up();
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// tc_ac.start;
// alt {
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_securedMessage(
// superset(
// mw_header_info_signer_info_certificate(
// mw_certificate(
// ))))))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": PASS: AT Certificate version set to " & int2char(c_certificate_version) & " ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_securedMessage(
// superset(
// mw_header_info_signer_info_certificate(
// ?
// )))))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": FAIL: AT Certificate version mismatch ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// [] tc_ac.timeout {
// log("*** " & testcasename() & ": INCONC: Expected message not received ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
// }
// } // End of 'alt' statement
//
// // Postamble
// f_poNeighbour();
// f_cf01Down();
// } // End of testcase TC_SEC_ITSS_SND_CERT_01_01_BV
//
// /**
// * @desc Check that AA certificate has version 2
// * <pre>
// * Pics Selection: PICS_GN_SECURITY
// * Config Id: CF01
// * Initial conditions:
// * with {
// * the IUT being in the 'authorized' state
// * the IUT being requested to include certificate chain in the next CAM
// * }
// * Expected Behaviour:
// * ensure that {
// * when {
// * the IUT is requested to send a CAM
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signer_info'].signer
// * containing type
// * indicating 'certificate_chain'
// * and containing certificates
// * indicating length > 0
// * and containing certificates[n] (0..N)
// * containing version
// * indicating '2'
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_CERT_01_02_BV
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
// * @reference ETSI TS 103 097 [1], clauses 6.1 and 7.4.1
// */
// testcase TC_SEC_ITSS_SND_CERT_01_02_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
// var Ieee1609Dot2Data v_recv;
// var Certificate v_cert;
// var SignerInfo v_si;
// var HashedId8 v_digest;
//
// // Test control
// if (not(PICS_GN_SECURITY)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// f_cf01Up();
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
//
// // Wait for the message with the certificate to retrieve the AA digest.
// // Ask for the chain, containing AT and AA certificate
// // Check AA Certificate
// log("*** " & testcasename() & ": INFO: Wait for certificate and ask for certificate chain ***");
// tc_ac.start;
// f_askForCertificateChain(f_generateDefaultCam());
// tc_ac.stop;
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test Body
// tc_ac.start;
// alt {
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_securedMessage(
// superset(
// mw_header_info_signer_info_certificate_chain(
// superset(
// mw_aa_certificate
// ))))))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": PASS: AA certificate version set to " & int2char(c_certificate_version) & " ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// [] geoNetworkingPort.receive(
// mw_geoNwInd(
// mw_geoNwSecPdu(
// mw_securedMessage(
// superset(
// mw_header_info_signer_info_certificate_chain
// ))))) {
// tc_ac.stop;
// log("*** " & testcasename() & ": FAIL: AA certificate version mismatch or no AA cert received***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// [] tc_ac.timeout {
// log("*** " & testcasename() & ": INCONC: Expected message not received ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
// }
// } // End of 'alt' statement
//
// // Postamble
// f_poNeighbour();
// f_cf01Down();
//
// } // End of testcase TC_SEC_ITSS_SND_CERT_01_02_BV
//
// /**
// * @desc Check that the references in the certificate chain are valid
// * Check that signer_info type of all certificates in the chain are 'certificate_digest_with_sha256',
// * 'certificate_digest_with_other_algorithm' or 'self'
// * <pre>
// * Pics Selection: PICS_GN_SECURITY
// * Config Id: CF01
// * Initial conditions:
// * with {
// * the IUT being in the 'authorized' state
// * the IUT being requested to include certificate chain in the next CAM
// * } ensure that {
// * when {
// * the IUT is requested to send a CAM
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signer_info'].signer
// * containing type
// * indicating 'certificate_chain'
// * and containing certificates
// * indicating length > 0
// * and containing certificates[0]
// * containing signer_info
// * containing type
// * indicating 'certificate_digest_with_sha256'
// * or indicating 'certificate_digest_with_other_algorythm'
// * and containing digest
// * referenced to the trusted certificate
// * or containing signer_info
// * containing type
// * indicating 'self'
// * and containing certificates[n] (1..N)
// * containing signer_info
// * containing type
// * indicating 'certificate_digest_with_sha256'
// * or indicating 'certificate_digest_with_other_algorythm'
// * and containing digest
// * referenced to the certificates[n-1]
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_CERT_02_01_BV
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
// * @reference ETSI TS 103 097 [1], clause 4.2.10, 6.1 and 7.4.1
// */
// testcase TC_SEC_ITSS_SND_CERT_02_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local declarations
// var SequenceOfCertificate v_chain;
// var SignerInfo v_si;
// var HashedId8 v_digest;
//
// // Test control
// if (not(PICS_GN_SECURITY)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// f_cf01Up();
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// log("*** " & testcasename() & ": INFO: Request and waiting for the message containing certificate chain ***");
// tc_ac.start;
// if (not f_askAndWaitForCertificateChain(v_chain, f_generateDefaultCam())) {
// log("*** " & testcasename() & ": INCONC: Expected message not received ***");
// f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
// }
// tc_ac.stop;
//
// // Test Body
// for (var integer v_counter := lengthof(v_chain) - 1; v_counter > 1; v_counter := v_counter - 1) { // Loop on []N-1..1]
// if (not f_getCertificateSignerInfo(v_chain[v_counter], v_si)) {
// log("*** " & testcasename() & ": FAIL: Certificate[ " & int2str(v_counter) & "] doesn't contain signer info ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// if (v_si.type_ != e_certificate_digest_with_sha256) {
// if (v_si.type_ != e_certificate_digest_with_other_algorithm or PICS_PLUGTEST_VERSION) {
// log("*** " & testcasename() & ": FAIL: Certificate is not signed with digest ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// }
// // signer_info.type indicates 'certificate_digest_with_sha256' or 'certificate_digest_with_other_algorythm'
//
// v_digest := f_calculateDigestFromCertificate(v_chain[v_counter - 1]);
// if (not match (v_si.signerInfo.digest, v_digest)) {
// log("*** " & testcasename() & ": FAIL: Certificate chain is not valid ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// } // End of 'for' statement
// // Process certificate[0]
// if (not f_getCertificateSignerInfo(v_chain[0], v_si)) {
// log("*** " & testcasename() & ": FAIL: Certificate[0] doesn't contain signer info ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// // Process certificate[0]
// if (v_si.type_ != e_certificate_digest_with_sha256) {
// log("*** " & testcasename() & ": FAIL: Certificate[0] is not signed with digest ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// // signer_info.type indicates 'certificate_digest_with_sha256' only
// log("*** " & testcasename() & ": PASS: Certificate chain is well signed ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//
// // Postamble
// f_poNeighbour();
// f_cf01Down();
//
// } // End of testcase TC_SEC_ITSS_SND_CERT_02_01_BV
//
// /**
// * @desc Check that the rectangular region validity restriction of the message signing certificate
// * contains not more than six valid rectangles;
// * Check that the rectangular region validity restriction of the message signing certificate is
// * continuous and does not contain any holes
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_CERTIFICATE_SELECTION and PICS_USE_RECTANGULAR_REGION
// * Config Id: CF01
// * with {
// * the IUT being in the 'authorized' state
// * the IUT being requested to include certificate in the next CAM
// * } ensure that {
// * when {
// * the IUT is requested to send a CAM
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signer_info'].signer
// * containing type
// * containing certificate
// * containing validity_restrictions['region']
// * containing region_type
// * indicating 'rectangle'
// * and containing rectangular_region
// * indicating length <= 6
// * and containing elements of type RectangularRegion
// * indicating continuous region without holes
// * and containing northwest and southeast
// * indicating northwest is on the north from southeast
// * }
// * }
// * @remark Certificate: cc_taCert_C
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_CERT_04_01_BV
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
// * @reference ETSI TS 103 097 [1], clauses 4.2.20 and 4.2.23
// */
// testcase TC_SEC_ITSS_SND_CERT_04_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
// var Certificate v_cert;
// var ValidityRestriction v_vr;
// var integer v_counter;
//
// // Test control
// if (not(PICS_GN_SECURITY) or not(PICS_CERTIFICATE_SELECTION) or not(PICS_USE_RECTANGULAR_REGION)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_CERTIFICATE_SELECTION and PICS_USE_RECTANGULAR_REGION' required for executing the TC ***");
// stop;
// }
//
// // Test component configuration
// vc_hashedId8ToBeUsed := cc_iutCert_C;
// f_cf01Up();
//
// // Test adapter configuration
//
// // Preamble
// f_prNeighbour();
// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//
// // Test body
// tc_ac.start;
// if (not f_waitForCertificate(v_cert)) {
// log("*** " & testcasename() & ": INCONC: Expected message not received ***");
// f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
// }
// tc_ac.stop;
// if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) {
// if (v_vr.validity.region.region_type == e_rectangle) {
// var RectangularRegions v_rects := v_vr.validity.region.region.rectangular_region;
// if (lengthof(v_rects) > 6) {
// log("*** " & testcasename() & ": FAIL: Rectangular regions count is greather than 6 ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// for (v_counter := 0; v_counter<lengthof(v_rects); v_counter := v_counter + 1) {
// var RectangularRegion v_rect := v_rects[v_counter];
// if (true != f_isValidTwoDLocation(v_rect.northwest)) {
// log("*** " & testcasename() & ": FAIL: Northwest location is invalid in rect " & int2str(v_counter) & " ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// if (true != f_isValidTwoDLocation(v_rect.southeast)) {
// log("*** " & testcasename() & ": FAIL: Southeast location is invalid in rect " & int2str(v_counter) & " ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// // Check normality of the rectangle
// if (v_rect.northwest.latitude < v_rect.southeast.latitude) {
// log("*** " & testcasename() & ": FAIL: Rectangular region " & int2str(v_counter) & " is not normalized ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// }
// } // End of 'for' statement
//
// // Check for continuous rectangles
// if (lengthof(v_rects) > 1) {
// if (true != f_isContinuousRectangularRegions(v_rects)) { // FIXME Not implemented
// log("*** " & testcasename() & ": FAIL: Rectangular regions are not connected all together ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
// } else {
// log("*** " & testcasename() & ": PASS: Certificate has a valid rectangular region restrictions ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
// }
// } else {
// log("*** " & testcasename() & ": INCONC: Certificate has other region type ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); // to be inconc
// }
// } else {
// log("*** " & testcasename() & ": PASS: Certificate doesn't have any location restrictions ***");
// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// }
//
// // Postamble
// f_poNeighbour();
// f_cf01Down();
//
// } // End of testcase TC_SEC_ITSS_SND_CERT_04_01_BV
//
// /**
// * @desc Check that the rectangular region validity restriction of all certificates contains not more than
// * six valid rectangles;
// * Check that the rectangular region validity restriction of the AT certificate is continuous and
// * does not contain any holes
// * Check that the rectangular certificate validity region of the subordinate certificate is well formed and
// * inside the validity region of the issuing certificate
// * <pre>
// * Pics Selection: PICS_GN_SECURITY and PICS_CERTIFICATE_SELECTION and PICS_USE_RECTANGULAR_REGION
// * Config Id: CF01
// * with {
// * the IUT being in the 'authorized' state
// * the IUT being requested to include certificate chain in the next CAM
// * } ensure that {
// * when {
// * the IUT is requested to send a CAM
// * } then {
// * the IUT sends a Ieee1609Dot2Data
// * containing header_fields['signer_info'].signer
// * containing type
// * indicating 'certificate_chain'
// * containing certificates
// * indicating length N > 0
// * and containing certificates [n] 0..n
// * containing validity_restrictions['region']
// * containing region_type
// * indicating 'rectangle'
// * and containing rectangular_region
// * indicating length <= 6
// * and containing elements of type RectangularRegion
// * containing northwest and southeast
// * indicating northwest on the north from southeast
// * and indicating continuous region without holes
// * }
// * }
// * </pre>
// * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_SND_CERT_04_02_BV
// * @reference ETSI TS 103 097 [1], clauses 4.2.20 and 4.2.23
// */
// testcase TC_SEC_ITSS_SND_CERT_04_02_BV() runs on ItsGeoNetworking system ItsSecSystem {
// // Local variables
// var SequenceOfCertificate v_chain;
// var ValidityRestriction v_vr := valueof(m_validity_restriction_unknown), v_vri := valueof(m_validity_restriction_unknown); // current and issuing cert validity restrictions
// var boolean f_vr := false, f_vri := false;
//
// // Test control
// if (not(PICS_GN_SECURITY) or not(PICS_CERTIFICATE_SELECTION) or not(PICS_USE_RECTANGULAR_REGION)) {
// log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_CERTIFICATE_SELECTION and PICS_USE_RECTANGULAR_REGION' required for executing the TC ***");
// stop;