Newer
Older
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_USE_POLYGONAL_REGION)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC and PICS_USE_POLYGONAL_REGION' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(cc_taCert_D));
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_03_BO
+
+ /**
+ * @desc Check that IUT discards Secured GN Message if the optional HeaderField generation_location is outside of the identified validity region of the signing certificate
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC and PICS_USE_IDENTIFIED_REGION
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_E_AT
+ * and the IUT current location is inside the validity region of CERT_TS_E_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_E))
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * containing certificate (CERT_TS_E_AT)
+ * containing validity_restrictions ['region']
+ * containing region
+ * containing region_type
+ * indicating 'id_region'
+ * and containing identified_region
+ * indicating REGION
+ * and containing header_fields ['generation_location']
+ * indicating location outside of the REGION
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_08_04_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(cc_taCert_E));
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO
+
+ /**
+ * @desc Check that IUT accepts a Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is 29.9 km (C2C only)
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * Config Id: CF01
+ * Expected behavior:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing header_fields[generation_location].type
+ * indicating 'generation_location'
+ * and containing generation_location
+ * indicating position in 29.9 km from the current position of IUT
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_08_05_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_08_05_BV() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_USE_IDENTIFIED_REGION)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC and PICS_USE_IDENTIFIED_REGION' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_05_BV());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_05_BV
+
+ /**
+ * @desc Check that IUT discards Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is more than 30 km
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * Config Id: CF01
+ * Expected behavior:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing header_fields[generation_location].type
+ * indicating 'generation_location'
+ * and containing generation_location
+ * indicating position in 31 km from the current position of IUT
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_08_06_BO
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_08_06_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_06_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_06_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(
+ in charstring p_taCert
+ ) runs on ItsGeoNetworking {
+
+ // Local variables
+ var GeoNetworkingPdu v_securedGnPdu;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_securedGnPdu := f_prepareSecuredBeacon(
+ p_taCert,
+ {
+ m_header_field_signer_info(
+ m_signerInfo_digest(
+ vc_atCertificate.signer_info.signerInfo.digest
+ )),
+ m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+ m_header_field_generation_location(
+ valueof(m_threeDLocation(
+ PX_WGSLATITUDE,
+ PX_WGSLONGITUDE,
+ '0000'O
+ ))
+ ),
+ m_header_field_its_aid_Other
+ },
+ e_certificate_digest_with_sha256,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_08_05_BV() runs on ItsGeoNetworking {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var Int32 v_latitude;
+ var Int32 v_longitude;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ fx_computePositionUsingDistance(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ 29900.0,
+ 0,
+ v_latitude,
+ v_longitude
+ );
+ v_securedGnPdu := f_prepareSecuredBeacon(
+ cc_taCert_A,
+ {
+ m_header_field_generation_location(
+ valueof(m_threeDLocation(
+ v_latitude,
+ v_longitude,
+ '0000'O
+ ))
+ )
+ },
+ e_certificate_digest_with_sha256
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_08_05_BV
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_08_06_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var Int32 v_latitude;
+ var Int32 v_longitude;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ fx_computePositionUsingDistance(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ 31000.0,
+ 0,
+ v_latitude,
+ v_longitude
+ );
+ v_securedGnPdu := f_prepareSecuredBeacon(
+ cc_taCert_A,
+ {
+ m_header_field_generation_location(
+ valueof(m_threeDLocation(
+ v_latitude,
+ v_longitude,
+ '0000'O
+ ))
+ )
+ },
+ e_certificate_digest_with_sha256
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_08_06_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO
+
+ /**
+ * @desc Check that IUT discards the Secured GN Message containing empty payload of type 'signed'
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing payload_field
+ * containing type
+ * indicating 'signed'
+ * and containing data
+ * indicating length 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_02_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var GnNonSecuredPacket v_gnNonSecuredPacket;
+ var octetstring v_gnPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var template (value) SecuredMessage v_securedMessage;
+ var GeoNetworkingPdu v_securedGnPdu;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_gnNonSecuredPacket := valueof(
+ m_geoNwBroadcastPacket(
+ v_longPosVectorNodeB,
+ vc_localSeqNumber,
+ f_getGeoBroadcastArea(
+ c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+ )));
+
+ // Encode it
+ v_gnPayload := bit2oct(
+ encvalue(
+ v_gnNonSecuredPacket
+ )
+ );
+ f_buildGnSecuredOtherMessage(
+ v_securedMessage,
+ m_payload_signed(
+ ''O
+ ),
+ e_certificate_digest_with_sha256,
+ valueof(m_threeDLocation(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ '0000'O
+ ))
+ );
+ v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO
+
+ /**
+ * @desc Check that IUT discards the Secured GN Message containing payload element of type 'unsecured'
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing payload_field
+ * containing type
+ * indicating 'unsecured'
+ * and containing data
+ * indicating length > 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_03_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var GnNonSecuredPacket v_gnNonSecuredPacket;
+ var octetstring v_gnPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var template (value) SecuredMessage v_securedMessage;
+ var GeoNetworkingPdu v_securedGnPdu;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_gnNonSecuredPacket := valueof(
+ m_geoNwBroadcastPacket(
+ v_longPosVectorNodeB,
+ vc_localSeqNumber,
+ f_getGeoBroadcastArea(
+ c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+ )));
+
+ // Encode it
+ v_gnPayload := bit2oct(
+ encvalue(
+ v_gnNonSecuredPacket
+ )
+ );
+ f_buildGnSecuredOtherMessage(
+ v_securedMessage,
+ m_payload_unsecured(
+ v_gnPayload
+ ),
+ e_certificate_digest_with_sha256,
+ valueof(m_threeDLocation(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ '0000'O
+ ))
+ );
+ v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO
+
+ /**
+ * @desc Check that IUT discards the Secured GN Message containing payload element of type 'encrypted'
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing payload_field
+ * containing type
+ * indicating 'encrypted'
+ * and containing data
+ * indicating length > 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_04_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var GnNonSecuredPacket v_gnNonSecuredPacket;
+ var octetstring v_gnPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var template (value) SecuredMessage v_securedMessage;
+ var GeoNetworkingPdu v_securedGnPdu;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_gnNonSecuredPacket := valueof(
+ m_geoNwBroadcastPacket(
+ v_longPosVectorNodeB,
+ vc_localSeqNumber,
+ f_getGeoBroadcastArea(
+ c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+ )));
+
+ // Encode it
+ v_gnPayload := bit2oct(
+ encvalue(
+ v_gnNonSecuredPacket
+ )
+ );
+ f_buildGnSecuredOtherMessage(
+ v_securedMessage,
+ m_payload_encrypted(
+ v_gnPayload
+ ),
+ e_certificate_digest_with_sha256,
+ valueof(m_threeDLocation(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ '0000'O
+ ))
+ );
+ v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured GN Message containing payload of type signed_external
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing payload_field
+ * containing type
+ * indicating 'signed_external'
+ * and containing data
+ * indicating length > 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_05_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_09_05_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_09_05_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_05_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_09_05_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_09_05_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var GnNonSecuredPacket v_gnNonSecuredPacket;
+ var octetstring v_gnPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var template (value) SecuredMessage v_securedMessage;
+ var GeoNetworkingPdu v_securedGnPdu;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_gnNonSecuredPacket := valueof(
+ m_geoNwBroadcastPacket(
+ v_longPosVectorNodeB,
+ vc_localSeqNumber,
+ f_getGeoBroadcastArea(
+ c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+ )));
+
+ // Encode it
+ v_gnPayload := bit2oct(
+ encvalue(
+ v_gnNonSecuredPacket
+ )
+ );
+ f_buildGnSecuredOtherMessage(
+ v_securedMessage,
+ m_payload_signed_external(
+ v_gnPayload
+ ),
+ e_certificate_digest_with_sha256,
+ valueof(m_threeDLocation(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ '0000'O
+ ))
+ );
+ v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_05_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_05_BO
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured GN Message containing payload of type signed_and_encrypted
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Initial conditions:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+ * containing payload_field
+ * containing type
+ * indicating 'signed_and_encrypted'
+ * and containing data
+ * indicating length > 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_06_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_09_06_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;
+ }
+
+ // Test component configuration
+ f_cf02Up();
+
+ // Preamble
+
+ // Start components
+ v_nodeB := f_getComponent(c_compNodeB);
+ v_nodeD := f_getComponent(c_compNodeD);
+ v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_09_06_BO());
+ v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD());
+
+ // Synchronization
+ f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
+
+ // Cleanup
+ f_cf02Down();
+
+ } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_06_BO
+
+ group g_TC_SEC_ITSS_RCV_GENMSG_09_06_BO {
+
+ /**
+ * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
+ */
+ function f_TC_SEC_ITSS_RCV_GENMSG_09_06_BO() runs on ItsGeoNetworking {
+
+ // Local variables
+ var GnNonSecuredPacket v_gnNonSecuredPacket;
+ var octetstring v_gnPayload;
+ var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+ var template (value) SecuredMessage v_securedMessage;
+ var GeoNetworkingPdu v_securedGnPdu;
+
+ // Test component configuration
+ f_cf01Up();
+
+ // Test adapter configuration
+
+ // Preamble
+ f_prNeighbour();
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_gnNonSecuredPacket := valueof(
+ m_geoNwBroadcastPacket(
+ v_longPosVectorNodeB,
+ vc_localSeqNumber,
+ f_getGeoBroadcastArea(
+ c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+ )));
+
+ // Encode it
+ v_gnPayload := bit2oct(
+ encvalue(
+ v_gnNonSecuredPacket
+ )
+ );
+ f_buildGnSecuredOtherMessage(
+ v_securedMessage,
+ m_payload_signed_and_encrypted(
+ v_gnPayload
+ ),
+ e_certificate_digest_with_sha256,
+ valueof(m_threeDLocation(
+ v_longPosVectorNodeB.latitude,
+ v_longPosVectorNodeB.longitude,
+ '0000'O
+ ))
+ );
+ v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+
+ // Postamble
+ f_selfOrClientSyncAndVerdict(c_poDone, e_success);
+
+ } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_06_BO
+
+ } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_06_BO
+
+ /**
+ * @desc Check that IUT discards the Secured GN Message if the message does not contain the trailer field of type 'signature'
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+ * Config Id: CF01
+ * Expected behavior:
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage
+ * containing trailer_fields
+ * not containing trailer_fields['signature']
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_10_01_BO
+ * @reference ETSI TS 103 097 [1], clause 7.3
+ */
+ testcase TC_SEC_ITSS_RCV_GENMSG_10_01_BO() runs on ItsMtc system ItsSecSystem {
+
+ // Local variables
+ var ItsGeoNetworking v_nodeB;
+ var ItsGeoNetworking v_nodeD;
+
+ // Test control
+ if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) {
+ log("*** " & testcasename() & ": 'PICS_GN_SECURITY and PICS_GN_GBC_SRC' required for executing the TC ***");
+ setverdict(inconc);
+ stop;