Newer
Older
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
+ * with {
+ * the IUT being in the 'authorized' state
+ * and the IUT current time is inside the time validity period of CERT_TS_MSG_13_03_BO_AT
+ * and the IUT current location is set to CURRENT_IUT_LOCATION
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
+ * containing header_fields['signer_info'].signer
+ * containing certificate (CERT_TS_MSG_13_03_BO_AT)
+ * containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'circle'
+ * and containing circular_region
+ * indicating REGION
+ * not containing the CURRENT_IUT_LOCATION
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_13_03_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_13_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // Test adapter configuration
+ 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
+ v_securedGnPdu := f_sendSecuredCam(cc_taCertMsg1303_BO, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ } // End of 'for' statement
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_CAM_13_03_BO
+
+ /**
+ * @desc Check that IUT discards secured CAM when IUT location is outside the rectangular validity restriction of the signing certificate
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * 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_MSG_13_04_BO_AT
+ * and the IUT current location is set to CURRENT_IUT_LOCATION
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
+ * containing header_fields['signer_info'].signer
+ * containing certificate (CERT_TS_MSG_13_04_BO_AT)
+ * containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'rectangle'
+ * and containing rectanglar_region
+ * indicating REGION
+ * not containing the CURRENT_IUT_LOCATION
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_13_04_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_13_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // Test adapter configuration
+ 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
+ v_securedGnPdu := f_sendSecuredCam(cc_taCertMsg1304_BO, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ } // End of 'for' statement
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_CAM_13_04_BO
+
+ /**
+ * @desc Check that IUT discards secured CAM when IUT location is outside the polygonal validity restriction of the signing certificate
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * 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_MSG_13_05_BO_AT
+ * and the IUT current location is set to CURRENT_IUT_LOCATION
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
+ * containing header_fields['signer_info'].signer
+ * containing certificate (CERT_TS_MSG_13_05_BO_AT)
+ * containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'polygon'
+ * and containing polygonal_region
+ * indicating REGION
+ * not containing the CURRENT_IUT_LOCATION
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_13_05_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_13_05_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // Test adapter configuration
+ 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
+ v_securedGnPdu := f_sendSecuredCam(cc_taCertMsg1305_BO, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ } // End of 'for' statement
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_CAM_13_05_BO
+
+ /**
+ * @desc Check that IUT discards secured CAM when IUT location is outside the identified validity restriction of the signing certificate
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * 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_MSG_13_06_BO_AT
+ * and the IUT current location is set to CURRENT_IUT_LOCATION
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
+ * containing header_fields['signer_info'].signer
+ * containing certificate (CERT_TS_MSG_13_06_BO_AT)
+ * containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'id'
+ * and containing id_region
+ * indicating REGION
+ * not containing the CURRENT_IUT_LOCATION
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_13_06_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_13_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // Test adapter configuration
+ 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
+ v_securedGnPdu := f_sendSecuredCam(cc_taCertMsg1306_BO, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ } // End of 'for' statement
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_CAM_13_06_BO
+
+ } // End of group recvCamProfile
+
+ /**
+ * @desc Receiving behaviour test cases for DENM profile
+ * @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.3.3 DENM Profile
+ */
+ group recvDenmProfile {
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured DENM signed with the certificate without region validity restriction
+ * @remark The message defined in this test purpose is used in the subsequent test purposes with the snippet name ‘MSG_SEC_RCV_DENM_A’. Only differences to this snippet are mentioned in subsequent test purposes.
+ * <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
+ * containing header_fields[0]
+ * containing type
+ * indicating 'signer_info'
+ * and containing signer
+ * containing type
+ * indicating 'certificate'
+ * and containing certificate (CERT_AT_A)
+ * containing subject_info.subject_type
+ * indicating 'authorization_ticket' (2)
+ * and containing subject_attributes['verification key'] (KEY)
+ * and not containing validity_restrictions['region']
+ * and containing header_fields [1]
+ * containing type
+ * indicating 'generation_time'
+ * containing generation_time
+ * indicating CURRENT_TIME
+ * and containing header_fields [2]
+ * containing type
+ * indicating 'generation_location'
+ * containing generation_location
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_DENM'
+ * and containing payload_field
+ * containing type
+ * indicating 'signed'
+ * containing data
+ * indicating length > 0
+ * containing DENM payload
+ * and containing trailer_fields
+ * containing single instance of type TrailerField
+ * containing type
+ * indicating 'signature'
+ * containing signature
+ * verifiable using KEY
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_01_01_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_01_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm(cc_taCert_A, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+ else {
+ log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_01_01_BV
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured DENM signe with the certificate with a circular region validity restriction
+ * @remark The message defined in this test purpose is used in the subsequent test purposes with the snippet name ‘MSG_SEC_RCV_DENM_A’. Only differences to this snippet are mentioned in subsequent test purposes.
+ * <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_B_AT
+ * and the IUT current location is inside the region validity period of CERT_TS_B_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage
+ * and containing header_fields[0]
+ * containing type
+ * indicating 'signer_info'
+ * and containing signer {
+ * containing type
+ * indicating 'certificate'
+ * and containing certificate (CERT_AT_B) {
+ * containing subject_info.subject_type
+ * indicating 'authorization_ticket' (2)
+ * and containing subject_attributes['verification key'] (KEY)
+ * and containing validity_restrictions['region'] {
+ * containing region{
+ * containing region_type
+ * indicating 'circle'
+ * and containing circular_region
+ * indicating REGION
+ * }
+ * }
+ * }
+ * and containing header_fields [1]
+ * containing type
+ * indicating 'generation_time'
+ * containing generation_time
+ * indicating CURRENT_TIME
+ * and containing header_fields [2]
+ * containing type
+ * indicating 'generation_location'
+ * containing generation_location
+ * indicating position inside the REGION
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_DENM'
+ * and not containing any other header_fields
+ * and containing payload_fields {
+ * containing type
+ * indicating 'signed'
+ * containing data
+ * indicating length > 0
+ * containing DENM payload
+ * }
+ * and containing trailer_fields {
+ * containing single instance of type TrailerField {
+ * containing type
+ * indicating 'signature'
+ * containing signature
+ * verifiable using KEY
+ * }
+ * }
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_01_02_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_01_02_BV() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm(cc_taCert_B, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+ else {
+ log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_01_02_BV
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured DENM signe with the certificate with a rectangular region validity restriction
+ * @remark The message defined in this test purpose is used in the subsequent test purposes with the snippet name ‘MSG_SEC_RCV_DENM_A’. Only differences to this snippet are mentioned in subsequent test purposes.
+ * <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_C_AT
+ * and the IUT current location is inside the region validity period of CERT_TS_C_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage
+ * containing protocol_version
+ * indicating value '2'
+ * and containing header_fields[0]
+ * containing type
+ * indicating 'signer_info'
+ * and containing signer
+ * containing type
+ * indicating 'certificate'
+ * and containing certificate (CERT_AT_C)
+ * containing subject_info.subject_type
+ * indicating 'authorization_ticket' (2)
+ * and containing subject_attributes['verification key'] (KEY)
+ * and containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'rectangle'
+ * and containing rectangular_regions
+ * indicating REGIONS
+ * and containing header_fields [1]
+ * containing type
+ * indicating 'generation_time'
+ * containing generation_time
+ * indicating CURRENT_TIME
+ * and containing header_fields [2]
+ * containing type
+ * indicating 'generation_location'
+ * containing generation_location
+ * indicating position inside the REGION
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_DENM'
+ * and not containing any other header_fields
+ * and containing payload_field
+ * containing type
+ * indicating 'signed'
+ * containing data
+ * indicating length > 0
+ * containing DENM payload
+ * and containing trailer_fields
+ * containing single instance of type TrailerField
+ * containing type
+ * indicating 'signature'
+ * containing signature
+ * verifiable using KEY
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_01_03_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_01_03_BV() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm(cc_taCert_C, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+ else {
+ log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_01_03_BV
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured DENM signe with the certificate with a polygonal region validity restriction
+ * @remark The message defined in this test purpose is used in the subsequent test purposes with the snippet name ‘MSG_SEC_RCV_DENM_A’. Only differences to this snippet are mentioned in subsequent test purposes.
+ * <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_D_AT
+ * and the IUT current location is inside the region validity period of CERT_TS_D_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage
+ * containing protocol_version
+ * indicating value '2'
+ * and containing header_fields[0]
+ * containing type
+ * indicating 'signer_info'
+ * and containing signer
+ * containing type
+ * indicating 'certificate'
+ * and containing certificate (CERT_AT_D)
+ * containing subject_info.subject_type
+ * indicating 'authorization_ticket' (2)
+ * and containing subject_attributes['verification key'] (KEY)
+ * and containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'polygon'
+ * and containing polygonal_region
+ * indicating REGION
+ * and containing header_fields [1]
+ * containing type
+ * indicating 'generation_time'
+ * containing generation_time
+ * indicating CURRENT_TIME
+ * and containing header_fields [2]
+ * containing type
+ * indicating 'generation_location'
+ * containing generation_location
+ * indicating position inside the REGION
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_DENM'
+ * and not containing any other header_fields
+ * and containing payload_field
+ * containing type
+ * indicating 'signed'
+ * containing data
+ * indicating length > 0
+ * containing DENM payload
+ * and containing trailer_fields
+ * containing single instance of type TrailerField
+ * containing type
+ * indicating 'signature'
+ * containing signature
+ * verifiable using KEY
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_01_04_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_01_04_BV() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm(cc_taCert_D, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+ else {
+ log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_01_04_BV
+
+ /**
+ * @desc Check that IUT accepts a well-formed Secured DENM signe with the certificate with a identified region validity restriction
+ * @remark The message defined in this test purpose is used in the subsequent test purposes with the snippet name ‘MSG_SEC_RCV_DENM_A’. Only differences to this snippet are mentioned in subsequent test purposes.
+ * <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_D_AT
+ * and the IUT current location is inside the region validity period of CERT_TS_D_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage
+ * containing protocol_version
+ * indicating value '2'
+ * and containing header_fields[0]
+ * containing type
+ * indicating 'signer_info'
+ * and containing signer
+ * containing type
+ * indicating 'certificate'
+ * and containing certificate (CERT_AT_E)
+ * containing subject_info.subject_type
+ * indicating 'authorization_ticket' (2)
+ * and containing subject_attributes['verification key'] (KEY)
+ * and containing validity_restrictions['region']
+ * containing region
+ * containing region_type
+ * indicating 'id_region'
+ * and containing identified_region
+ * indicating REGION
+ * and containing header_fields [1]
+ * containing type
+ * indicating 'generation_time'
+ * containing generation_time
+ * indicating CURRENT_TIME
+ * and containing header_fields [2]
+ * containing type
+ * indicating 'generation_location'
+ * containing generation_location
+ * indicating position inside the REGION
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_DENM'
+ * and not containing any other header_fields
+ * and containing payload_field
+ * containing type
+ * indicating 'signed'
+ * containing data
+ * indicating length > 0
+ * containing DENM payload
+ * and containing trailer_fields
+ * containing single instance of type TrailerField
+ * containing type
+ * indicating 'signature'
+ * containing signature
+ * verifiable using KEY
+ * } then {
+ * the IUT accepts the message
+ * }
+ * }
+ * </pre>
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_01_05_BV
+ * @reference ETSI TS 103 097 [1], clause 7.2
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_01_05_BV() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm(cc_taCert_D, omit, e_certificate);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+ else {
+ log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_01_05_BV
+
+ /**
+ * @desc Check that IUT discards a Secured DENM containing protocol version set to a value less then 2
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * 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_DENM_A)
+ * containing protocol_version
+ * indicating 1
+ * } then {
+ * the IUT discards a SecuredMessage
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_02_01_BO
+ * @reference ETSI TS 103 097 [1], clause 5.1
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_02_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm_Bo(cc_taCert_A, PX_WRONG_PROTOCOL_VERSION);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_02_01_BO
+
+ /**
+ * @desc Check that IUT discards a Secured DENM containing protocol version set to a value greater then 2
+ * <pre>
+ * Pics Selection: PICS_GN_SECURITY
+ * 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_DENM_A)
+ * containing protocol_version
+ * indicating 3
+ * } then {
+ * the IUT discards a SecuredMessage
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_02_02_BO
+ * @reference ETSI TS 103 097 [1], clause 5.1
+ */
+ testcase TC_SEC_ITSS_RCV_DENM_02_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+
+ // 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
+ v_securedGnPdu := f_sendSecuredDenm_Bo(cc_taCert_A, PX_WRONG_PROTOCOL_VERSION);
+
+ f_sleep(PX_TNOAC);
+ v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload);
+ for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) {
+ // Empty on purpose
+ }
+ if (i < lengthof(vc_utInds)) {
+ log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+ }
+ else {
+ log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
+ f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+ }
+
+ // Postamble
+ f_poNeighbour();
+ f_cf01Down();
+ } // End of testcase TC_SEC_ITSS_RCV_DENM_02_02_BO