Newer
Older
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
* @desc Check that IUT discards a Secured DENM containing protocol version set to a value less then 2
* Initial conditions:
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is receiving a SecuredMessage (DENM)
* containing protocol_version
* indicating 1
* containing header_fields['its_aid']
* indicating 'AID_DENM'
* } then {
* the IUT discards a SecuredMessage
* }
* }
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_02_01_BO
* @reference ETSI TS 103 097 [1], clause 5.2
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 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();
* @desc Check that IUT discards a Secured DENM containing protocol version set to a value greater then 2
* Initial conditions:
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is receiving a SecuredMessage (DENM)
* containing protocol_version
* indicating 3
* containing header_fields['its_aid']
* indicating 'AID_DENM'
* } then {
* the IUT discards a SecuredMessage
* }
* }
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_02_02_BO
* @reference ETSI TS 103 097 [1], clause 5.2
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 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();
* @desc Check that IUT discards secured DENM when its_aid value is not equal to AID_DENM
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
* Initial conditions:
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is receiving a SecuredMessage
* containing header_fields['its_aid']
* indicating 'AID_CAM'
* and containing payload_field {
* containing type
* indicating 'signed'
* containing data
* containing DENM payload
* }
* } then {
* the IUT discards the DENM
* }
* }
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_07_01_BO
* @reference ETSI TS 103 097 [1], clause 7.2
testcase TC_SEC_ITSS_RCV_DENM_07_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_prepareSecuredDenm(
cc_taCert_A,
{
m_header_field_its_aid_CAM
);
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();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the circular validity region of the signing certificate
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
* the IUT is receiving a SecuredMessage {
* containing header_fields['signer_info'].type
* indicating 'certificate'
* and containing header_fields ['signer_info'].certificate (CERT_AT_B)
* containing validity_restrictions['region'] {
* containing region{
* containing region_type
* indicating 'circle'
* and containing circular_region
* indicating REGION
* }
* }
* and containing header_fields ['generation_location']
* containing generation_location
* indicating position outside the REGION
* and containing header_fields['its_aid']
* indicating 'AID_DENM'
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_01_BO
* @reference ETSI TS 103 097 [1], clause 7.2
testcase TC_SEC_ITSS_RCV_DENM_08_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_sendSecuredDenm(cc_taCert_B_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() & ": PASS: DENM was dropped by the IUT ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
else {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the rectangilar validity region of the signing certificate
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
* the IUT is receiving a SecuredMessage {
* containing header_fields['signer_info'].type
* indicating 'certificate'
* and containing header_fields ['signer_info'].certificate (CERT_AT_C)
* containing validity_restrictions['region'] {
* containing region{
* containing region_type
* indicating 'rectangle'
* and containing rectangular_regions
* indicating REGION
* }
* }
* and containing header_fields ['generation_location']
* containing generation_location
* indicating position outside the REGION
* and containing header_fields['its_aid']
* indicating 'AID_DENM'
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_02_BO
* @reference ETSI TS 103 097 [1], clause 7.2
testcase TC_SEC_ITSS_RCV_DENM_08_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_sendSecuredDenm(cc_taCert_C_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() & ": PASS: DENM was dropped by the IUT ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the polygonal validity region of the signing certificate
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
* the IUT is receiving a SecuredMessage {
* containing header_fields['signer_info'].type
* indicating 'certificate'
* and containing header_fields ['signer_info'].certificate (CERT_AT_D)
* containing validity_restrictions['region'] {
* containing region{
* containing region_type
* indicating 'polygon'
* and containing polygonal_region
* indicating REGION
* }
* }
* and containing header_fields ['generation_location']
* containing generation_location
* indicating position outside the REGION
* and containing header_fields['its_aid']
* indicating 'AID_DENM'
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_03_BO
* @reference ETSI TS 103 097 [1], clause 7.2
testcase TC_SEC_ITSS_RCV_DENM_08_03_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_sendSecuredDenm(cc_taCert_D_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() & ": PASS: DENM was dropped by the IUT ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
else {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the identified validity region of the signing certificate
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
* the IUT is receiving a SecuredMessage {
* containing header_fields['signer_info'].type
* indicating 'certificate'
* and containing header_fields ['signer_info'].certificate (CERT_AT_E)
* containing validity_restrictions['region'] {
* containing region{
* containing region_type
* indicating 'id_region'
* and containing identified_region
* indicating REGION
* }
* }
* and containing header_fields ['generation_location']
* containing generation_location
* indicating position outside the REGION
* and containing header_fields['its_aid']
* indicating 'AID_DENM'
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_04_BO
* @reference ETSI TS 103 097 [1], clause 7.2
testcase TC_SEC_ITSS_RCV_DENM_08_04_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_sendSecuredDenm(cc_taCert_E_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() & ": PASS: DENM was dropped by the IUT ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
else {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // End of testcase TC_SEC_ITSS_RCV_DENM_08_04_BO
} // End of group recvDenmProfile
/**
* @desc Receiving behaviour test cases for Other profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.3.4 Generic Signed Message Profile
*/
group recvOtherProfile {
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
group commonFunctions {
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_01)
*/
function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage_dummy,
mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition_withDelta(
v_longPosVectorIut
),
?,
f_getGeoBroadcastArea(c_area1)
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Beacon message was forwarded ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage_dummy
))) {
// Do not restart tc_ac timer
log("*** " & testcasename() & ": INFO: Unexpected GN message ignored ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // End of function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD
} // End of goup commonFunctions
/**
* @desc Check that IUT accepts a well-formed Secured DENM signed with the certificate without region validity restriction
* <pre>
* Pics Selection: PICS_GN_SECURITY
* Config Id: CF01
* Expected behavior:
* with {
* the IUT being in the 'authorized' state
* }
* 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_BEACON'
* and containing payload_field {
* containing type
* indicating 'signed'
* containing data
* indicating length > 0
* }
* and containing trailer_fields {
* containing single instance of type TrailerField {
* containing type
* indicating 'signature'
* containing signature
* verifiable using KEY
* }
* }
* and the IUT current time is inside the CERT_TS_AT_TIME_VALIDITY
* } then {
* the IUT accepts the message
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_01_BV
* @reference ETSI TS 103 097 [1], clause 7.2
*/
testcase TC_SEC_ITSS_RCV_GENMSG_01_01_BV() runs on ItsMtc system ItsSecSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_SRC) {
log("*** " & testcasename() & ": 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_01_01_BV_nodeB());
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_01_01_BV
group f_TC_SEC_ITSS_RCV_GENMSG_01_01_BV {
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01)
*/
function f_TC_SEC_ITSS_RCV_GENMSG_01_01_BV_nodeB() runs on ItsGeoNetworking {
// Local variables
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_sendSecuredBeacon(cc_taCert_A, omit, e_certificate);
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// Postamble
f_poNeighbour();
} // End of function f_TC_SEC_ITSS_RCV_GENMSG_01_01_BV_nodeB
} // End of group f_TC_SEC_ITSS_RCV_GENMSG_01_01_BV
// TODO Add Other profile RECV TCs
} // End of group recvOtherProfile
/**
* @desc Receiving behaviour test cases for certificates profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.3.5 Profiles for certificates
*/
group recvCertificatesProfile {
// TODO To be implemented
} // End of module ItsSecurity_TestCase