Newer
Older
* and the IUT current time is inside the time validity period of CERT_TS_A_AT
* indicating 'signed'
* and containing data
* indicating length 0
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_09_02_BO
testcase TC_SEC_ITSS_RCV_CAM_09_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_gnPayload;
var template (value) SecuredMessage v_securedMessage;
var GnRawPayload v_sentRawPayload;
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_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
v_gnNonSecuredPacket.payload := valueof(
f_adaptPayload_m(
bit2oct(
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
))))));
v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
f_buildGnSecuredCam(
v_securedMessage,
)
);
v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
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) {
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 the Secured CAM containing non-empty payload of type 'unsecured'
* <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
* containing payload_field
* containing type
* indicating 'unsecured'
* and containing data
* indicating length > 0
* } then {
* the IUT discards the message
* }
* }
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_09_03_BO
testcase TC_SEC_ITSS_RCV_CAM_09_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_gnPayload;
var template (value) SecuredMessage v_securedMessage;
var GnRawPayload v_sentRawPayload;
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
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
v_gnNonSecuredPacket.payload := valueof(
f_adaptPayload_m(
bit2oct(
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
))))));
v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
f_buildGnSecuredCam(
v_securedMessage,
m_payload_unsecured(
v_gnPayload
)
);
v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
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) {
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 the Secured CAM containing non-empty payload of type 'encrypted'
* <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
* and containing payload_field
* containing type
* indicating 'encrypted'
* and containing data
* indicating length > 0
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_09_04_BO
testcase TC_SEC_ITSS_RCV_CAM_09_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_gnPayload;
var template (value) SecuredMessage v_securedMessage;
var GnRawPayload v_sentRawPayload;
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
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
v_gnNonSecuredPacket.payload := valueof(
f_adaptPayload_m(
bit2oct(
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
))))));
v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
f_buildGnSecuredCam(
v_securedMessage,
m_payload_encrypted(
v_gnPayload
)
);
v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
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
}
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_09_04_EB
* @desc Check that IUT discards the Secured CAM containing exactly one non-empty payload of type 'signed_external'
* <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
* the IUT is receiving a SecuredMessage
* containing payload_field
* indicating 'signed_external'
* and containing data
* indicating length > 0
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_09_05_BO
testcase TC_SEC_ITSS_RCV_CAM_09_05_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_gnPayload;
var template (value) SecuredMessage v_securedMessage;
var GnRawPayload v_sentRawPayload;
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
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
v_gnNonSecuredPacket.payload := valueof(
f_adaptPayload_m(
bit2oct(
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
))))));
v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
f_buildGnSecuredCam(
v_securedMessage,
m_payload_signed_external(
v_gnPayload
)
v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
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) {
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);
}
* @desc Check that IUT discards the Secured CAM containing non-empty payload of type 'signed_and_encrypted'
* <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
* the IUT is receiving a SecuredMessage
* containing payload_field
* indicating 'signed_and_encrypted'
* and containing data
* indicating length > 0
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_09_06_BO
testcase TC_SEC_ITSS_RCV_CAM_09_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_gnPayload;
var template (value) SecuredMessage v_securedMessage;
var GnRawPayload v_sentRawPayload;
// Test adapter configuration
if (not(PICS_GN_SECURITY)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
stop;
}
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
v_gnNonSecuredPacket.payload := valueof(
f_adaptPayload_m(
bit2oct(
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
))))));
v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
f_buildGnSecuredCam(
v_securedMessage,
m_payload_signed_and_encrypted(
v_gnPayload
)
v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
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) {
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();
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
* @desc Check that IUT discards the Secured CAM doesn't containing the TrailerField of type 'signature'
* <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
* containing trailer_fields
* not containing any instance of type TrailerField
* containing type
* indicating 'signature'
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_10_01_BO
* @reference ETSI TS 103 097 [1], clause 7.1
*/
testcase TC_SEC_ITSS_RCV_CAM_10_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;
}
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
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);
}
log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
// Postamble
f_poNeighbour();
f_cf01Down();
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
* @desc Check that IUT discards the Secured CAM containing more then one instance of TrailerField of type 'signature'
* <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
* containing trailer_fields[0].type
* containing type
* indicating 'signature'
* and containing trailer_fields[1].type
* containing type
* indicating 'signature'
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_10_02_BO
* @reference ETSI TS 103 097 [1], clause 7.1
*/
testcase TC_SEC_ITSS_RCV_CAM_10_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;
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
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);
}
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
// Postamble
f_poNeighbour();
f_cf01Down();
} // End of testcase TC_SEC_ITSS_RCV_CAM_10_02_EB
/**
* @desc Check that the IUT discards Secured message containing signature that is not verified using the
* verification key from the certificate contained in the message's signer 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 ['signer_info']
* containing certificate
* containing subject_attributes['verification key'] (KEY)
* and containing trailer_fields[0]
* containing type
* indicating 'signature'
* and containing signature
* NOT verifiable using KEY
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_11_01_BO
* @reference ETSI TS 103 097 [1], clause 7.1
*/
testcase TC_SEC_ITSS_RCV_CAM_11_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;
}
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_prepareSecuredCam_Bo(
cc_taCert_A,
-,
1,
-,
e_certificate
);
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
}
if(i < lengthof(vc_utInds)) {
log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
* @desc Check that the IUT discards Secured message containing signature that is not verified using the
* verification key from the certificate, referenced by the digest contained in the message's signer 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_02)
* containing header_fields ['signer_info'].signer {
* containing digest
* referencing to the certificate (CERT_TS_AT_A)
* containing subject_attributes['verification key'] (KEY)
* and containing trailer_fields[0]
* containing type
* indicating 'signature'
* and containing signature
* NOT verifiable using KEY
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_11_02_BO
* @reference ETSI TS 103 097 [1], clause 7.1
*/
testcase TC_SEC_ITSS_RCV_CAM_11_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;
}
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_prepareSecuredCam(
cc_taCert_A,
omit,
e_certificate_digest_with_sha256
);
v_securedGnPdu.gnPacket.securedMsg.trailer_fields[0].trailerField.signature_.signature_.ecdsa_signature.s
:= not4b(v_securedGnPdu.gnPacket.securedMsg.trailer_fields[0].trailerField.signature_.signature_.ecdsa_signature.s);
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
}
if(i < lengthof(vc_utInds)) {
log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": FAIL: 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_11_02_EB
/**
* @desc Check that IUT discards a Secured CAM if the signer certificate of the message contains the subject type 'enrolment_credential'
* Pics Selection: PICS_GN_SECURITY
* with {
* the IUT being in the 'authorized' state
* and the IUT current time is inside the time validity period of CERT_TS_A_AT
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
* containing header_fields['signer_info']
* containing signer
* containing type
* indicating 'certificate'
* containing certificate (CERT_TS_EC_A)
* containing subject_info.subject_type
* indicating 'enrolment_credentials'
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_12_01_BO
* @reference ETSI TS 103 097 [1], clauses 6.3
testcase TC_SEC_ITSS_RCV_CAM_12_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
{
m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
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();
* @desc Check that IUT discards a Secured CAM if the signer certificate of the message contains the subject type 'authorization_authority'
* Pics Selection: PICS_GN_SECURITY
* with {
* the IUT being in the 'authorized' state
* and the IUT current time is inside the time validity period of CERT_TS_A_AT
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
* containing header_fields['signer_info']
* containing signer
* containing type
* indicating 'certificate'
* containing certificate (CERT_TS_AA_A)
* containing subject_info.subject_type
* indicating 'authorization_authority'
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_12_02_BO
* @reference ETSI TS 103 097 [1], clauses 6.3
testcase TC_SEC_ITSS_RCV_CAM_12_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 adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
{
m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
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();
* @desc Check that IUT discards a Secured CAM if the signer certificate of the message contains the subject type 'enrolment_authority'
* Pics Selection: PICS_GN_SECURITY
* with {
* the IUT being in the 'authorized' state
* and the IUT current time is inside the time validity period of CERT_TS_A_AT
* Expected behaviour:
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01)
* containing header_fields['signer_info']
* containing signer
* and certificate (CERT_TS_EA_A)
* containing subject_info.subject_type
* indicating 'enrolment_authority'
* } then {
* the IUT discards the message
*
* @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CAM_12_03_BO
* @reference ETSI TS 103 097 [1], clauses 6.3
testcase TC_SEC_ITSS_RCV_CAM_12_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
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_prepareSecuredCam(
cc_taCert_EA,
{
m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
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
log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);