diff --git a/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 b/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 index 95832747f074e15496ef3724f860d3f8cc02b48d..a2ad4fafa914fc9875486d8e8b63dda82147c9fc 100644 --- a/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 +++ b/ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn3 @@ -13,16 +13,13 @@ module ItsSecurity_TestCases { import from LibCommon_Sync all; import from LibCommon_BasicTypesAndValues all; + // LibIts + import from DENM_PDU_Descriptions language "ASN.1:1997" all; + import from ITS_Container language "ASN.1:1997" all; + // LibItsCommon import from LibItsCommon_Functions all; - // LibItsSecurity - import from LibItsSecurity_TypesAndValues all; - import from LibItsSecurity_Templates all; - import from LibItsSecurity_Functions all; - import from LibItsSecurity_Pixits all; - import from LibItsSecurity_Pics all; - // LibItsGeoNetworking import from LibItsGeoNetworking_TestSystem all; import from LibItsGeoNetworking_Functions all; @@ -37,18 +34,23 @@ module ItsSecurity_TestCases { // LibItsCam import from LibItsCam_Templates all; - import from LibItsCam_Functions { group camGenerators } ; + import from LibItsCam_Functions all; import from LibItsCam_Templates all; import from LibItsCam_Functions all; import from LibItsCam_TestSystem all; // LibItsDenm import from LibItsDenm_TypesAndValues all; - import from LibItsDenm_Templates { - template m_situation, m_denmLocation_zeroDelta, m_denm, m_denmMgmtCon, m_tsActionId - }; + import from LibItsDenm_Templates all; import from LibItsDenm_TestSystem all; + // LibItsSecurity + import from LibItsSecurity_TypesAndValues all; + import from LibItsSecurity_Templates all; + import from LibItsSecurity_Functions all; + import from LibItsSecurity_Pixits all; + import from LibItsSecurity_Pics all; + // AtsSecurity import from AtsSecurity_TestSystem all; import from AtsSecurity_Functions all; @@ -3099,7 +3101,7 @@ module ItsSecurity_TestCases { // Local variables - // Test control + // Test control if (not(PICS_GN_SECURITY) or not(PICS_USE_IDENTIFIED_REGION) or not(PICS_CERTIFICATE_SELECTION)) { log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_CERTIFICATE_SELECTION and PICS_CERTIFICATE_SELECTION' required for executing the TC ***"); stop; @@ -3176,7 +3178,7 @@ module ItsSecurity_TestCases { // Local variables - // Test control + // Test control if (not(PICS_GN_SECURITY) or PICS_CERTIFICATE_SELECTION) { log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and not PICS_CERTIFICATE_SELECTION ' required for executing the TC ***"); stop; @@ -3230,7 +3232,7 @@ module ItsSecurity_TestCases { // // Local variables // var ItsDenm v_denmComponent; // -// // Test control +// // Test control // if (not(PICS_GN_SECURITY)) { // log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); // stop; @@ -3315,7 +3317,7 @@ module ItsSecurity_TestCases { // Local variables var ItsDenm v_denmComponent; - // Test control + // Test control if (not(PICS_GN_SECURITY)) { log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; @@ -3417,13 +3419,13 @@ module ItsSecurity_TestCases { var Certificate v_certificate; var ItsDenm v_denmComponent; - // Test control + // Test control if (not(PICS_GN_SECURITY)) { log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Preamble @@ -4637,7 +4639,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); v_longPosVectorIut := f_getPosition(c_compIut); @@ -8529,7 +8531,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -8632,7 +8634,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -8745,7 +8747,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -8791,8 +8793,6 @@ module ItsSecurity_TestCases { * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01) * containing protocol_version * indicating 1 - * containing header_fields['its_aid'] - * indicating 'AID_CAM' * } then { * the IUT discards a SecuredMessage * } @@ -8815,7 +8815,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -8860,8 +8860,6 @@ module ItsSecurity_TestCases { * the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01) * containing protocol_version * indicating 3 - * containing header_fields['its_aid'] - * indicating 'AID_CAM' * } then { * the IUT discards a SecuredMessage * } @@ -8884,7 +8882,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -8962,7 +8960,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9053,7 +9051,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9140,7 +9138,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9227,7 +9225,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9313,7 +9311,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9406,7 +9404,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9496,7 +9494,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9589,7 +9587,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9687,7 +9685,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9787,7 +9785,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9892,7 +9890,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -9988,7 +9986,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10099,7 +10097,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10211,7 +10209,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10292,7 +10290,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10377,7 +10375,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10461,7 +10459,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10550,7 +10548,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10635,7 +10633,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10713,7 +10711,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10791,7 +10789,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10874,7 +10872,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -10955,7 +10953,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11036,7 +11034,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11129,7 +11127,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11222,7 +11220,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11315,7 +11313,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11408,7 +11406,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11497,7 +11495,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11569,7 +11567,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11644,7 +11642,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11727,7 +11725,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11807,7 +11805,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11889,7 +11887,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -11971,7 +11969,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12053,7 +12051,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12135,7 +12133,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12208,7 +12206,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12284,7 +12282,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12360,7 +12358,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12436,7 +12434,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12512,7 +12510,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12622,7 +12620,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12738,7 +12736,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12850,7 +12848,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -12962,7 +12960,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13074,7 +13072,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13142,7 +13140,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13210,7 +13208,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13288,7 +13286,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13386,7 +13384,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13478,7 +13476,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13576,7 +13574,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13671,7 +13669,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13768,7 +13766,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13863,7 +13861,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -13960,7 +13958,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14061,7 +14059,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14152,7 +14150,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14255,7 +14253,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14364,7 +14362,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14466,7 +14464,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14580,7 +14578,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14697,7 +14695,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14787,7 +14785,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14879,7 +14877,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -14976,7 +14974,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15062,7 +15060,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15141,7 +15139,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15220,7 +15218,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15301,7 +15299,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15336,7 +15334,7 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_DENM_07_01_EB + } // End of testcase TC_SEC_ITSS_RCV_DENM_07_01_BO /** * @desc Check that IUT discards a Secured DENM when its_aid value is undefined @@ -15379,7 +15377,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15429,18 +15427,16 @@ module ItsSecurity_TestCases { * when { * the IUT is requested to send DENM * } then { - * the IUT is receiving a SecuredMessage { + * 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 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 @@ -15465,7 +15461,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15509,18 +15505,16 @@ module ItsSecurity_TestCases { * when { * the IUT is requested to send DENM * } then { - * the IUT is receiving a SecuredMessage { + * 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 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 @@ -15545,7 +15539,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15589,18 +15583,16 @@ module ItsSecurity_TestCases { * when { * the IUT is requested to send DENM * } then { - * the IUT is receiving a SecuredMessage { + * 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 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 @@ -15625,7 +15617,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15669,18 +15661,16 @@ module ItsSecurity_TestCases { * when { * the IUT is requested to send DENM * } then { - * the IUT is receiving a SecuredMessage { + * 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 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 @@ -15705,7 +15695,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -15736,127 +15726,10 @@ module ItsSecurity_TestCases { 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 { - /** - * @desc Function used to verify the IUT has forwarded or discarded the received secured message sent by the TA - */ - group commonFunctions { - - /** - * @desc Behavior function for NodeD in case of forwarding is expected - * @see TC_GEONW_PON_GBC_BV_01 - */ - function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // 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_longPosVectorNodeB - ), - ?, - 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 - - /** - * @desc Behavior function for NodeD in case of forwarding is not expected - * @see TC_GEONW_PON_GBC_BV_01 - */ - function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_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_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwSecPdu( - mdw_securedMessage_dummy, - mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition_withDelta( - v_longPosVectorIut - ), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Beacon message shall ot be forwarded ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwSecPdu( - mdw_securedMessage_dummy - ))) { - // Do not restart tc_ac timer - log("*** " & testcasename() & ": INFO: Unexpected GN message ignored ***"); - repeat; - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Secured message was discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD - - } // End of goup commonFunctions - - /** - * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate without region validity restriction + * @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) *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY and PICS_ITS_C2C_MODE
              * Config Id: CF01
              * Expected behavior:
              * with {
@@ -15865,3659 +15738,10278 @@ module ItsSecurity_TestCases {
              * }
              * 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 containing validity_restrictions['time_start_and_end']
-             *                          indicating CERT_TS_AT_TIME_VALIDITY
-             *             and not containing validity_restrictions['region']
-             *       and containing header_fields [1]
-             *         containing type 
-             *           indicating 'generation_time'
-             *              containing generation_time
-             *                  indicating CURRENT_TIME
-             *                      inside CERT_TS_AT_TIME_VALIDITY
-             *       and containing header_fields [2]
-             *           containing type 
-             *               indicating 'generation_location'
-             *                   containing generation_location
-             *           and containing generation_location
-             *       and containing header_fields[3]
-             *           containing type 
-             *               indicating 'its_aid'
-             *           and 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
+             *     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
              *   }
              * }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_01_BV + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_05_BV * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_01_01_BV() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_08_05_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + 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; + // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + 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 - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB(cc_taCert_A)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // 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)); - // Cleanup - f_cf02Down(); + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_01_01_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_08_05_BV /** - * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a circular region validity restriction + * @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 *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
              * Expected behavior:
              * with {
              *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_B_AT
-             *   and the IUT current location is inside the region validity period of CERT_TS_B_AT
+             *   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 protocol_version 
-             *             indicating value '2'
-             *         and containing header_fields[0]
-             *              containing type 
-             *                  indicating 'signer_info'
-             *              and containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_B_AT)
-             *                      containing subject_info.subject_type
-             *                          indicating 'authorization_ticket' (2)
-             *                      and containing subject_attributes['verification key'] (KEY)
-             *                      and containing validity_restrictions['time_start_and_end']
-             *                          indicating CERT_TS_AT_TIME_VALIDITY
-             *                      and containing validity_restrictions['region']
-             *                          containing region
-             *                              containing region_type
-             *                                  indicating 'circle'
-             *                              and containing circular_region
-             *                                  indicating REGION
-             *       and containing header_fields [1]
-             *         containing type 
-             *           indicating 'generation_time'
-             *              containing generation_time
-             *                  indicating CURRENT_TIME
-             *       and containing header_fields [2]
-             *           containing type 
-             *               indicating 'generation_location'
-             *           and containing generation_location
-             *       and containing header_fields[3]
-             *           containing type 
-             *               indicating 'its_aid'
-             *           and 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
+             *     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
              *   } then {
-             *     the IUT accepts the message
+             *     the IUT discards the message
              *   }
              * }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_02_BV + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_08_06_BO * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_01_02_BV() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_08_06_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + 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; + // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB(cc_taCert_B)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // 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)); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_01_02_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_08_06_BO /** - * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + * @desc Check that IUT discards the Secured DENM containing empty payload of type 'signed' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_C_AT
-             *   and the IUT current location is inside the region validity period of CERT_TS_C_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing protocol_version 
-             *             indicating value '2'
-             *         and containing header_fields[0]
-             *              containing type 
-             *                  indicating 'signer_info'
-             *              and containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_C_AT)
-             *                      containing subject_info.subject_type
-             *                          indicating 'authorization_ticket' (2)
-             *                      and containing subject_attributes['verification key'] (KEY)
-             *                      and containing validity_restrictions['time_start_and_end']
-             *                          indicating CERT_TS_AT_TIME_VALIDITY
-             *                      and containing validity_restrictions['region']
-             *                          containing region
-             *                              containing region_type
-             *                                  indicating 'rectangle'
-             *                              and containing rectangular_region
-             *                                  indicating REGION
-             *       and containing header_fields [1]
-             *         containing type 
-             *           indicating 'generation_time'
-             *              containing generation_time
-             *                  indicating CURRENT_TIME
-             *       and containing header_fields [2]
-             *           containing type 
-             *               indicating 'generation_location'
-             *           and containing generation_location
-             *       and containing header_fields[3]
-             *           containing type 
-             *               indicating 'its_aid'
-             *           and 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
-             *   } then {
-             *     the IUT accepts the message
-             *   }
-             * }
+             * 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_01) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed'
+             *              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_GENMSG_01_03_BV + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_09_02_BO * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_01_03_BV() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_09_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB(cc_taCert_C)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + // Add the DENM payload + v_gnNonSecuredPacket.payload := valueof( + f_adaptPayload_m( + bit2oct( + encvalue( + m_denmReq( + m_denmPdu( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ))))))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredDenm( + v_securedMessage, + m_payload_signed( + ''O + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_01_03_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_09_02_BO /** - * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + * @desc Check that IUT discards the Secured DENM containing payload of type 'unsecured' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_D_AT
-             *   and the IUT current location is inside the region validity period of CERT_TS_D_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing protocol_version 
-             *             indicating value '2'
-             *         and containing header_fields[0]
-             *              containing type 
-             *                  indicating 'signer_info'
-             *              and containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_D_AT)
-             *                      containing subject_info.subject_type
-             *                          indicating 'authorization_ticket' (2)
-             *                      and containing subject_attributes['verification key'] (KEY)
-             *                      and containing validity_restrictions['time_start_and_end']
-             *                          indicating CERT_TS_AT_TIME_VALIDITY
-             *                      and containing validity_restrictions['region']
-             *                          containing region
-             *                              containing region_type
-             *                                  indicating 'polygon'
-             *                              and containing polygonal_region
-             *                                  indicating REGION
-             *       and containing header_fields [1]
-             *         containing type 
-             *           indicating 'generation_time'
-             *              containing generation_time
-             *                  indicating CURRENT_TIME
-             *       and containing header_fields [2]
-             *           containing type 
-             *               indicating 'generation_location'
-             *           and containing generation_location
-             *       and containing header_fields[3]
-             *           containing type 
-             *               indicating 'its_aid'
-             *           and containing its_aid
-             *               indicating 'AID_BEACON'
-             *          and containing payload_field 
-             *               containing type
-             *                  indicating 'signed'
-             *              containing data
+             * 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_01) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'unsecured'
+             *              and containing data
              *                  indicating length > 0
