Newer
Older
* 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 certificate (CERT_TS_MSG_06_01_BO_AT)
* containing validity_restrictions['time_start_and_end']
* containing start_validity
* indicating START_VALIDITY_AT
* and containing end_validity
* indicating END_VALIDITY_AT
* and containing header_fields ['generation_time']
* containing generation_time
* indicating GEN_TIME < START_VALIDITY_AT
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_01_BO
* @reference ETSI TS 103 097 [1], clauses 5.4 and 7.2
testcase TC_SEC_ITSS_RCV_DENM_06_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
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
f_getCertificateValidityRestriction(vc_atCertificate, e_time_start_and_end, v_timeValidity);
m_header_field_generation_time(
(v_timeValidity.validity.time_start_and_end.start_validity - 3600) * 1000
) // In us
},
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) {
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();
* @desc Check that IUT discards a Secured DENM containing generation_time before the certificate validity period
* Pics Selection: PICS_GN_SECURITY
* 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 certificate (CERT_TS_MSG_06_02_BO_AT)
* containing validity_restrictions['time_start_and_end']
* containing start_validity
* indicating START_VALIDITY_AT
* and containing end_validity
* indicating END_VALIDITY_AT
* and containing header_fields ['generation_time']
* indicating GEN_TIME > END_VALIDITY_AT
* } then {
* the IUT discards the message
* }
* }
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_02_BO
* @reference ETSI TS 103 097 [1], clauses 5.4 and 7.2
testcase TC_SEC_ITSS_RCV_DENM_06_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
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
f_getCertificateValidityRestriction(vc_atCertificate, e_time_start_and_end, v_validity);
m_header_field_generation_time(
(v_validity.validity.time_start_and_end.end_validity + 3600) * 1000
) // In us
},
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) {
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();
* @desc Check that IUT discards a Secured DENM if the generation_time is more than 10 minute in the past (C2C only)
* 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 header_fields ['generation_time']
* containing generation_time
* indicating GEN_TIME ( CURRENT_TIME - 11min )
* } then {
* the IUT discards the message
* }
* }
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_03_BO
* @reference ETSI TS 103 097 [1], clauses 5.4 and 7.2
testcase TC_SEC_ITSS_RCV_DENM_06_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
// Test adapter configuration
if (not(PICS_GN_SECURITY) or not(PICS_ITS_C2C_MODE)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_C2C_MODE' 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_generation_time(
(1000 * f_getCurrentTime() - 660) * 1000
) // In us
},
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) {
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
} // 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_DENM_06_03_BO
/**
* @desc Check that IUT discards a Secured DENM if the generation_time is more than 10 minute in the future(C2C only)
* <pre>
* Pics Selection: PICS_GN_SECURITY and PICS_ITS_C2C_MODE
* 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 header_fields ['generation_time']
* containing generation_time
* indicating GEN_TIME ( CURRENT_TIME + 11min )
* } then {
* the IUT discards the message
* }
* }
* </pre>
*
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_04_BO
* @reference ETSI TS 103 097 [1], clauses 5.4 and 7.2
*/
testcase TC_SEC_ITSS_RCV_DENM_06_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
// Local variables
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
// Test adapter configuration
if (not(PICS_GN_SECURITY) or not(PICS_ITS_C2C_MODE)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_C2C_MODE' required for executing the TC ***");
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_securedGnPdu := f_prepareSecuredDenm(
cc_taCert_A,
{
m_header_field_generation_time(
(1000 * f_getCurrentTime() + 660) * 1000
) // In us
},
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) {
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
* Initial conditions:
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_07_01_BO
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) {
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 when its_aid value is undefined
* Initial conditions:
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
* containing header_fields['its_aid']
* indicating 'AID_UNDEFINED'
* 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.3.2 TP_SEC_ITSS_RCV_DENM_07_02_BO
testcase TC_SEC_ITSS_RCV_DENM_07_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_prepareSecuredDenm(
cc_taCert_A,
{
);
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) {
} // 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
garciay
committed
* Pics Selection: PICS_GN_SECURITY and PICS_USE_CIRCULAR_REGION
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
* 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'
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_01_BO
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
garciay
committed
if (not(PICS_GN_SECURITY) or not(PICS_USE_CIRCULAR_REGION)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_CIRCULAR_REGION' 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) {
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();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the rectangilar validity region of the signing certificate
garciay
committed
* Pics Selection: PICS_GN_SECURITY and PICS_USE_RECTANGULAR_REGION
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
* 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'
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_02_BO
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
garciay
committed
if (not(PICS_GN_SECURITY) or not(PICS_USE_RECTANGULAR_REGION)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_RECTANGULAR_REGION' 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) {
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();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the polygonal validity region of the signing certificate
garciay
committed
* Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
* 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'
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_03_BO
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
garciay
committed
if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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) {
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();
* @desc Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the identified validity region of the signing certificate
garciay
committed
* Pics Selection: PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION
* with {
* the IUT being in the 'authorized' state
* }
* ensure that {
* when {
* the IUT is requested to send DENM
* 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'
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_04_BO
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
garciay
committed
if (not(PICS_GN_SECURITY) or not(PICS_USE_IDENTIFIED_REGION)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION' 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) {
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();
* @desc Check that IUT accepts a Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is 29.9 km (C2C only)
* 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
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
* containing header_fields[generation_location].type
* indicating 'generation_location'
* and containing generation_location
* indicating position in 29.9 km from the current position of IUT
* } then {
* the IUT accepts the message
* }
* }
* </pre>
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_05_BV
testcase TC_SEC_ITSS_RCV_DENM_08_05_BV() runs on ItsGeoNetworking system ItsSecSystem {
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
var Int32 v_latitude;
var Int32 v_longitude;
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_C2C_MODE' required for executing the TC ***");
stop;
}
// Test component configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
// Test Body
fx_computePositionUsingDistance(
v_longPosVectorNodeB.latitude,
v_longPosVectorNodeB.longitude,
29900,
0,
v_latitude,
v_longitude
);
v_securedGnPdu := f_prepareSecuredDenm(
cc_taCert_A,
{
m_header_field_generation_location(
valueof(m_threeDLocation(
v_latitude,
v_longitude,
'0000'O
))
)
},
e_certificate_digest_with_sha256
);
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
f_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() & ": 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_08_05_BV
* @desc Check that IUT discards Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is more than 30 km
* 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
* the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
* containing header_fields[generation_location].type
* indicating 'generation_location'
* and containing generation_location
* indicating position in 31 km from the current position of IUT
* @see ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_06_BO
testcase TC_SEC_ITSS_RCV_DENM_08_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
var integer i;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
var Int32 v_latitude;
var Int32 v_longitude;
if (not(PICS_GN_SECURITY) or not (PICS_ITS_C2C_MODE)) {
log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_ITS_C2C_MODE' required for executing the TC ***");
stop;
}
// Test component configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
// Test Body
fx_computePositionUsingDistance(
v_longPosVectorNodeB.latitude,
v_longPosVectorNodeB.longitude,
31000,
0,
v_latitude,
v_longitude
);
v_securedGnPdu := f_prepareSecuredDenm(
cc_taCert_A,
{
m_header_field_generation_location(
valueof(m_threeDLocation(
v_latitude,
v_longitude,
'0000'O
))
)
},
e_certificate_digest_with_sha256
);
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
f_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();
} // End of testcase TC_SEC_ITSS_RCV_DENM_08_06_BO
* @desc Check that IUT discards the Secured DENM containing empty payload of type 'signed'