Newer
Older
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
+ m_header_field_generation_time(1000 * f_getCurrentTime()) // In us
+ },
+ e_certificate_digest_with_sha256,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_07_BO
+
+ /**
+ * @desc Check that IUT ignores the HeaderFields generation_time_standard_deviation of received Secured CAM
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * indicating TIME_1 inside the validity period of the signer certificate
+ * and containing header_fields[2].type
+ * indicating 'generation_time_with_standard_deviation'
+ * indicating TIME_2 inside the validity period of the signer certificate
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_08_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_08_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_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ 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_time_with_standard_deviation(
+ m_time64WithStandardDeviation(
+ 1000, // In us
+ 0
+ )),
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_digest_with_sha256,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_08_BO
+
+ /**
+ * @desc Check that IUT ignores the HeaderFields generation_time_standard_deviation of received Secured CAM
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * indicating TIME_1 outside the validity period of the signer certificate
+ * and containing header_fields[2].type
+ * indicating 'generation_time_with_standard_deviation'
+ * indicating TIME_2 inside the validity period of the signer certificate
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_09_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_09_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_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ 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_time_with_standard_deviation(
+ m_time64WithStandardDeviation(
+ 1000 * f_getCurrentTime(), // In us
+ 0
+ )),
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_digest_with_sha256,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_09_BO
+
+ /**
+ * @desc Check that IUT discards the Secured CAM containing the expiry_time HeaderField
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * indicating CURRENT_TIME
+ * and containing header_fields[2]
+ * containing type
+ * indicating 'expiration'
+ * and containing expiry_time
+ * indicating CURRENT_TIME + 1h
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_10_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_10_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_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ 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_expiry_time(
+ f_getCurrentTime() - 3600/*1h*/
+ ),
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_digest_with_sha256,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_10_BO
+
+ /**
+ * @desc Check that IUT ignores the HeaderFields generation_location of received Secured CAM
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing signer
+ * containing type
+ * indicating certificate
+ * and containing certificate (CERT_TS_AT_B)
+ * containing validity_restrictions['region']
+ * containing region (X_CERT_REGION)
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * and containing header_fields[2]
+ * containing type
+ * indicating 'generation_location'
+ * and containing generation_location
+ * indicating position outside of the validity restriction of X_CERT_REGION
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_11_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_11_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_prepareSecuredCam(
+ cc_taCert_B,
+ {
+ m_header_field_generation_time(1000 * (f_getCurrentTime())), // In us
+ m_header_field_generation_location(
+ m_threeDLocation(
+ PX_WGSLONGITUDE,
+ PX_WGSLATITUDE,
+ int2oct(0, 2)
+ )
+ ),
+ m_header_field_its_aid_CAM
+ },
+ e_certificate,
+ true
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_11_BO
+
+ /**
+ * @desc Check that IUT accepts the Secured CAM containing additional non-standard HeaderField
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * and containing header_fields[2].type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and containing header_fields[3]
+ * containing type
+ * indicating non-standard header field type (200)
+ * and containing other_header
+ * indicating non-empty data
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_12_BV
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_12_BV() 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_prepareSecuredCam(
+ cc_taCert_B,
+ {
+ m_header_field_generation_time(1000 * (f_getCurrentTime())), // In us
+ m_header_field_generation_location(
+ m_threeDLocation(
+ PX_WGSLONGITUDE,
+ PX_WGSLATITUDE,
+ int2oct(0, 2)
+ )
+ ),
+ m_header_field_its_aid_CAM,
+ m_header_field_unspecify
+ },
+ e_certificate_digest_with_sha256,
+ true
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_12_BV
+
+ /**
+ * @desc Check that IUT discards the Secured CAM containing the header field 'encryption_parameter and recipient_info'
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * and containing header_fields[1].type
+ * indicating 'generation_time'
+ * and containing header_fields[2].type
+ * indicating 'its_aid'
+ * containing its_aid
+ * indicating 'AID_CAM'
+ * and containing header_fields[3]
+ * containing type
+ * indicating 'encryption_parameters'
+ * and containing enc_params
+ * containing symm_algorithm
+ * indicating 'aes_128_ccm'
+ * and containing nonce
+ * and containing header_fields[4]
+ * containing type
+ * indicating 'recipient_info'
+ * and containing recipients
+ * containing recipients[0]
+ * containing cert_id
+ * referencing to CERT_IUT_A_AT
+ * and containing pk_encryption
+ * indicating 'ecies_nistp256'
+ * and containing enc_key
+ * and not containing other header fields
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_13_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_04_13_BO() runs on ItsGeoNetworking system ItsSecSystem {
+
+ // Local variables
+ var integer i;
+ var GeoNetworkingPdu v_securedGnPdu;
+ var GnRawPayload v_sentRawPayload;
+ var Certificate v_iutATCertificate;
+ var SubjectAttribute v_encryption_key;
+
+ // 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
+ if (
+ (f_readCertificate(cc_iutCert_A, v_iutATCertificate) == false) or
+ (f_getCertificateSubjectAttribute(v_iutATCertificate, e_encryption_key, v_encryption_key) == false)
+ ) {
+ f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); // Set verdict to inconc
+ } else {
+ v_securedGnPdu := f_prepareSecuredCam(
+ cc_taCert_B,
+ {
+ m_header_field_generation_time(1000 * (f_getCurrentTime())), // In us
+ m_header_field_generation_location(
+ m_threeDLocation(
+ PX_WGSLONGITUDE,
+ PX_WGSLATITUDE,
+ int2oct(0, 2)
+ )
+ ),
+ m_header_field_its_aid_CAM, // containing header_fields[2].type
+ // indicating 'its_aid'
+ m_header_field_enc_params( // containing header_fields[3].type.enc_params
+ m_encryptionParameters_aes_128_ccm( // indicating 'aes_128_ccm'
+ PX_ENCRYPTIONPARAMETERS_AES_128_CCM_NONCE // and containing nonce
+ )
+ ),
+ m_header_field_multiple_recipients( // containing header_fields[4].type
+ { // indicating 'encryption_parameters'
+ m_recipientInfo_ecies_enc_key(
+ v_iutATCertificate.signer_info.signerInfo.digest,
+ e_ecies_nistp256, // containing symm_algorithm
+ // indicating 'aes_128_ccm'
+ m_eciesEncryptedKey_aesccm(
+ v_encryption_key.attribute.rv,
+ '00000000000000000000000000000000'O, // FIXME Where to find these values
+ '00000000000000000000000000000000'O
+ )
+ )
+ }
+ )
+ },
+ e_certificate_digest_with_sha256,
+ true
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_04_13_BO
+
+ /**
+ * @desc Check that IUT discards a secured CAM if the header_fields contains a signer of type 'self'
+ * <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_CAM_01)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * containing signer.type
+ * indicating 'self'
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_05_01_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_05_01_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();
+ if (PICS_DEBUG_ADDON) {
+ f_sendCertificate(cc_taCert_F, f_generateDefaultCam());
+ }
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_securedGnPdu := f_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ m_header_field_signer_info(
+ m_signerInfo_self
+ ),
+ m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+ m_header_field_its_aid_CAM
+ },
+ e_self,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_05_01_BO
+
+ /**
+ * @desc Check that IUT discards a secured CAM if the header_fields contains a signer of type certificate_digest_with_other_algorithm
+ * <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_CAM_02)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * containing signer.type
+ * indicating 'certificate_digest_with_other_algorithm'
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_05_02_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_05_02_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();
+ if (PICS_DEBUG_ADDON) {
+ f_sendCertificate(cc_taCert_F, f_generateDefaultCam());
+ }
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_securedGnPdu := f_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ m_header_field_signer_info(
+ m_signerInfo_other_certificates(
+ m_certificateWithAlgo_ecdsa(
+ PX_OTHER_CERT_DIGEST
+ ))),
+ m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_digest_with_other_algorithm,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_05_02_BO
+
+ /**
+ * @desc Check that IUT discards a secured CAM if the header_fields contains a signer of type certificate_chain and the chain is empty
+ * <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_CAM_02)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * containing signer.type
+ * indicating 'certificate_chain'
+ * and containing certificates
+ * indicating length = 0
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_05_03_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_05_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();
+ if (PICS_DEBUG_ADDON) {
+ f_sendCertificate(cc_taCert_F, f_generateDefaultCam());
+ }
+ f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+
+ // Test Body
+ v_securedGnPdu := f_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ m_header_field_signer_info(
+ m_signerInfo_certificates(
+ { }
+ )),
+ m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_chain,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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_05_03_BO
+
+ /**
+ * @desc Check that IUT discards a secured CAM if the header_fields contains a signer of type certificate_chain and the chain contains only one 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_A_AT
+ * }
+ * ensure that {
+ * when {
+ * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_03)
+ * containing header_fields[0].type
+ * indicating 'signer_info'
+ * containing signer.type
+ * indicating 'certificate_chain'
+ * and containing certificates
+ * indicating length = 1
+ * } then {
+ * the IUT discards the message
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_05_04_BO
+ * @reference ETSI TS 103 097 [1], clause 7.1
+ */
+ testcase TC_SEC_ITSS_RCV_CAM_05_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_prepareSecuredCam(
+ cc_taCert_A,
+ {
+ m_header_field_signer_info(
+ m_signerInfo_certificates(
+ { vc_atCertificate }
+ )),
+ m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+ m_header_field_its_aid_CAM
+ },
+ e_certificate_chain,
+ false
+ );
+ f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+
+ 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