-             *          and containing trailer_fields 
-             *              containing single instance of type TrailerField 
-             *                  containing type
-             *                      indicating 'signature'
-             *                  containing signature
-             *                      verifiable using KEY
-             *   } then {
-             *     the IUT accepts the message
-             *   }
-             * }
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_04_BV + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_09_03_BO * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_01_04_BV() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_09_03_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB(cc_taCert_D)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + // Add the DENM payload + v_gnNonSecuredPacket.payload := valueof( + f_adaptPayload_m( + bit2oct( + encvalue( + m_denmReq( + m_denmPdu( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ))))))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredDenm( + v_securedMessage, + m_payload_unsecured( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_01_04_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_09_03_BO /** - * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + * @desc Check that IUT discards the Secured DENM containing payload of type 'encrypted' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_E_AT
-             *   and the IUT current location is inside the region validity period of CERT_TS_E_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing protocol_version 
-             *             indicating value '2'
-             *         and containing header_fields[0]
-             *              containing type 
-             *                  indicating 'signer_info'
-             *              and containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_E_AT)
-             *                      containing subject_info.subject_type
-             *                          indicating 'authorization_ticket' (2)
-             *                      and containing subject_attributes['verification key'] (KEY)
-             *                      and containing validity_restrictions['time_start_and_end']
-             *                          indicating CERT_TS_AT_TIME_VALIDITY
-             *                      and containing validity_restrictions['region']
-             *                          containing region
-             *                              containing region_type
-             *                                  indicating 'id_region'
-             *                              and containing id_region
-             *                                  indicating REGION
-             *       and containing header_fields [1]
-             *         containing type 
-             *           indicating 'generation_time'
-             *              containing generation_time
-             *                  indicating CURRENT_TIME
-             *       and containing header_fields [2]
-             *           containing type 
-             *               indicating 'generation_location'
-             *           and containing generation_location
-             *       and containing header_fields[3]
-             *           containing type 
-             *               indicating 'its_aid'
-             *           and containing its_aid
-             *               indicating 'AID_BEACON'
-             *          and containing payload_field 
-             *               containing type
-             *                  indicating 'signed'
-             *              containing data
+             * 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_01) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'encrypted'
+             *              and containing data
              *                  indicating length > 0
-             *          and containing trailer_fields 
-             *              containing single instance of type TrailerField 
-             *                  containing type
-             *                      indicating 'signature'
-             *                  containing signature
-             *                      verifiable using KEY
-             *   } then {
-             *     the IUT accepts the message
-             *   }
-             * }
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_05_BV + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_09_04_BO * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_01_05_BV() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_09_04_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_0x_BV_nodeB(cc_taCert_E)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_01_05_BV - - group g_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV { + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + // Add the DENM payload + v_gnNonSecuredPacket.payload := valueof( + f_adaptPayload_m( + bit2oct( + encvalue( + m_denmReq( + m_denmPdu( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ))))))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredDenm( + v_securedMessage, + m_payload_encrypted( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB( - in charstring p_taCert - ) runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - - // Preamble - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_sendSecuredBeacon(p_taCert, omit, e_certificate); + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } // End of 'for' statement + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_09_04_BO /** - * @desc Check that IUT discards a Secured GN Message containing protocol version set to a value less than 2 + * @desc Check that IUT discards the Secured DENM containing payload of type 'signed_external' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing protocol_version 
-             *             indicating 1
-             *   } then {
-             *     the IUT discards the message
-             *   }
-             * }
+             * 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_01) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed_external'
+             *              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_GENMSG_02_01_BO + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_09_05_BO * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_02_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_09_05_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO_nodeB(c_protocol_version - 1)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + // Add the DENM payload + v_gnNonSecuredPacket.payload := valueof( + f_adaptPayload_m( + bit2oct( + encvalue( + m_denmReq( + m_denmPdu( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ))))))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredDenm( + v_securedMessage, + m_payload_signed_external( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_02_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_09_05_BO /** - * @desc Check that IUT discards a Secured GN Message containing protocol version set to a value greater than 2 + * @desc Check that IUT discards the Secured DENM containing exactly one non-empty payload of type 'signed_and_encrypted' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing protocol_version 
-             *             indicating 3
-             *   } then {
-             *     the IUT discards the message
-             *   }
-             * }
-             * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_02_02_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * 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_01) + * containing payload_field + * containing type + * indicating 'signed_and_encrypted' + * 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_DENM_09_06_BO + * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_02_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_09_06_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_02_0x_BO_nodeB(c_protocol_version + 1)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_02_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO { + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + // Add the DENM payload + v_gnNonSecuredPacket.payload := valueof( + f_adaptPayload_m( + bit2oct( + encvalue( + m_denmReq( + m_denmPdu( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ))))))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredDenm( + v_securedMessage, + m_payload_signed_and_encrypted( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO_nodeB( - in integer p_protocolVersion - ) runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - - // Preamble - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_sendSecuredBeacon_Bo(cc_taCert_A, p_protocolVersion); + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO_nodeB + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_02_0x_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_09_06_BO /** - * @desc Check that IUT discards a secured GN Message if the header_fields contains more than one header field of type 'signer_info' + * @desc Check that IUT discards the Secured DENM if the message does not contain the trailer field of type signature *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[2].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[3].type
-             *              indicating ''generation_location''
-             *          and containing header_fields[4].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+            *            containing trailer_fields
+            *                not containing any instance of type TrailerField
+            *                    containing type
+            *                        indicating 'signature'
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
              * 
- * - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_01_BO - * @reference ETSI TS 103 097 [1], clause 7.1 + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_10_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_10_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_01_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_01_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_01_BO { + // Test Body + v_securedGnPdu := f_sendSecuredDenm_Bo(cc_taCert_A, -, 0); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_01_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_signer_info( - m_signerInfo_digest( - vc_atCertificate.signer_info.signerInfo.digest - )), - m_header_field_signer_info( - m_signerInfo_certificate( - vc_aaCertificate - )), - m_header_field_generation_time(1000 * f_getCurrentTime()), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_01_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_10_01_BO /** - * @desc Check that IUT discards a secured GN Message if the header_fields does not contain the header field of type 'signer_info' + * @desc Check that IUT discards the Secured DENM containing more than one instance of TrailerField of type 'signature' *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          and containing header_fields[0].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_location'
-             *          and containing header_fields[2].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[3].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+            *          containing trailer_fields[0].type
+            *              containing type
+            *                  indicating 'signature'
+            *          and containing trailer_fields[1].type
+            *              containing type
+            *                  indicating 'signature'
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
              * 
- * - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_02_BO - * @reference ETSI TS 103 097 [1], clause 7.1 + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_10_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_10_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_02_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_02_BO { + // Test Body + v_securedGnPdu := f_sendSecuredDenm_Bo(cc_taCert_A, -, 2); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_02_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_generation_time(1000 * f_getCurrentTime()), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_02_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_02_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_10_02_BO /** - * @desc Check that IUT is able to receive a secured GN Message if the signer_info header field is not encoded first. + * @desc Check that the IUT discards Secured DENM containing signature that is not verified using the verification key from the certificate contained in the message's signer info *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          and containing header_fields[0].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_location'
-             *          and containing header_fields[2].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and containing header_fields[3].type
-             *              indicating 'signer_info'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             * Expected behavior:
+             *   with {
+             *     the IUT being in the 'authorized' state
+             *     and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             *   }
+             *   ensure that {
+             *     when {
+             *         the IUT is receiving a SecuredMessage  (MSG_SEC_RCV_DENM_01)
+            *               containing header_fields ['signer_info']
+            *                   containing certificate (CERT_TS_A_AT)
+            *                       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
+             *   }
+             * }
              * 
- * - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_03_BO - * @reference ETSI TS 103 097 [1], clause 7.1 + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_11_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_DENM_11_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_04_03_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredDenm_Bo( + cc_taCert_A, + -, + 1, + -, + e_certificate + ); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_DENM_11_01_BO - group g_TC_SEC_ITSS_RCV_GENMSG_04_03_BO { + /** + * @desc Check that IUT discards a Secured DENM if the signer certificate of the message contains the subject type 'enrolment_credential' + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *         the IUT is receiving a SecuredMessage  (MSG_SEC_RCV_DENM_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'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_12_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_12_01_BO() runs on ItsGeoNetworking system ItsSecSystem { - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_03_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm( + cc_taCert_EC, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_its_aid_DENM + }, + e_certificate + ); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": 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_12_01_BO + + /** + * @desc Check that IUT discards a Secured DENM if the signer certificate of the message contains the subject type "authorization_authority" + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *         the IUT is receiving a SecuredMessage  (MSG_SEC_RCV_DENM_01)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  containing certificate (CERT_TS_A_AA)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_authority'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_12_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_12_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm( + cc_taCert_AA, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_its_aid_DENM + }, + e_certificate + ); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": 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_12_02_BO + + /** + * @desc Check that IUT discards a Secured DENM if the signer certificate of the message contains the subject type 'enrolment_authority' + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *              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_DENM_12_03_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_12_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 component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm( + cc_taCert_EA, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_its_aid_DENM + }, + e_certificate + ); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": 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_12_03_BO + + /** + * @desc Check that IUT discards a Secured DENM if the signer certificate of the message contains the subject type 'root_ca' + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *              and certificate (CERT_TS_ROOT)
+             *                  containing subject_info.subject_type
+             *                      indicating 'root_ca'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_12_04_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_12_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 component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm( + cc_taCert_CA, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_its_aid_DENM + }, + e_certificate + ); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": 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_12_04_BO + + /** + * @desc Check that IUT discards secured DENM signed with the not yet valid certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_01_BO_AT)
+             *                      containing validity_restrictions['time_start_and_end']
+             *                          containing start_validity
+             *                              indicating START_VALIDITY_AT > CURRENT_TIME
+             *                          and containing end_validity
+             *                              indicating END_VALIDITY_AT > START_VALIDITY_AT
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1301_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 + } + 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_13_01_BO + + /** + * @desc Check that IUT discards secured DENM signed with the expired certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_02_BO_AT)
+             *                      containing validity_restrictions['time_start_and_end']
+             *                          containing start_validity
+             *                              indicating START_VALIDITY_AT < CURRENT_TIME
+             *                          and containing end_validity
+             *                              indicating END_VALIDITY_AT < START_VALIDITY_AT
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1302_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 + } + 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_13_02_BO + + /** + * @desc Check that IUT discards secured DENM when IUT location is outside the circular validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_03_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              and containing circular_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_03_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_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 component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1303_BO, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + 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_13_03_BO + + /** + * @desc Check that IUT discards secured DENM when IUT location is outside the rectangular validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_04_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              and containing polygonal_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_04_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_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 component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1304_BO, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + 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_13_04_BO + + /** + * @desc Check that IUT discards secured DENM when IUT location is outside the polygonal validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_05_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              and containing rectanglar_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_05_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_05_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1305_BO, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + 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_13_05_BO + + /** + * @desc Check that IUT discards secured DENM when IUT location is outside the identified validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *     when {
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_01)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_06_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_DENM_13_06_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_DENM_13_06_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredDenm(cc_taCertMsg1306_BO, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + 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_13_06_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 { + + /** + * @desc Function used to verify the IUT has forwarded or discarded the received secured message sent by the TA + */ + group commonFunctions { + + /** + * @desc Behavior function for NodeD in case of forwarding is expected + * @see TC_GEONW_PON_GBC_BV_01 + */ + function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BV_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // 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_longPosVectorNodeB + ), + ?, + 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 + + /** + * @desc Behavior function for NodeD in case of forwarding is not expected + * @see TC_GEONW_PON_GBC_BV_01 + */ + function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_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_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwSecPdu( + mdw_securedMessage_dummy, + mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition_withDelta( + v_longPosVectorIut + ), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Beacon message shall ot be forwarded ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwSecPdu( + mdw_securedMessage_dummy + ))) { + // Do not restart tc_ac timer + log("*** " & testcasename() & ": INFO: Unexpected GN message ignored ***"); + repeat; + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Secured message was discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD + + } // End of goup commonFunctions + + /** + * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate without region validity restriction + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *          containing header_fields[0]
+             *              containing type 
+             *                  indicating 'signer_info'
+             *              and containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_AT_A)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_ticket' (2)
+             *                      and containing subject_attributes['verification key'] (KEY)
+             *                      and containing validity_restrictions['time_start_and_end']
+             *                          indicating CERT_TS_AT_TIME_VALIDITY
+             *             and not containing validity_restrictions['region']
+             *       and containing header_fields [1]
+             *         containing type 
+             *           indicating 'generation_time'
+             *              containing generation_time
+             *                  indicating CURRENT_TIME
+             *                      inside CERT_TS_AT_TIME_VALIDITY
+             *       and containing header_fields [2]
+             *           containing type 
+             *               indicating 'generation_location'
+             *                   containing generation_location
+             *           and containing generation_location
+             *       and containing header_fields[3]
+             *           containing type 
+             *               indicating 'its_aid'
+             *           and 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
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * 
+ * @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_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_0x_BV_nodeB(cc_taCert_A)); + 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 + + /** + * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a circular region validity restriction + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_B_AT
+             *   and the IUT current location is inside the region validity period of CERT_TS_B_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating value '2'
+             *         and containing header_fields[0]
+             *              containing type 
+             *                  indicating 'signer_info'
+             *              and containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_B_AT)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_ticket' (2)
+             *                      and containing subject_attributes['verification key'] (KEY)
+             *                      and containing validity_restrictions['time_start_and_end']
+             *                          indicating CERT_TS_AT_TIME_VALIDITY
+             *                      and containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              and containing circular_region
+             *                                  indicating REGION
+             *       and containing header_fields [1]
+             *         containing type 
+             *           indicating 'generation_time'
+             *              containing generation_time
+             *                  indicating CURRENT_TIME
+             *       and containing header_fields [2]
+             *           containing type 
+             *               indicating 'generation_location'
+             *           and containing generation_location
+             *       and containing header_fields[3]
+             *           containing type 
+             *               indicating 'its_aid'
+             *           and 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
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_02_BV + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_01_02_BV() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_0x_BV_nodeB(cc_taCert_B)); + 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_02_BV + + /** + * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_C_AT
+             *   and the IUT current location is inside the region validity period of CERT_TS_C_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating value '2'
+             *         and containing header_fields[0]
+             *              containing type 
+             *                  indicating 'signer_info'
+             *              and containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_C_AT)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_ticket' (2)
+             *                      and containing subject_attributes['verification key'] (KEY)
+             *                      and containing validity_restrictions['time_start_and_end']
+             *                          indicating CERT_TS_AT_TIME_VALIDITY
+             *                      and containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              and containing rectangular_region
+             *                                  indicating REGION
+             *       and containing header_fields [1]
+             *         containing type 
+             *           indicating 'generation_time'
+             *              containing generation_time
+             *                  indicating CURRENT_TIME
+             *       and containing header_fields [2]
+             *           containing type 
+             *               indicating 'generation_location'
+             *           and containing generation_location
+             *       and containing header_fields[3]
+             *           containing type 
+             *               indicating 'its_aid'
+             *           and 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
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_03_BV + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_01_03_BV() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_0x_BV_nodeB(cc_taCert_C)); + 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_03_BV + + /** + * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_D_AT
+             *   and the IUT current location is inside the region validity period of CERT_TS_D_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating value '2'
+             *         and containing header_fields[0]
+             *              containing type 
+             *                  indicating 'signer_info'
+             *              and containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_D_AT)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_ticket' (2)
+             *                      and containing subject_attributes['verification key'] (KEY)
+             *                      and containing validity_restrictions['time_start_and_end']
+             *                          indicating CERT_TS_AT_TIME_VALIDITY
+             *                      and containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              and containing polygonal_region
+             *                                  indicating REGION
+             *       and containing header_fields [1]
+             *         containing type 
+             *           indicating 'generation_time'
+             *              containing generation_time
+             *                  indicating CURRENT_TIME
+             *       and containing header_fields [2]
+             *           containing type 
+             *               indicating 'generation_location'
+             *           and containing generation_location
+             *       and containing header_fields[3]
+             *           containing type 
+             *               indicating 'its_aid'
+             *           and 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
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_04_BV + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_01_04_BV() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_0x_BV_nodeB(cc_taCert_D)); + 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_04_BV + + /** + * @desc Check that IUT accepts a well-formed Secured GN Beacon signed with the certificate with a rectangular region validity restriction + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_E_AT
+             *   and the IUT current location is inside the region validity period of CERT_TS_E_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating value '2'
+             *         and containing header_fields[0]
+             *              containing type 
+             *                  indicating 'signer_info'
+             *              and containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_E_AT)
+             *                      containing subject_info.subject_type
+             *                          indicating 'authorization_ticket' (2)
+             *                      and containing subject_attributes['verification key'] (KEY)
+             *                      and containing validity_restrictions['time_start_and_end']
+             *                          indicating CERT_TS_AT_TIME_VALIDITY
+             *                      and containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'id_region'
+             *                              and containing id_region
+             *                                  indicating REGION
+             *       and containing header_fields [1]
+             *         containing type 
+             *           indicating 'generation_time'
+             *              containing generation_time
+             *                  indicating CURRENT_TIME
+             *       and containing header_fields [2]
+             *           containing type 
+             *               indicating 'generation_location'
+             *           and containing generation_location
+             *       and containing header_fields[3]
+             *           containing type 
+             *               indicating 'its_aid'
+             *           and 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
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_01_05_BV + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_01_05_BV() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_0x_BV_nodeB(cc_taCert_E)); + 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_05_BV + + group g_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB( + in charstring p_taCert + ) runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredBeacon(p_taCert, omit, e_certificate); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_01_0x_BV + + /** + * @desc Check that IUT discards a Secured GN Message containing protocol version set to a value less than 2 + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating 1
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_02_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_02_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_02_0x_BO_nodeB(c_protocol_version - 1)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_02_01_BO + + /** + * @desc Check that IUT discards a Secured GN Message containing protocol version set to a value greater than 2 + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing protocol_version 
+             *             indicating 3
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_02_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_02_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_02_0x_BO_nodeB(c_protocol_version + 1)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_02_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO_nodeB( + in integer p_protocolVersion + ) runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredBeacon_Bo(cc_taCert_A, p_protocolVersion); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_02_0x_BO_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_02_0x_BV + + /** + * @desc Check that IUT discards a secured GN Message if the header_fields contains more than one header field of type 'signer_info' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[3].type
+             *              indicating ''generation_location''
+             *          and containing header_fields[4].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_01_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_01_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_01_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_01_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_signer_info( + m_signerInfo_digest( + vc_atCertificate.signer_info.signerInfo.digest + )), + m_header_field_signer_info( + m_signerInfo_certificate( + vc_aaCertificate + )), + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_01_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_01_BO + + /** + * @desc Check that IUT discards a secured GN Message if the header_fields does not contain the header field of type 'signer_info' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          and containing header_fields[0].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[2].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[3].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_02_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_02_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_02_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_02_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_02_BO + + /** + * @desc Check that IUT is able to receive a secured GN Message if the signer_info header field is not encoded first. + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          and containing header_fields[0].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[2].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and containing header_fields[3].type
+             *              indicating 'signer_info'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_03_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_03_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_03_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_03_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other, + m_header_field_signer_info( + m_signerInfo_digest( + vc_atCertificate.signer_info.signerInfo.digest + )) + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_03_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_03_BO + + /** + * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_time' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[3].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[4].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_04_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_04_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_04_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_04_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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(1000 * f_getCurrentTime() - 1), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_04_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_04_BO + + /** + * @desc Check that IUT discards a secured GN Message if the message does not contain the header field of type 'generation_time' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_05_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_05_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_05_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_05_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_05_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_05_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_signer_info( + m_signerInfo_digest( + vc_atCertificate.signer_info.signerInfo.digest + )), + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_05_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_05_BO + + /** + * @desc Check that IUT discards a Secured GN Message if the message contains more than one header field of type 'its_aid' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[3]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and containing header_fields[4].type
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_06_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_06_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_06_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_06_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_06_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_06_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other, + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_06_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_06_BO + + /** + * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_location' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[3].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[4]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_07_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_07_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_07_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_07_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_07_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_07_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0100'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_07_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_07_BO + + /** + * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_location' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2].type
+             *          and containing header_fields[4].type
+             *              indicating 'its_aid'
+             *                  containing its_aid
+             *                      indicating 'AID_BEACON'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_08_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_04_08_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_04_08_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_08_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_04_08_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_04_08_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_08_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_08_BO + + /** + * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'self' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields['signer_info']
+             *              containing signer.type
+             *                  indicating 'self''
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_05_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_05_01_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_01_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_05_01_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_05_01_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_signer_info( + m_signerInfo_self + ), + m_header_field_generation_time(1000 * f_getCurrentTime()), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_self, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_01_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_01_BO + + /** + * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'certificate_digest_with_other_algorithm' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields['signer_info']
+             *              containing signer.type
+             *                  indicating 'certificate_digest_with_other_algorithm'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_05_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_05_02_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_05_02_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_05_02_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_self, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_02_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_02_BO + + /** + * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'certificate_chain' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields['signer_info']
+             *              containing signer.type
+             *                  indicating 'certificate_chain'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_05_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_05_03_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_03_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_05_03_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_05_03_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + 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_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_self, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_03_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_03_BO + + /** + * @desc Check that IUT discards a secured GN Message containing generation_time before the message signing certificate validity period + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A)
+             *          containing header_fields['signer_info'].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_A_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 < TIME_CERT_TS_AT_START
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_06_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_06_01_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_01_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_06_01_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_06_01_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_signer_info( + m_signerInfo_digest( + vc_atCertificate.signer_info.signerInfo.digest + )), + m_header_field_generation_time( // TODO Try to refine access to the certificate validity_restrictions['time_start_and_end'] field access + (vc_atCertificate.signer_info.signerInfo.certificate.validity_restrictions[0].validity.time_start_and_end.start_validity - 3600) * 1000 + ), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_01_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_01_BO + + /** + * @desc Check that IUT discards the secured GN Message containing generation_time after the message signing certificate validity period + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing header_fields['signer_info'].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_A_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 > TIME_CERT_TS_E_ATND
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_06_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_06_02_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_06_02_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_06_02_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_signer_info( + m_signerInfo_digest( + vc_atCertificate.signer_info.signerInfo.digest + )), + m_header_field_generation_time( // TODO Try to refine access to the certificate validity_restrictions['time_start_and_end'] field access + (vc_atCertificate.signer_info.signerInfo.certificate.validity_restrictions[0].validity.time_start_and_end.end_validity + 3600) * 1000 + ), // In us + m_header_field_generation_location( + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_02_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_02_BO + + /** + * @desc Check that IUT discards Secured GN Message if the generation_time is more than 10 minute in the past (C2C only) + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC 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_GENMSG_A) 
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating TIME_1 (TIME_1 < CUR_TIME - 10min)
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_06_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_ITS_C2C_MODE)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' and 'PICS_ITS_C2C_MODE' 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_06_03_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_03_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_06_03_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_06_03_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_generation_time( + (1000 * f_getCurrentTime() - 600) * 1000 + ) // In us + }, + e_certificate + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_03_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_03_BO + + /** + * @desc Check that IUT discards Secured GN Message if the generation_time is more than 10 minute in the future(C2C only) + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC 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_GENMSG_A) 
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating TIME_1 (TIME_1 > CUR_TIME + 10min)
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_06_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_ITS_C2C_MODE)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' and 'PICS_ITS_C2C_MODE' 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_06_04_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_04_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_06_04_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_06_04_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_generation_time( + (1000 * f_getCurrentTime() + 600) * 1000 + ) // In us + }, + e_certificate + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_04_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_04_BO + + /** + * @desc Check that IUT discards SecuredMessage when its_aid value is undefined + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A)
+             *          containing header_fields['its_aid']
+             *              indicating indicating 'AID_UNDEFINED'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_07_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_07_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_07_01_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_07_01_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_07_01_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_07_01_BO() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + cc_taCert_A, + { + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256 + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_07_01_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_07_01_BO + + /** + * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the circular validity region of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_B_AT
+             *    and the IUT current location is inside the validiti region of CERT_TS_B_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_B)) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_B_AT)
+             *                      containing validity_restrictions ['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              and containing circular_region
+             *                                  indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              indicating location outside of the REGION
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_08_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_08_xx_BO(cc_taCert_B)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_01_BO + + /** + * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the rectangular validity region of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_C_AT
+             *    and the IUT current location is inside the validiti region of CERT_TS_C_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_C)) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_C_AT)
+             *                      containing validity_restrictions ['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              and containing rectanglar_region
+             *                                  indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              indicating location outside of the REGION
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_08_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_08_xx_BO(cc_taCert_C)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_02_BO + + /** + * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the rectangular validity region of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_D_AT
+             *    and the IUT current location is inside the validiti region of CERT_TS_D_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_D)) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_D_AT)
+             *                      containing validity_restrictions ['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              and containing polygonal_region
+             *                                  indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              indicating location outside of the REGION
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_08_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_08_xx_BO(cc_taCert_D)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_03_BO + + /** + * @desc Check that IUT discards Secured GN Message if the optional HeaderField generation_location is outside of the identified validity region of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_E_AT
+             *    and the IUT current location is inside the validiti region of CERT_TS_E_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_E)) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing certificate (CERT_TS_E_AT)
+             *                      containing validity_restrictions ['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'id_region'
+             *                              and containing identified_region
+             *                                  indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              indicating location outside of the REGION
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_08_xx_BO(cc_taCert_E)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO( + in charstring p_taCert + ) runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + p_taCert, + { + 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_location( + valueof(m_threeDLocation( + PX_WGSLATITUDE, + PX_WGSLONGITUDE, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate_digest_with_sha256, + false + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO + + /** + * @desc Check that IUT discards the Secured GN Message containing empty payload of type 'signed' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed'
+             *              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_GENMSG_09_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_09_02_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsGeoNetworking { + + // Local variables + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredOtherMessage( + v_securedMessage, + m_payload_signed( + ''O + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO + + /** + * @desc Check that IUT discards the Secured GN Message containing payload element of type 'unsecured' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          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_GENMSG_09_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_09_03_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsGeoNetworking { + + // Local variables + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredOtherMessage( + v_securedMessage, + m_payload_unsecured( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO + + /** + * @desc Check that IUT discards the Secured GN Message containing payload element of type 'encrypted' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'encrypted'
+             *              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_GENMSG_09_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_09_04_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsGeoNetworking { + + // Local variables + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredOtherMessage( + v_securedMessage, + m_payload_encrypted( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO + + /** + * @desc Check that IUT accepts a well-formed Secured GN Message containing payload of type signed_external + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed_external'
+             *              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_GENMSG_09_05_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_09_05_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_09_05_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_05_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_09_05_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_09_05_BO() runs on ItsGeoNetworking { + + // Local variables + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredOtherMessage( + v_securedMessage, + m_payload_signed_external( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_05_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_05_BO + + /** + * @desc Check that IUT accepts a well-formed Secured GN Message containing payload of type signed_and_encrypted + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed_and_encrypted'
+             *              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_GENMSG_09_06_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_09_06_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_09_06_BO()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_06_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_09_06_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_09_06_BO() runs on ItsGeoNetworking { + + // Local variables + var GnNonSecuredPacket v_gnNonSecuredPacket; + var octetstring v_gnPayload; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + var template (value) SecuredMessage v_securedMessage; + var GeoNetworkingPdu v_securedGnPdu; + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_gnNonSecuredPacket := valueof( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea( + c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) + ))); + + // Encode it + v_gnPayload := bit2oct( + encvalue( + v_gnNonSecuredPacket + ) + ); + f_buildGnSecuredOtherMessage( + v_securedMessage, + m_payload_signed_and_encrypted( + v_gnPayload + ), + e_certificate_digest_with_sha256, + valueof(m_threeDLocation( + v_longPosVectorNodeB.latitude, + v_longPosVectorNodeB.longitude, + '0000'O + )) + ); + v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_06_BO + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_06_BO + + /** + * @desc Check that IUT discards the Secured GN Message if the message does not contain the trailer field of type 'signature' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing trailer_fields
+             *             not containing trailer_fields['signature']
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_10_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_10_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_10_0x_BO_nodeB(0)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_10_01_BO + + /** + * @desc Check that IUT discards the Secured GN Message containing more than one instance of TrailerField of type 'signature' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage
+             *         containing trailer_fields[0]
+             *             containing type
+             *                 indicating 'signature'
+             *             and containing trailer_fields[1]
+             *                 containing type
+             *                     indicating 'signature'
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_10_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_10_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_10_0x_BO_nodeB(2)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_10_02_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO_nodeB( + in integer p_trailerStatus + ) runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + + // Preamble + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredBeacon_Bo(cc_taCert_A, -, p_trailerStatus); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_10_0x_BV + + /** + * @desc Check that the IUT discards Secured GN Message containing signature that is not verified using the verification key from the certificate contained in the message's signer info + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage
+            *            the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+            *                containing header_fields ['signer_info']
+            *                    containing certificate
+            *                        containing subject_attributes['verification key'] 
+            *                            containing key (KEY)
+            *                and containing trailer_fields[0]
+            *                    containing type
+            *                        indicating 'signature'
+            *                    and containing signature
+            *                        NOT verifiable using KEY
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_11_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_11_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_11_0x_BO_nodeB()); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_11_01_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO_nodeB() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + + // Preamble + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredBeacon_Bo( + cc_taCert_A, + -, + 1, + -, + e_certificate + ); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_11_0x_BV + + /** + * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'enrolment_credential' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *          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'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_12_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCert_EC)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_01_BO + + /** + * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'authorization_authority' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  containing certificate (CERT_TS_A_AA)
+             *                      containing subject_info.subject_type
+             *                          indicating 'enrolment_credentials'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_12_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCert_AA)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_02_BO + + /** + * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'enrolment_authority' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  containing certificate (CERT_TS_A_EA)
+             *                      containing subject_info.subject_type
+             *                          indicating 'enrolment_credentials'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_03_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_12_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCert_EA)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_03_BO + + /** + * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'root_ca' + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *          containing header_fields['signer_info']
+             *              containing signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  containing certificate (CERT_TS_A_CA)
+             *                      containing subject_info.subject_type
+             *                          indicating 'enrolment_credentials'
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_04_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_12_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCert_CA)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_04_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB( + in charstring p_taCert + ) runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingPdu v_securedGnPdu; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB + + // Preamble + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredBeacon( + p_taCert, + { + 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_location( + valueof(m_threeDLocation( + PX_WGSLATITUDE, + PX_WGSLONGITUDE, + '0000'O + )) + ), + m_header_field_its_aid_Other + }, + e_certificate, + true + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_12_0x_BV + + /** + * @desc Check that IUT discards secured message signed with the not yet valid certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_01_BO_AT)
+             *                      containing validity_restrictions['time_start_and_end']
+             *                          containing start_validity
+             *                              indicating START_VALIDITY_AT > CURRENT_TIME
+             *                          and containing end_validity
+             *                              indicating END_VALIDITY_AT > START_VALIDITY_AT
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_01_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_01_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1301_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_01_BO + + /** + * @desc Check that IUT discards secured message signed with the expired certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_02_BO_AT)
+             *                      containing validity_restrictions['time_start_and_end']
+             *                          containing start_validity
+             *                              indicating START_VALIDITY_AT < CURRENT_TIME
+             *                          and containing end_validity
+             *                              indicating END_VALIDITY_AT < START_VALIDITY_AT
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_02_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_02_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1302_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_02_BO + + /** + * @desc Check that IUT discards secured message when IUT location is outside the circular validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_03_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              and containing circular_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_03_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_03_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1303_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_03_BO + + /** + * @desc Check that IUT discards secured message when IUT location is outside the rectangular validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_04_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              and containing polygonal_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_04_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_04_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1304_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_04_BO + + /** + * @desc Check that IUT discards secured message when IUT location is outside the polygonal validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_05_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              and containing rectanglar_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_05_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_05_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1305_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_05_BO + + /** + * @desc Check that IUT discards secured message when IUT location is outside the identified validity restriction of the signing certificate + *
+             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
+             *              containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_13_06_BO_AT)
+             *                      containing validity_restrictions['region']
+             *                          containing region
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  indicating REGION
+             *                                      not containing the CURRENT_IUT_LOCATION
+             *   } then {
+             *       the IUT discards the message
+             *   }
+             * }
+             * 
+ * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_13_06_BO + * @reference ETSI TS 103 097 [1], clause 7.2 + */ + testcase TC_SEC_ITSS_RCV_GENMSG_13_06_BO() runs on ItsMtc system ItsSecSystem { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { + log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and '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_12_0x_BO_nodeB(cc_taCertMsg1306_BO)); + v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + + // Cleanup + f_cf02Down(); + + } // End of testcase TC_SEC_ITSS_RCV_GENMSG_13_06_BO + + group g_TC_SEC_ITSS_RCV_GENMSG_13_0x_BO { + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) + */ + function f_TC_SEC_ITSS_RCV_GENMSG_13_0x_BO_nodeB( + in charstring p_taCert + ) runs on ItsGeoNetworking { + + // Local variables + f_cf01Up(); + + // Preamble f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_generation_time(1000 * f_getCurrentTime()), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other, - m_header_field_signer_info( - m_signerInfo_digest( - vc_atCertificate.signer_info.signerInfo.digest - )) - }, - e_certificate_digest_with_sha256, - false - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + f_sendSecuredBeacon(p_taCert, omit, e_certificate); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + // Postamble + f_selfOrClientSyncAndVerdict(c_poDone, e_success); + + } // End of function f_TC_SEC_ITSS_RCV_GENMSG_13_0x_BO_nodeB + + } // End of group g_TC_SEC_ITSS_RCV_GENMSG_13_0x_BV + + } // 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 { + + /** + * @desc Check that IUT discards the AT certificate with version 3 + *
+             * 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_01_01_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_01_01_BO_AT)
+             *                      containing  version
+             *                          indicating '2'
+             *      } then {
+             *          the IUT discards  the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_01_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0101_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 + } + 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_CERT_01_01_BO + + /** + * @desc Check that IUT discards the AT certificate with version 1 + *
+             * 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_01_02_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_01_02_BO_AT)
+             *                      containing  version
+             *                          indicating '2'
+             *      } then {
+             *          the IUT discards  the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_01_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0102_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 + } + 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_CERT_01_02_BO + + /** + * @desc Check that IUT discards the AA certificate with version 3 + *
+             * 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_01_03_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificate[0] (CERT_TS_01_03_BO_AA)
+             *                      containing  version
+             *                          indicating '3'
+             *                  and containing certificate[1] (CERT_TS_01_03_BO_AT)
+             *                      containing signer_info.type
+             *                          indicating 'certificate_digest_with_sha256'
+             *                      and containing signer_info.digest
+             *                          referencing to CERT_TS_01_03_BO_AA
+             *      } then {
+             *          the IUT discards  the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_01_03_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0103_BO, -, e_certificate_chain); + + 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_CERT_01_03_BO + + /** + * @desc Check that IUT discards the AA certificate with version 1 + *
+             * 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_01_04_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificate[0] (CERT_TS_01_04_BO_AA)
+             *                      containing  version
+             *                          indicating '1'
+             *                  and containing certificate[1] (CERT_TS_01_04_BO_AT)
+             *                      and containing signer_info.digest
+             *                          referencing to CERT_TS_01_04_BO_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_01_04_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0104_BO, -, e_certificate_chain); + + 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_CERT_01_04_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'enrolment_credential' + *
+             * 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_02_01_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_02_01_BO_AT)
+             *                      containing signer_info.type
+             *                          indicating 'certificate_digest_with_sha256'
+             *                      and containing signer_info.digest
+             *                          referencing to certificate (CERT_TS_A_EC)
+             *                              containing subject_info.subject_type
+             *                                 indicating 'enrolment_credential'
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_02_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0201_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 + } + 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_CERT_02_01_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_credential' + *
+             * 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_02_02_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificates[0] (CERT_TS_02_02_BO_AA)
+             *                      containing signer_info.digest
+             *                          referencing to certificate CERT_TS_A_EC
+             *                              containing subject_info.subject_type
+             *                                  indicating 'enrolment_credential'
+             *                  and containing certificates[1] (CERT_TS_02_02_BO_AT)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_02_02_BO_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_02_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0202_BO, omit, e_certificate_chain); + + 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_CERT_02_02_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'enrolment_authority' + *
+             * 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_02_03_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificate (CERT_TS_02_03_BO_AT)
+             *                      containing signer_info.type
+             *                          indicating 'certificate_digest_with_sha256'
+             *                  and containing signer_info.digest
+             *                          referencing to certificate (CERT_TS_A_EA)
+             *                              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_CERT_02_03_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_02_03_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0203_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 + } + 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_CERT_02_03_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_authority' + *
+             * 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_02_04_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificates[0] (CERT_TS_02_04_BO_AA)
+             *                      containing signer_info.digest
+             *                          referencing to certificate CERT_TS_A_EA
+             *                              containing subject_info.subject_type
+             *                                  indicating 'enrolment_authority'
+             *                  and containing certificates[1] (CERT_TS_02_04_BO_AT)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_02_04_BO_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_04_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_02_04_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0204_BO, omit, e_certificate_chain); + + 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_CERT_02_04_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'authorization_ticket' + *
+             * 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_03_01_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields ['signer_info'].signer
+             *                  containing certificate (CERT_TS_03_01_BO_AT)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_03_BO_CA
+             *                              containing subject_info.subject_type
+             *                                  indicating 'authorization_ticket'
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_03_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_03_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0301_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 + } + 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_CERT_03_01_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'authorization_ticket' + *
+             * 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_03_02_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields ['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificates[0] (CERT_TS_03_02_BO_AA)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_03_BO_CA
+             *                              containing subject_info.subject_type
+             *                                  indicating 'authorization_ticket'
+             *                  and containing certificates[1] (CERT_TS_03_02_BO_AT)
+             *                      containing signer_info.digest
+             *                      referencing to CERT_TS_03_02_BO_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_03_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_03_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0302_BO, omit, e_certificate_chain); + + 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_CERT_03_02_BO + + /** + * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the AA certificate contains the subject type 'authorization_authority' + *
+             * 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_04_01_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields ['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificates[0] (CERT_TS_04_01_BO_AA)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_A_AA
+             *                  and containing certificates[1] (CERT_TS_04_01_BO_AT)
+             *                      containing signer_info.digest
+             *                      referencing to CERT_TS_04_01_BO_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_04_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_04_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0401_BO, omit, e_certificate_chain); + + 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_CERT_04_01_BO + + /** + * @desc Check that IUT discards the message when signing AT certificate has an invalid signature + *
+             * 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 header_fields ['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate'
+             *                  and containing certificates (CERT_TS_A_AT)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_TS_A_AA
+             *                      and containing signature
+             *                          NOT verifiable with CERT_TS_A_AA.subject_attributes['verification_key'].key
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_05_01_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredCam_Bo( + cc_taCert_A, + -, + 1, + -, + e_certificate, + true, + 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 + } + 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_CERT_05_01_BO + + /** + * @desc Check that IUT discards the message when the issuing AA certificate of the signing AT certificate has an invalid signature + *
+             * 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 header_fields ['signer_info'].signer
+             *                  containing type
+             *                      indicating 'certificate_chain'
+             *                  and containing certificates[0] (CERT_TS_A_AT)
+             *                      containing signer_info.digest
+             *                          referencing to CERT_ROOT
+             *                      and containing signature
+             *                          NOT verifiable with CERT_ROOT.subject_attributes['verification_key'].key
+             *                  and containing certificates[1] (CERT_TS_A_AT)
+             *                      containing signer_info.digest
+             *                          referencing to a CERT_TS_A_AA
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_05_02_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_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(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_prepareSecuredCam_Bo( + cc_taCert_A, + -, + 1, + -, + e_certificate_chain, + true, + false, + 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 + } + 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_CERT_05_02_BO + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the same circular region validity restriction as its issuing certificate + *
+             * 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_06_01_BV_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AA
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_01_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_01_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_01_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_sendSecuredCam(cc_taCert0601_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_06_01_BV + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the circular region validity restriction which is fully inside in the circular region validity restriction of its issuing certificate + *
+             * 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_06_02_BV_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_02_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA
+             *                                              fully covering CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_02_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_02_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_sendSecuredCam(cc_taCert0602_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_06_02_BV + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the circular region validity restriction which is fully inside in the rectangular region validity restriction of its issuing certificate + *
+             * 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_06_03_BV_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_03_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_C_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          indicating RECT_REGION_AA
+             *                                              fully covering CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_03_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_03_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_sendSecuredCam(cc_taCert0603_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_06_03_BV + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the circular region validity restriction which is fully inside in the polygonal region validity restriction of its issuing certificate + *
+             * 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_06_04_BV_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_04_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA
+             *                                              fully covering CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_04_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_04_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_sendSecuredCam(cc_taCert0604_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_06_04_BV + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the circular region validity restriction which is fully inside in the identified region validity restriction of its issuing certificate + *
+             * 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_06_05_BV_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_05_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'iso_3166_1'
+             *                                          and containing local_region
+             *                                              indicating 0
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AT
+             *                                                  fully covering CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_05_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_05_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_sendSecuredCam(cc_taCert0605_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_03_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_06_05_BV /** - * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_time' + * @desc Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the circular region validity restriction *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[2].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[3].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[4].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_06_06_BO_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_06_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_06_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_06_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0606_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 + } + 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_CERT_06_06_BO + + /** + * @desc Check that the IUT discards a message when the signing certificate of this message contains circular region validity restriction which is outside of the circular region validity restriction of its issuing certificate + *
+             * 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_06_07_BO_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_07_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_06_07_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA_OUTSIDE
+             *                                              not including CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_07_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_07_BO() runs on ItsGeoNetworking system ItsSecSystem { + + // Local variables + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; + + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0607_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 + } + 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_CERT_06_07_BO + + /** + * @desc Check that the IUT discards a message when the signing certificate of this message contains circular region validity restriction which is not fully covered by the the circular region validity restriction of its issuing certificate + *
+             * 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_06_08_BO_AT
+             *      and the IUT current location is inside the CURCULAR_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_06_08_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'circle'
+             *                              containing circular_region
+             *                                  indicating CURCULAR_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_06_08_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA_INTERSECT
+             *                                              including partially CURCULAR_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_06_08_BO + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_06_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_sendSecuredCam(cc_taCert0608_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 + } + 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_CERT_06_08_BO + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the same rectangular region validity restriction as its issuing certificate + *
+             * 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_07_01_BV_AT
+             *      and the IUT current location is inside the RECT_REGION_AA
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_01_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_C_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          indicating RECT_REGION_AA
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_01_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_04_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_01_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_04_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_04_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_04_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0701_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_04_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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(1000 * f_getCurrentTime() - 1), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_04_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_04_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_01_BV /** - * @desc Check that IUT discards a secured GN Message if the message does not contain the header field of type 'generation_time' + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the rectangular region validity restriction which is fully inside in the circular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[2].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_07_02_BV_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_02_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA
+                                                            fully covering the RECT_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_05_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_02_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_05_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_02_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_05_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + f_cf01Up(); - // Cleanup - f_cf02Down(); + // Test adapter configuration - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_05_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_05_BO { + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_05_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_signer_info( - m_signerInfo_digest( - vc_atCertificate.signer_info.signerInfo.digest - )), - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - e_certificate_digest_with_sha256, - false - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_05_BO + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0702_BV, omit, e_certificate); - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_05_BO - - /** - * @desc Check that IUT discards a Secured GN Message if the message contains more than one header field of type 'its_aid' - *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
-             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[2].type
-             *              indicating 'generation_location'
-             *          and containing header_fields[3]
-             *              containing type
-             *                  indicating 'its_aid'
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and containing header_fields[4].type
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+                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_success);
+                }
+                else {
+                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+                }
+                
+                // Postamble
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_CERT_07_02_BV
+            
+            /**
+             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the validity restriction with rectangular region which is fully inside in the rectangular region validity restriction of its issuing certificate
+             * 
+             * 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_07_03_BV_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_03_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region
+             *                                          indicating RECT_REGION_AA
+                                                            fully covering RECT_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_06_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_03_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_06_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_03_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_06_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_06_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_06_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0703_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_06_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other, - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_06_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_06_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_03_BV /** - * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_location' + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the rectangular region validity restriction which is fully inside in the polygonal region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[2].type
-             *              indicating 'generation_location'
-             *          and containing header_fields[3].type
-             *              indicating 'generation_location'
-             *          and containing header_fields[4]
-             *              containing type
-             *                  indicating 'its_aid'
-             *              containing its_aid
-             *                  indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_07_04_BV_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_04_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA
+                                                            fully covering RECT_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_07_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_04_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_07_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_04_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); + + // Test adapter configuration // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_04_07_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0704_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_04_BV + + /** + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the rectangular region validity restriction which is fully inside in the identified region validity restriction of its issuing certificate + *
+             * 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_07_05_BV_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_05_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'iso_3166_1'
+             *                                          and containing local_region
+             *                                              indicating 0
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AT
+                                                                fully covering RECT_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_05_BV + * @reference ETSI TS 103 097 [1], clause 7.1 + */ + testcase TC_SEC_ITSS_RCV_CERT_07_05_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; + } - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test component configuration + f_cf01Up(); - // Cleanup - f_cf02Down(); + // Test adapter configuration - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_07_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_07_BO { + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_07_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0100'O - )) - ), - m_header_field_its_aid_Other - }, - e_certificate_digest_with_sha256, - false - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0705_BV, omit, e_certificate); + + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_07_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_07_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_05_BV /** - * @desc Check that IUT discards a secured GN Message if the message contains more than one header field of type 'generation_location' + * @desc Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the rectangular region validity restriction *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *          and containing header_fields[1].type
-             *              indicating 'generation_time'
-             *          and containing header_fields[2].type
-             *          and containing header_fields[4].type
-             *              indicating 'its_aid'
-             *                  containing its_aid
-             *                      indicating 'AID_BEACON'
-             *          and not containing other header fields
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_07_06_BO_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_06_BO_AT)
+             *                          not containing validity_restrictions['region']
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_C_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_04_08_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_06_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_04_08_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_06_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_04_08_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_04_08_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_04_08_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0706_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_04_08_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_04_08_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_04_08_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_06_BO /** - * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'self' + * @desc Check that the IUT discards a message when the signing certificate of this message contains rectangular region validity restriction which is outside of the rectangular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields['signer_info']
-             *              containing signer.type
-             *                  indicating 'self''
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_07_07_BO_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_07_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_07_07_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          indicating RECT_REGION_AA_OUTSIDE
+             *                                              not including RECT_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_07_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_05_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_07_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + 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_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_05_01_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_01_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_05_01_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0707_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_05_01_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_signer_info( - m_signerInfo_self - ), - m_header_field_generation_time(1000 * f_getCurrentTime()), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_01_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_07_BO /** - * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'certificate_digest_with_other_algorithm' + * @desc Check that the IUT discards a message when the signing certificate of this message contains rectangular region validity restriction which is not fully covered by the the rectangular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields['signer_info']
-             *              containing signer.type
-             *                  indicating 'certificate_digest_with_other_algorithm'
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_07_08_BO_AT
+             *      and the IUT current location is inside the RECT_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_07_08_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'rectangle'
+             *                              containing rectangular_region[0]
+             *                                  indicating RECT_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_07_08_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          indicating RECT_REGION_AA_INTERSECT
+             *                                              not partialy RECT_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_07_08_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_05_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_07_08_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_05_02_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_05_02_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0708_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_05_02_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_02_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_02_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_07_08_BO /** - * @desc Check that IUT discards a secured GN Beacon if the header_fields contains a signer of type 'certificate_chain' + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the same polygonal region validity restriction as its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields['signer_info']
-             *              containing signer.type
-             *                  indicating 'certificate_chain'
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_01_BV_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AA
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_01_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AA
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_05_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_01_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_05_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_01_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_05_03_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_05_03_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_05_03_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0801_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_05_03_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - 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_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_05_03_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_05_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_01_BV /** - * @desc Check that IUT discards a secured GN Message containing generation_time before the message signing certificate validity period + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the circular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A)
-             *          containing header_fields['signer_info'].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_A_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 < TIME_CERT_TS_AT_START
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_02_BV_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_02_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_B_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          indicating CURCULAR_REGION_AA
+             *                                              fully including POLYGON_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_02_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_06_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_02_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_06_01_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_01_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_06_01_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0802_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_06_01_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_signer_info( - m_signerInfo_digest( - vc_atCertificate.signer_info.signerInfo.digest - )), - m_header_field_generation_time( // TODO Try to refine access to the certificate validity_restrictions['time_start_and_end'] field access - (vc_atCertificate.signer_info.signerInfo.certificate.validity_restrictions[0].validity.time_start_and_end.start_validity - 3600) * 1000 - ), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_01_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_02_BV /** - * @desc Check that IUT discards the secured GN Message containing generation_time after the message signing certificate validity period + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the rectangular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing header_fields['signer_info'].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_A_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 > TIME_CERT_TS_E_ATND
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_03_BV_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_03_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_C_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          indicating RECT_REGION_AA
+             *                                              fully including POLYGON_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_03_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_06_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_03_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_06_02_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_06_02_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0803_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_06_02_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_signer_info( - m_signerInfo_digest( - vc_atCertificate.signer_info.signerInfo.digest - )), - m_header_field_generation_time( // TODO Try to refine access to the certificate validity_restrictions['time_start_and_end'] field access - (vc_atCertificate.signer_info.signerInfo.certificate.validity_restrictions[0].validity.time_start_and_end.end_validity + 3600) * 1000 - ), // In us - m_header_field_generation_location( - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_02_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_02_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_03_BV /** - * @desc Check that IUT discards Secured GN Message if the generation_time is more than 10 minute in the past (C2C only) + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the polygonal region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC and PICS_ITS_C2C_MODE
+             * 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_GENMSG_A) 
-             *          containing header_fields ['generation_time']
-             *              containing generation_time
-             *                  indicating TIME_1 (TIME_1 < CUR_TIME - 10min)
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_04_BV_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AA
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_04_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region[0]
+             *                                          indicating POLYGON_REGION_AA
+             *                                              fully including POLYGON_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_04_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_06_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_04_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_ITS_C2C_MODE)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' and 'PICS_ITS_C2C_MODE' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_06_03_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_03_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_06_03_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0804_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_06_03_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_generation_time( - (1000 * f_getCurrentTime() - 600) * 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) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_03_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_04_BV /** - * @desc Check that IUT discards Secured GN Message if the generation_time is more than 10 minute in the future(C2C only) + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the identified region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC and PICS_ITS_C2C_MODE
+             * 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_GENMSG_A) 
-             *          containing header_fields ['generation_time']
-             *              containing generation_time
-             *                  indicating TIME_1 (TIME_1 > CUR_TIME + 10min)
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_05_BV_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_05_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'iso_3166_1'
+             *                                          and containing local_region
+             *                                              indicating 0
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AT
+             *                                                  fully including POLYGON_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_06_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_05_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_06_04_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_05_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC) or not(PICS_ITS_C2C_MODE)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' and 'PICS_ITS_C2C_MODE' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_06_04_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_06_04_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_06_04_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0805_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_06_04_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_generation_time( - (1000 * f_getCurrentTime() + 600) * 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) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_06_04_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_06_04_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_05_BV /** - * @desc Check that IUT discards SecuredMessage when its_aid value is undefined + * @desc Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the polygonal region validity restriction *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A)
-             *          containing header_fields['its_aid']
-             *              indicating indicating 'AID_UNDEFINED'
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_06_BO_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_06_BO_AT)
+             *                          not containing validity_restrictions['region']
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_C_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_07_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_06_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_07_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_06_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_07_01_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_07_01_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_07_01_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0806_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_07_01_BO() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - cc_taCert_A, - { - m_header_field_its_aid_Other - }, - 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) { + // 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_07_01_BO + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_07_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_06_BO /** - * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the circular validity region of the signing certificate + * @desc Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the polygonal region validity restriction *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_B_AT
-             *    and the IUT current location is inside the validiti region of CERT_TS_B_AT
-             * } 
-             * ensure that { 
-             *  when { 
-             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_B)) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_B_AT)
-             *                      containing validity_restrictions ['region']
-             *                          containing region
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_07_BO_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_07_BO_AT)
+             *                          containing validity_restrictions['region']
              *                              containing region_type
-             *                                  indicating 'circle'
-             *                              and containing circular_region
-             *                                  indicating REGION
-             *          and containing header_fields ['generation_location']
-             *              indicating location outside of the REGION
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region (POLYGON_REGION_08_04_BO)
+             *                                  indicating length = 2
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA
+             *                                              fully covering all points of POLYGON_REGION_08_04_BO
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_07_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_08_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_07_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(cc_taCert_B)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0807_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_07_BO /** - * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the rectangular validity region of the signing certificate + * @desc Check that the IUT discards a message when the signing certificate of this message contains polygonal region validity restriction which is outside of the polygonal region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_C_AT
-             *    and the IUT current location is inside the validiti region of CERT_TS_C_AT
-             * } 
-             * ensure that { 
-             *  when { 
-             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_C)) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_C_AT)
-             *                      containing validity_restrictions ['region']
-             *                          containing region
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_08_BO_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_08_BO_AT)
+             *                          containing validity_restrictions['region']
              *                              containing region_type
-             *                                  indicating 'rectangle'
-             *                              and containing rectanglar_region
-             *                                  indicating REGION
-             *          and containing header_fields ['generation_location']
-             *              indicating location outside of the REGION
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *                                  indicating 'polygon'
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_D_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA_OUTSIDE
+             *                                              not including POLYGON_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_08_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_08_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_08_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(cc_taCert_C)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0808_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_02_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_08_BO /** - * @desc Check that IUT discards Secured GN Message if the HeaderField generation_location is outside of the rectangular validity region of the signing certificate + * @desc Check that the IUT discards a message when the signing certificate of this message contains polygonal region validity restriction which is not fully covered by the the polygonal region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_D_AT
-             *    and the IUT current location is inside the validiti region of CERT_TS_D_AT
-             * } 
-             * ensure that { 
-             *  when { 
-             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_D)) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_D_AT)
-             *                      containing validity_restrictions ['region']
-             *                          containing region
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_08_09_BO_AT
+             *      and the IUT current location is inside the POLYGON_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_08_09_BO_AT)
+             *                          containing validity_restrictions['region']
              *                              containing region_type
              *                                  indicating 'polygon'
-             *                              and containing polygonal_region
-             *                                  indicating REGION
-             *          and containing header_fields ['generation_location']
-             *              indicating location outside of the REGION
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *                              containing polygonal_region
+             *                                  indicating POLYGON_REGION_AT
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_08_08_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          indicating POLYGON_REGION_AA_INTERSECT
+             *                                              including partialy POLYGON_REGION_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_08_09_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_08_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_08_09_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO(cc_taCert_D)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0809_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_08_09_BO /** - * @desc Check that IUT discards Secured GN Message if the optional HeaderField generation_location is outside of the identified validity region of the signing certificate + * @desc Check that the IUT accepts a message when its signing certificate contains the identified region validity restriction with the same identified region as the issuing certificate and without local area definition *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_E_AT
-             *    and the IUT current location is inside the validiti region of CERT_TS_E_AT
-             * } 
-             * ensure that { 
-             *  when { 
-             *      the IUT is receiving a SecuredMessage ((MSG_SEC_RCV_GENMSG_E)) 
-             *          containing header_fields[0].type
-             *              indicating 'signer_info'
-             *                  containing certificate (CERT_TS_E_AT)
-             *                      containing validity_restrictions ['region']
-             *                          containing region
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_01_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_01_BV_AT)
+             *                          containing validity_restrictions['region']
              *                              containing region_type
-             *                                  indicating 'id_region'
-             *                              and containing identified_region
-             *                                  indicating REGION
-             *          and containing header_fields ['generation_location']
-             *              indicating location outside of the REGION
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'iso_3166_1'
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AT
+             *                                          and containing local_region
+             *                                              indicating 0
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_08_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_01_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_01_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_08_xx_BO(cc_taCert_E)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_08_04_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0901_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO( - in charstring p_taCert - ) runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - p_taCert, - { - 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_location( - valueof(m_threeDLocation( - PX_WGSLATITUDE, - PX_WGSLONGITUDE, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_08_xx_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_01_BV /** - * @desc Check that IUT discards the Secured GN Message containing empty payload of type 'signed' + * @desc Check that the IUT accepts a message when its signing certificate contains the identified region validity restriction with the same identified region as the issuing certificate and with local area definition *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing payload_field
-             *              containing type
-             *                  indicating 'signed'
-             *              and containing data
-             *                  indicating length 0
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_02_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_02_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating ID_LOCAL_REGION_1
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'iso_3166_1'
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AT
+             *                                          and containing local_region
+             *                                              indicating 0
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_09_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_02_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_02_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_09_02_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0902_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO() runs on ItsGeoNetworking { - - // Local variables - var GnNonSecuredPacket v_gnNonSecuredPacket; - var octetstring v_gnPayload; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - var template (value) SecuredMessage v_securedMessage; - var GeoNetworkingPdu v_securedGnPdu; - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_gnNonSecuredPacket := valueof( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea( - c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) - ))); - - // Encode it - v_gnPayload := bit2oct( - encvalue( - v_gnNonSecuredPacket - ) - ); - f_buildGnSecuredOtherMessage( - v_securedMessage, - m_payload_signed( - ''O - ), - e_certificate_digest_with_sha256, - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ); - 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() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_02_BO - - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_02_BO - - /** - * @desc Check that IUT discards the Secured GN Message containing payload element of type 'unsecured' - *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
-             * 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_GENMSG_A) 
-             *          containing payload_field
-             *              containing type
-             *                  indicating 'unsecured'
-             *              and containing data
-             *                  indicating length > 0
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+                }
+                else {
+                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+                }
+                
+                // Postamble
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_CERT_09_02_BV
+            
+            /**
+             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the circular region validity restriction of its issuing certificate
+             * 
+             * 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_09_03_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_03_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'circle'
+             *                                      and containing circular_region
+             *                                          fully covering ID_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_09_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_03_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_03_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_09_03_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_03_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0903_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO() runs on ItsGeoNetworking { - - // Local variables - var GnNonSecuredPacket v_gnNonSecuredPacket; - var octetstring v_gnPayload; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - var template (value) SecuredMessage v_securedMessage; - var GeoNetworkingPdu v_securedGnPdu; - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_gnNonSecuredPacket := valueof( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea( - c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) - ))); - - // Encode it - v_gnPayload := bit2oct( - encvalue( - v_gnNonSecuredPacket - ) - ); - f_buildGnSecuredOtherMessage( - v_securedMessage, - m_payload_unsecured( - v_gnPayload - ), - e_certificate_digest_with_sha256, - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ); - 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() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_03_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_03_BV /** - * @desc Check that IUT discards the Secured GN Message containing payload element of type 'encrypted' + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the rectangular region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * 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_GENMSG_A) 
-             *          containing payload_field
-             *              containing type
-             *                  indicating 'encrypted'
-             *              and containing data
-             *                  indicating length > 0
-             *  } then { 
-             *      the IUT discards the message 
-             *  } 
-             * } 
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_04_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_04_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'rectangle'
+             *                                      and containing rectangular_region[0]
+             *                                          fully covering ID_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_09_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_04_BV * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_04_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_09_04_BO()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_09_04_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0904_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO() runs on ItsGeoNetworking { - - // Local variables - var GnNonSecuredPacket v_gnNonSecuredPacket; - var octetstring v_gnPayload; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - var template (value) SecuredMessage v_securedMessage; - var GeoNetworkingPdu v_securedGnPdu; - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_gnNonSecuredPacket := valueof( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea( - c_area1 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1) - ))); - - // Encode it - v_gnPayload := bit2oct( - encvalue( - v_gnNonSecuredPacket - ) - ); - f_buildGnSecuredOtherMessage( - v_securedMessage, - m_payload_encrypted( - v_gnPayload - ), - e_certificate_digest_with_sha256, - valueof(m_threeDLocation( - v_longPosVectorNodeB.latitude, - v_longPosVectorNodeB.longitude, - '0000'O - )) - ); - 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() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of testcase f_TC_SEC_ITSS_RCV_GENMSG_09_04_BO + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_09_04_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_04_BV /** - * @desc Check that IUT discards the Secured GN Message if the message does not contain the trailer field of type 'signature' + * @desc Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the polygonal region validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing trailer_fields
-             *             not containing trailer_fields['signature']
-             *   } then {
-             *     the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_05_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_05_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'polygon'
+             *                                      and containing polygonal_region
+             *                                          fully covering ID_REGION_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_10_01_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_05_BV + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_10_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_05_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO_nodeB(0)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0905_BV, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_10_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_05_BV /** - * @desc Check that IUT discards the Secured GN Message containing more than one instance of TrailerField of type 'signature' + * @desc Check that the IUT accepts a message when the signing certificate of the message contains the identified region validity restriction with the identified region which is fully covered by the identified region of the validity restriction of its issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *     the IUT is receiving a SecuredMessage
-             *         containing trailer_fields[0]
-             *             containing type
-             *                 indicating 'signature'
-             *             and containing trailer_fields[1]
-             *                 containing type
-             *                     indicating 'signature'
-             *   } then {
-             *     the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_06_BV_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_06_BV_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *                                      and containing id_region
+             *                                          containing region_dictionary
+             *                                              indicating 'un_stats'
+             *                                          and containing region_identifier
+             *                                              indicating ID_REGION_AA_UNSTATS
+             *                                                  which includes ID_REGION_AT
+             *                                          and containing local_region
+             *                                              indicating 0
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_10_02_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_06_BV + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_10_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_06_BV() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_10_0x_BO_nodeB(2)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_10_02_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0906_BV, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO_nodeB( - in integer p_trailerStatus - ) runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - - // Preamble - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_sendSecuredBeacon_Bo(cc_taCert_A, -, p_trailerStatus); + 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_success); - - // Postamble - f_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_10_0x_BO_nodeB + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_10_0x_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_06_BV /** - * @desc Check that the IUT discards Secured GN Message containing signature that is not verified using the verification key from the certificate contained in the message's signer info + * @desc Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the identified region validity restriction *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *       the IUT is receiving a SecuredMessage
-            *            the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
-            *                containing header_fields ['signer_info']
-            *                    containing certificate
-            *                        containing subject_attributes['verification key'] 
-            *                            containing key (KEY)
-            *                and containing trailer_fields[0]
-            *                    containing type
-            *                        indicating 'signature'
-            *                    and containing signature
-            *                        NOT verifiable using KEY
-             *   } then {
-             *       the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_07_BO_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_07_BO_AT)
+             *                          not containing validity_restrictions['region']
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_E_AA
+             *                                  containing validity_restrictions['region']
+             *                                      containing region_type
+             *                                          indicating 'id'
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_11_01_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_07_BO + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_11_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_07_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_11_0x_BO_nodeB()); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_11_01_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0907_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO_nodeB() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - - // Preamble - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_sendSecuredBeacon_Bo( - cc_taCert_A, - -, - 1, - -, - e_certificate - ); + f_sleep(PX_TNOAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); + for (i := 0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i := i + 1) { + // empty on purpose + } + if (i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_11_0x_BO_nodeB + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_11_0x_BV + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_07_BO /** - * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'enrolment_credential' + * @desc Check that the IUT discards a message when the signing certificate and its issuing certificate are both containing the identified region validity restrictions with the same region id but different local regions *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
-             *          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'
-             *   } then {
-             *       the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_08_BO_AT
+             *      and the IUT current location is inside the ID_REGION_AA, local region 1
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_08_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating ID_LOCAL_REGION_1
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_09_08_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                          indicating 'id'
+             *                                  and containing id_region
+             *                                      containing region_dictionary
+             *                                          indicating 'iso_3166_1'
+             *                                      and containing region_identifier
+             *                                          indicating ID_REGION_AA
+             *                                      and containing local_region
+             *                                          indicating ID_LOCAL_REGION_2
+             *                                              not equal to ID_LOCAL_REGION_1
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_01_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_08_BO + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_12_01_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_08_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB(cc_taCert_EC)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0908_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_01_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_08_BO /** - * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'authorization_authority' + * @desc Check that the IUT discards a message when the identified region of the validity restriction of its signing certificate is different and not fully covered by the one in the issuing certificate *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
-             *          containing header_fields['signer_info']
-             *              containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  containing certificate (CERT_TS_A_AA)
-             *                      containing subject_info.subject_type
-             *                          indicating 'enrolment_credentials'
-             *   } then {
-             *       the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_09_BO_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_09_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AT
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_09_09_BO_AA
+             *                                  containing validity_restrictions['region']
+             *                                          indicating 'id'
+             *                                  and containing id_region
+             *                                      containing region_dictionary
+             *                                          indicating 'iso_3166_1'
+             *                                      and containing region_identifier
+             *                                          indicating ID_REGION_AA_OTHER
+             *                                              other than ID_REGION_AT
+             *                                      and containing local_region
+             *                                          indicating 0
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_02_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_09_BO + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_12_02_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_09_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB(cc_taCert_AA)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0909_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_02_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_09_BO /** - * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'enrolment_authority' + * @desc Check that the IUT discards a message when the identified region validity restriction of its signing certificate contains unknown area code *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
-             *          containing header_fields['signer_info']
-             *              containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  containing certificate (CERT_TS_A_EA)
-             *                      containing subject_info.subject_type
-             *                          indicating 'enrolment_credentials'
-             *   } then {
-             *       the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_10_BO_AT
+             *      and the IUT current location is inside the ID_REGION_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_10_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_UNKNOWN
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_A_AA
+             *                                  not containing validity_restrictions['region']
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_03_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_10_BO + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_12_03_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_10_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); + f_cf01Up(); - // Preamble + // Test adapter configuration - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB(cc_taCert_EA)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0910_BO, omit, e_certificate); - // Cleanup - f_cf02Down(); + 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); + } - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_03_BO + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_10_BO /** - * @desc Check that IUT discards a Secured GN Message if the signer certificate of the message contains the subject type 'root_ca' + * @desc Check that the IUT discards a message when the identified region validity restriction of its signing certificate contains invalid area code *
-             * Pics Selection: PICS_GN_SECURITY and PICS_GN_GBC_SRC
+             * Pics Selection: PICS_GN_SECURITY
              * Config Id: CF01
-             * Expected behavior:
-             * with {
-             *   the IUT being in the 'authorized' state
-             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
-             * }
-             * ensure that {
-             *   when {
-             *       the IUT is receiving a SecuredMessage (MSG_SEC_RCV_GENMSG_A)
-             *          containing header_fields['signer_info']
-             *              containing signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  containing certificate (CERT_TS_A_CA)
-             *                      containing subject_info.subject_type
-             *                          indicating 'enrolment_credentials'
-             *   } then {
-             *       the IUT discards the message
-             *   }
-             * }
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_09_11_BO_AT
+             *      and the IUT current location is inside the ID_REGION_AA_UNSTATS
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_09_11_BO_AT)
+             *                          containing validity_restrictions['region']
+             *                              containing region_type
+             *                                  indicating 'id'
+             *                              and containing id_region
+             *                                  containing region_dictionary
+             *                                      indicating 'iso_3166_1'
+             *                                  and containing region_identifier
+             *                                      indicating ID_REGION_AA_UNSTATS
+             *                                  and containing local_region
+             *                                      indicating 0
+             *                          and containing signer_info.digest
+             *                              referencing to a CERT_TS_A_AA
+             *                                  not containing validity_restrictions['region']
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
              * 
- * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_GENMSG_12_04_BO - * @reference ETSI TS 103 097 [1], clause 7.2 + * + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_09_11_BO + * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_GENMSG_12_04_BO() runs on ItsMtc system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_09_11_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; + var integer i; + var GeoNetworkingPdu v_securedGnPdu; + var GnRawPayload v_sentRawPayload; - // Test control - if (not(PICS_GN_SECURITY) or not(PICS_GN_GBC_SRC)) { - log("*** " & testcasename() & ": 'PICS_GN_SECURITY' and 'PICS_GN_GBC_SRC' required for executing the TC ***"); - setverdict(inconc); + // Test adapter configuration + if (not(PICS_GN_SECURITY)) { + log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***"); 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_12_0x_BO_nodeB(cc_taCert_CA)); - v_nodeD.start(f_TC_SEC_ITSS_RCV_GENMSG_xxx_BO_nodeD()); + f_cf01Up(); - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone}); + // Test adapter configuration - // Cleanup - f_cf02Down(); + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } // End of testcase TC_SEC_ITSS_RCV_GENMSG_12_04_BO - - group g_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO { + // Test Body + v_securedGnPdu := f_sendSecuredCam(cc_taCert0911_BO, omit, e_certificate); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB( - in charstring p_taCert - ) runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingPdu v_securedGnPdu; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB - - // Preamble - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_securedGnPdu := f_prepareSecuredBeacon( - p_taCert, - { - 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_location( - valueof(m_threeDLocation( - PX_WGSLATITUDE, - PX_WGSLONGITUDE, - '0000'O - )) - ), - m_header_field_its_aid_Other - }, - 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 + } + 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_selfOrClientSyncAndVerdict(c_poDone, e_success); - - } // End of function f_TC_SEC_ITSS_RCV_GENMSG_12_0x_BO_nodeB + } - } // End of group g_TC_SEC_ITSS_RCV_GENMSG_12_0x_BV - - } // 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 { + // Postamble + f_poNeighbour(); + f_cf01Down(); + } // End of testcase TC_SEC_ITSS_RCV_CERT_09_11_BO /** - * @desc Check that IUT discards the AT certificate with version 3 + * @desc Check that the IUT discards a message when its signing certificate does not contain the time validity restriction *
              * 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_01_01_BO_AT
-             *  }
-             *  ensure that {
-             *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_01_01_BO_AT)
-             *                      containing  version
-             *                          indicating '2'
+             *      the IUT being in the 'authorized' state
+             *      and the IUT current time is inside the time validity period of CERT_TS_10_01_BO_AT
+             *      and the IUT current location is inside the CERT_TS_10_01_BO_AT
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_10_01_BO_AT)
+             *                          containing validity_restrictions['time_start_and_end']
+             *                          and not containing validity_restrictions['time_end']
+             *                          and not containing validity_restrictions['time_start_and_duration']
              *      } then {
-             *          the IUT discards  the message
+             *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_10_01_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_01_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_10_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19530,7 +26022,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19540,7 +26032,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0101_BO, omit, e_certificate); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1001_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19559,37 +26051,38 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_01_01_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_10_01_BO /** - * @desc Check that IUT discards the AT certificate with version 1 + * @desc Check that the IUT discards a message when its signing certificate contains 'time_end' validity restriction *
              * 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_01_02_BO_AT
+             *      and the IUT current time is inside the time validity period of CERT_TS_10_02_BO_AT
+             *      and the IUT current location is inside the CERT_TS_10_02_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_01_02_BO_AT)
-             *                      containing  version
-             *                          indicating '2'
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_10_02_BO_AT)
+             *                          containing validity_restrictions['time_end']
              *      } then {
-             *          the IUT discards  the message
+             *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_10_02_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_01_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_10_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19602,7 +26095,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19612,7 +26105,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0102_BO, omit, e_certificate); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1002_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19631,42 +26124,38 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_01_02_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_10_02_BO /** - * @desc Check that IUT discards the AA certificate with version 3 + * @desc Check that the IUT discards a message when its signing certificate contains 'time_start_and_duration' validity restriction *
              * 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_01_03_BO_AT
+             *      and the IUT current time is inside the time validity period of CERT_TS_10_03_BO_AT
+             *      and the IUT current location is inside the CERT_TS_10_03_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificate[0] (CERT_TS_01_03_BO_AA)
-             *                      containing  version
-             *                          indicating '3'
-             *                  and containing certificate[1] (CERT_TS_01_03_BO_AT)
-             *                      containing signer_info.type
-             *                          indicating 'certificate_digest_with_sha256'
-             *                      and containing signer_info.digest
-             *                          referencing to CERT_TS_01_03_BO_AA
+             *              containing header_fields['signer_info']
+             *                  and containing signer 
+             *                      containing type
+             *                          indicating 'certificate'
+             *                      and containing certificate (CERT_TS_10_03_BO_AT)
+             *                          containing validity_restrictions['time_start_and_duration']
              *      } then {
-             *          the IUT discards  the message
+             *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_10_03_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_01_03_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_10_03_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19679,7 +26168,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19689,7 +26178,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0103_BO, -, e_certificate_chain); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1003_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19708,40 +26197,45 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_01_03_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_10_03_BO /** - * @desc Check that IUT discards the AA certificate with version 1 + * @desc Check that the IUT discards a message when the validity period of the signing certificate ends after the validity period of its issuing certificate *
              * 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_01_04_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_11_01_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificate[0] (CERT_TS_01_04_BO_AA)
-             *                      containing  version
-             *                          indicating '1'
-             *                  and containing certificate[1] (CERT_TS_01_04_BO_AT)
-             *                      and containing signer_info.digest
-             *                          referencing to CERT_TS_01_04_BO_AA
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_01_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_A_AA
+             *                          containing validity_restrictions['time_start_and_end']
+             *                              containing start_validity
+             *                                  indicating START_VALIDITY_AA
+             *                              and containing end_validity
+             *                                  indicating END_VALIDITY_AA
+             *              and containing validity_restrictions['time_start_and_end'] 
+             *                  containing start_validity
+             *                      indicating START_VALIDITY_AA
+             *                  and containing end_validity
+             *                      indicating END_VALIDITY_AA + 1d
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_01_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_11_01_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_01_04_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_11_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19754,7 +26248,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19764,7 +26258,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0104_BO, -, e_certificate_chain); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1101_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19783,41 +26277,45 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_01_04_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_11_01_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'enrolment_credential' + * @desc Check that the IUT discards a message when the validity period of its signing certificate starts before the validity period of the issuing certificate *
              * 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_02_01_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_11_02_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_02_01_BO_AT)
-             *                      containing signer_info.type
-             *                          indicating 'certificate_digest_with_sha256'
-             *                      and containing signer_info.digest
-             *                          referencing to certificate (CERT_TS_A_EC)
-             *                              containing subject_info.subject_type
-             *                                 indicating 'enrolment_credential'
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_02_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_A_AA
+             *                          containing validity_restrictions['time_start_and_end']
+             *                              containing start_validity
+             *                                  indicating START_VALIDITY_AA
+             *                              and containing end_validity
+             *                                  indicating END_VALIDITY_AA
+             *              and containing validity_restrictions['time_start_and_end'] 
+             *                  containing start_validity
+             *                      indicating START_VALIDITY_AA - 1d
+             *                  and containing end_validity
+             *                      indicating END_VALIDITY_AA
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_11_02_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_02_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_11_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19830,7 +26328,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19840,7 +26338,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0201_BO, omit, e_certificate); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1102_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19859,42 +26357,45 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_02_01_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_11_02_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_credential' + * @desc Check that the IUT discards a message when the issuing certificate of signing certificate is expired but the signing certificate is not expired yet. *
              * 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_02_02_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_11_03_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificates[0] (CERT_TS_02_02_BO_AA)
-             *                      containing signer_info.digest
-             *                          referencing to certificate CERT_TS_A_EC
-             *                              containing subject_info.subject_type
-             *                                  indicating 'enrolment_credential'
-             *                  and containing certificates[1] (CERT_TS_02_02_BO_AT)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_02_02_BO_AA
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_03_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_A_AA
+             *                          containing validity_restrictions['time_start_and_end']
+             *                              containing start_validity
+             *                                  indicating START_VALIDITY_AA - 365d
+             *                              and containing end_validity
+             *                                  indicating END_VALIDITY_AA - 1d
+             *              and containing validity_restrictions['time_start_and_end'] 
+             *                  containing start_validity
+             *                      indicating START_VALIDITY_AA - 365d
+             *                  and containing end_validity
+             *                      indicating END_VALIDITY_AA
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_11_03_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_02_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_11_03_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19907,7 +26408,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19917,7 +26418,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0202_BO, omit, e_certificate_chain); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1103_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -19936,41 +26437,45 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_02_02_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_11_03_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'enrolment_authority' + * @desc Check that the IUT discards a message when the validity period of the signing certificate is after the validity period of its issuing certificate *
              * 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_02_03_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_11_04_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificate (CERT_TS_02_03_BO_AT)
-             *                      containing signer_info.type
-             *                          indicating 'certificate_digest_with_sha256'
-             *                  and containing signer_info.digest
-             *                          referencing to certificate (CERT_TS_A_EA)
-             *                              containing subject_info.subject_type
-             *                                  indicating 'enrolment_authority'
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_04_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_A_AA
+             *                          containing validity_restrictions['time_start_and_end']
+             *                              containing start_validity
+             *                                  indicating START_VALIDITY_AA
+             *                              and containing end_validity
+             *                                  indicating END_VALIDITY_AA + 365d
+             *              and containing validity_restrictions['time_start_and_end'] 
+             *                  containing start_validity
+             *                      indicating START_VALIDITY_AA
+             *                  and containing end_validity
+             *                      indicating END_VALIDITY_AA + 365d
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_03_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_11_04_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_02_03_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_11_04_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -19983,7 +26488,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -19993,7 +26498,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0203_BO, omit, e_certificate); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1104_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20012,42 +26517,33 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_02_03_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_11_04_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_authority' + * @desc Check that the IUT discards a message when its signing certificate does not contain the SSP-AID subject attribute *
              * 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_02_04_BO_AT
+             *      and the IUT current location is inside the CERT_TS_12_01_BO_AT
              *  }
              *  ensure that {
              *      when { 
              *          the IUT is receiving a SecuredMessage
-             *              containing header_fields['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificates[0] (CERT_TS_02_04_BO_AA)
-             *                      containing signer_info.digest
-             *                          referencing to certificate CERT_TS_A_EA
-             *                              containing subject_info.subject_type
-             *                                  indicating 'enrolment_authority'
-             *                  and containing certificates[1] (CERT_TS_02_04_BO_AT)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_02_04_BO_AA
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_12_01_BO_AT)
+             *                  not containing subject_attributes['its_aid_ssp_list']
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_02_04_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_12_01_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_02_04_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_12_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20060,7 +26556,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20070,7 +26566,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0204_BO, omit, e_certificate_chain); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1201_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20089,37 +26585,43 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_02_04_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_12_01_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'authorization_ticket' + * @desc Check that the IUT discards a Secured CAM when its signing certificate does not contain a record with AID_CAM in the its_aid_ssp_list subject attribute *
              * 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_03_01_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_12_02_BO_AT
              *  }
              *  ensure that {
              *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields ['signer_info'].signer
-             *                  containing certificate (CERT_TS_03_01_BO_AT)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_03_BO_CA
-             *                              containing subject_info.subject_type
-             *                                  indicating 'authorization_ticket'
+             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
+             *              containing header_fields ['its_aid']
+             *                      containing its_aid
+             *                          indicating 'AID_CAM'
+             *              and containing header_fields ['signer_info']
+             *                  containing signer
+             *                      containing certificate 
+             *                          indicating CERT_TS_12_02_BO_AT
+             *                              containing subject_attributes['its_aid_ssp_list']
+             *                                  not containing an item
+             *                                      containing its_aid
+             *                                          indicating 'AID_CAM'
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_03_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_12_02_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_03_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_12_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20132,7 +26634,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20142,7 +26644,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0301_BO, omit, e_certificate); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1202_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20161,42 +26663,42 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_03_01_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_12_02_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'authorization_ticket' + * @desc Check that the IUT discards a Secured DENM when its signing certificate does not contain a record with AID_DENM in the its_aid_ssp_list subject attribute *
              * 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_03_02_BO_AT
+             *      and the IUT current location is inside the CERT_TS_12_03_BO_AT
              *  }
              *  ensure that {
              *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields ['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificates[0] (CERT_TS_03_02_BO_AA)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_03_BO_CA
-             *                              containing subject_info.subject_type
-             *                                  indicating 'authorization_ticket'
-             *                  and containing certificates[1] (CERT_TS_03_02_BO_AT)
-             *                      containing signer_info.digest
-             *                      referencing to CERT_TS_03_02_BO_AA
+             *          the IUT is receiving a Secured DENM (MSG_SEC_RCV_DENM_A)
+             *              containing header_fields ['its_aid']
+             *                      containing its_aid
+             *                          indicating 'AID_DENM'
+             *              and containing header_fields ['signer_info']
+             *                  containing signer
+             *                      containing certificate 
+             *                          indicating CERT_TS_12_03_BO_AT
+             *                              containing subject_attributes['its_aid_ssp_list']
+             *                                  not containing an item
+             *                                      containing its_aid
+             *                                          indicating 'AID_DENM'
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_03_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_12_03_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_03_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_12_03_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20209,7 +26711,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20219,7 +26721,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0302_BO, omit, e_certificate_chain); + v_securedGnPdu := f_sendSecuredDenm(cc_taCert1203_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20238,40 +26740,44 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_03_02_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_12_03_BO /** - * @desc Check that IUT discards a SecuredMessage if the issuer certificate of the AA certificate contains the subject type 'authorization_authority' + * @desc Check that the IUT discards a Secured CAM when its signing certificate contains two records with AID_CAM in the its_aid_ssp_list subject attribute *
              * 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_04_01_BO_AT
+             *      and the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_12_04_BO_AT
              *  }
              *  ensure that {
              *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields ['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificates[0] (CERT_TS_04_01_BO_AA)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_A_AA
-             *                  and containing certificates[1] (CERT_TS_04_01_BO_AT)
-             *                      containing signer_info.digest
-             *                      referencing to CERT_TS_04_01_BO_AA
+             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
+             *              containing header_fields ['its_aid']
+             *                      containing its_aid
+             *                          indicating 'AID_CAM'
+             *              and containing header_fields ['signer_info']
+             *                  containing signer
+             *                      containing certificate 
+             *                          indicating CERT_TS_12_04_BO_AT
+             *                              containing subject_attributes['its_aid_ssp_list']
+             *                                  containing item [0].its_aid
+             *                                      indicating 'AID_CAM'
+             *                                  and containing item [1].its_aid
+             *                                      indicating 'AID_CAM'
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_04_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_12_04_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_04_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_12_04_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20284,7 +26790,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20294,7 +26800,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_sendSecuredCam(cc_taCert0401_BO, omit, e_certificate_chain); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1204_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20313,39 +26819,41 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_04_01_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_12_04_BO /** - * @desc Check that IUT discards the message when signing AT certificate has an invalid signature + * @desc Check that the IUT discards a message when the signing AT certificate contains a CAM AID-SSP record whereas the issuing AA certificate does not contain the record with AID_CAM *
              * 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 the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_13_01_BO_AT
              *  }
              *  ensure that {
              *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields ['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate'
-             *                  and containing certificates (CERT_TS_A_AT)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_TS_A_AA
-             *                      and containing signature
-             *                          NOT verifiable with CERT_TS_A_AA.subject_attributes['verification_key'].key
+             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_13_01_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_13_01_BO_AA
+             *                          containing validity_restrictions['its_aid_list']
+             *                              not containing 'AID_CAM'
+             *              and containing validity_restrictions['its_aid_ssp_list']
+             *                  containing a record
+             *                      containing its_aid
+             *                          indicating 'AID_CAM'
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_05_01_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_13_01_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_05_01_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_13_01_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20358,7 +26866,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20368,16 +26876,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_prepareSecuredCam_Bo( - cc_taCert_A, - -, - 1, - -, - e_certificate, - true, - true - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + v_securedGnPdu := f_sendSecuredCam(cc_taCert1301_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20396,42 +26895,41 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_05_01_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_13_01_BO /** - * @desc Check that IUT discards the message when the issuing AA certificate of the signing AT certificate has an invalid signature + * @desc Check that the IUT discards a message when the signing AT certificate contains a DENM AID-SSP record whereas the issuing AA certificate does not contain the AID record with AID_DENM *
              * 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 the IUT current time is greater than START_VALIDITY_AA and less than END_VALIDITY_AA
+             *      and the IUT current location is inside the CERT_TS_13_02_BO_AT
              *  }
              *  ensure that {
              *      when { 
-             *          the IUT is receiving a SecuredMessage
-             *              containing header_fields ['signer_info'].signer
-             *                  containing type
-             *                      indicating 'certificate_chain'
-             *                  and containing certificates[0] (CERT_TS_A_AT)
-             *                      containing signer_info.digest
-             *                          referencing to CERT_ROOT
-             *                      and containing signature
-             *                          NOT verifiable with CERT_ROOT.subject_attributes['verification_key'].key
-             *                  and containing certificates[1] (CERT_TS_A_AT)
-             *                      containing signer_info.digest
-             *                          referencing to a CERT_TS_A_AA
+             *          the IUT is receiving a Secured DENM (MSG_SEC_RCV_DENM_A)
+             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_13_02_BO_AT)
+             *                  containing signer_info.digest
+             *                      referencing to CERT_TS_13_02_BO_AA
+             *                          containing validity_restrictions['its_aid_list']
+             *                              not containing 'AID_DENM'
+             *              and containing validity_restrictions['its_aid_ssp_list']
+             *                  containing a record
+             *                      containing its_aid
+             *                          indicating 'AID_DENM'
              *      } then {
              *          the IUT discards the message
              *      }
              *  }
              * 
* - * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_05_02_BO + * @see ETSI TS 103 096-2 v1.2.2 TP_SEC_ITSS_RCV_CERT_13_02_BO * @reference ETSI TS 103 097 [1], clause 7.1 */ - testcase TC_SEC_ITSS_RCV_CERT_05_02_BO() runs on ItsGeoNetworking system ItsSecSystem { + testcase TC_SEC_ITSS_RCV_CERT_13_02_BO() runs on ItsGeoNetworking system ItsSecSystem { // Local variables var integer i; @@ -20444,7 +26942,7 @@ module ItsSecurity_TestCases { stop; } - // Test component configuration + // Test component configuration f_cf01Up(); // Test adapter configuration @@ -20454,17 +26952,7 @@ module ItsSecurity_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - v_securedGnPdu := f_prepareSecuredCam_Bo( - cc_taCert_A, - -, - 1, - -, - e_certificate_chain, - true, - false, - true - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)); + v_securedGnPdu := f_sendSecuredDenm(cc_taCert1302_BO, omit, e_certificate); f_sleep(PX_TNOAC); v_sentRawPayload := f_adaptPayloadForUtInd_m(v_securedGnPdu.gnPacket.packet.payload); @@ -20483,7 +26971,7 @@ module ItsSecurity_TestCases { // Postamble f_poNeighbour(); f_cf01Down(); - } // End of testcase TC_SEC_ITSS_RCV_CERT_05_02_BO + } // End of testcase TC_SEC_ITSS_RCV_CERT_13_02_BO } // End of group recvCertificatesProfile diff --git a/ttcn/AtsSecurity/ItsSecurity_TestControl.ttcn3 b/ttcn/AtsSecurity/ItsSecurity_TestControl.ttcn3 index 8cbd426b88a23bb0a42669dabdc13fd35893453d..e67c50cf4b638a65cb44c7184dd0a036601f9927 100644 --- a/ttcn/AtsSecurity/ItsSecurity_TestControl.ttcn3 +++ b/ttcn/AtsSecurity/ItsSecurity_TestControl.ttcn3 @@ -261,7 +261,28 @@ module ItsSecurity_TestControl { execute(TC_SEC_ITSS_RCV_DENM_08_02_BO()); execute(TC_SEC_ITSS_RCV_DENM_08_03_BO()); execute(TC_SEC_ITSS_RCV_DENM_08_04_BO()); - + if (PICS_ITS_C2C_MODE) { + execute(TC_SEC_ITSS_RCV_DENM_08_05_BV()); + } + execute(TC_SEC_ITSS_RCV_DENM_08_06_BO()); + execute(TC_SEC_ITSS_RCV_DENM_09_02_BO()); + execute(TC_SEC_ITSS_RCV_DENM_09_03_BO()); + execute(TC_SEC_ITSS_RCV_DENM_09_04_BO()); + execute(TC_SEC_ITSS_RCV_DENM_09_05_BO()); + execute(TC_SEC_ITSS_RCV_DENM_09_06_BO()); + execute(TC_SEC_ITSS_RCV_DENM_10_01_BO()); + execute(TC_SEC_ITSS_RCV_DENM_10_02_BO()); + execute(TC_SEC_ITSS_RCV_DENM_11_01_BO()); + execute(TC_SEC_ITSS_RCV_DENM_12_01_BO()); + execute(TC_SEC_ITSS_RCV_DENM_12_02_BO()); + execute(TC_SEC_ITSS_RCV_DENM_12_03_BO()); + execute(TC_SEC_ITSS_RCV_DENM_12_04_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_01_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_02_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_03_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_04_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_05_BO()); + execute(TC_SEC_ITSS_RCV_DENM_13_06_BO()); /** * @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 @@ -297,6 +318,8 @@ module ItsSecurity_TestControl { execute(TC_SEC_ITSS_RCV_GENMSG_09_02_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_09_03_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_09_04_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_09_05_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_09_06_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_10_01_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_10_02_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_11_01_BO()); @@ -304,6 +327,12 @@ module ItsSecurity_TestControl { execute(TC_SEC_ITSS_RCV_GENMSG_12_02_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_12_03_BO()); execute(TC_SEC_ITSS_RCV_GENMSG_12_04_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_01_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_02_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_03_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_04_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_05_BO()); + execute(TC_SEC_ITSS_RCV_GENMSG_13_06_BO()); } /** @@ -323,6 +352,55 @@ module ItsSecurity_TestControl { execute(TC_SEC_ITSS_RCV_CERT_04_01_BO()); execute(TC_SEC_ITSS_RCV_CERT_05_01_BO()); execute(TC_SEC_ITSS_RCV_CERT_05_02_BO()); + execute(TC_SEC_ITSS_RCV_CERT_06_01_BV()); + execute(TC_SEC_ITSS_RCV_CERT_06_02_BV()); + execute(TC_SEC_ITSS_RCV_CERT_06_03_BV()); + execute(TC_SEC_ITSS_RCV_CERT_06_04_BV()); + execute(TC_SEC_ITSS_RCV_CERT_06_05_BV()); + execute(TC_SEC_ITSS_RCV_CERT_06_06_BO()); + execute(TC_SEC_ITSS_RCV_CERT_06_07_BO()); + execute(TC_SEC_ITSS_RCV_CERT_06_08_BO()); + execute(TC_SEC_ITSS_RCV_CERT_07_01_BV()); + execute(TC_SEC_ITSS_RCV_CERT_07_02_BV()); + execute(TC_SEC_ITSS_RCV_CERT_07_03_BV()); + execute(TC_SEC_ITSS_RCV_CERT_07_04_BV()); + execute(TC_SEC_ITSS_RCV_CERT_07_05_BV()); + execute(TC_SEC_ITSS_RCV_CERT_07_06_BO()); + execute(TC_SEC_ITSS_RCV_CERT_07_07_BO()); + execute(TC_SEC_ITSS_RCV_CERT_07_08_BO()); + execute(TC_SEC_ITSS_RCV_CERT_08_01_BV()); + execute(TC_SEC_ITSS_RCV_CERT_08_02_BV()); + execute(TC_SEC_ITSS_RCV_CERT_08_03_BV()); + execute(TC_SEC_ITSS_RCV_CERT_08_04_BV()); + execute(TC_SEC_ITSS_RCV_CERT_08_05_BV()); + execute(TC_SEC_ITSS_RCV_CERT_08_06_BO()); + execute(TC_SEC_ITSS_RCV_CERT_08_07_BO()); + execute(TC_SEC_ITSS_RCV_CERT_08_08_BO()); + execute(TC_SEC_ITSS_RCV_CERT_08_09_BO()); + execute(TC_SEC_ITSS_RCV_CERT_09_01_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_02_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_03_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_04_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_05_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_06_BV()); + execute(TC_SEC_ITSS_RCV_CERT_09_07_BO()); + execute(TC_SEC_ITSS_RCV_CERT_09_08_BO()); + execute(TC_SEC_ITSS_RCV_CERT_09_09_BO()); + execute(TC_SEC_ITSS_RCV_CERT_09_10_BO()); + execute(TC_SEC_ITSS_RCV_CERT_09_11_BO()); + execute(TC_SEC_ITSS_RCV_CERT_10_01_BO()); + execute(TC_SEC_ITSS_RCV_CERT_10_02_BO()); + execute(TC_SEC_ITSS_RCV_CERT_10_03_BO()); + execute(TC_SEC_ITSS_RCV_CERT_11_01_BO()); + execute(TC_SEC_ITSS_RCV_CERT_11_02_BO()); + execute(TC_SEC_ITSS_RCV_CERT_11_03_BO()); + execute(TC_SEC_ITSS_RCV_CERT_11_04_BO()); + execute(TC_SEC_ITSS_RCV_CERT_12_01_BO()); + execute(TC_SEC_ITSS_RCV_CERT_12_02_BO()); + execute(TC_SEC_ITSS_RCV_CERT_12_03_BO()); + execute(TC_SEC_ITSS_RCV_CERT_12_04_BO()); + execute(TC_SEC_ITSS_RCV_CERT_13_01_BO()); + execute(TC_SEC_ITSS_RCV_CERT_13_02_BO()); } } // End of 'control' statement