ItsSecurity_TestCases.ttcn 1.59 MB
Newer Older
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_12_03_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.3 & 7.3
//             */
//            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'
//             * <pre>
//             * 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 Ieee1609Dot2Data (MSG_SEC_RCV_GENMSG_A)
//             *          containing header_fields['signer_info']
//             *              containing signer
//             *                  containing type
garciay's avatar
garciay committed
//             *                      containing certificate
//             *                  containing certificate (CERT_TS_A_CA)
//             *                      containing subject_info.subject_type
//             *                          indicating 'enrolment_credentials'
//             *   } then {
//             *       the IUT discards the message
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_12_04_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.3 & 7.3
//             */
//            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_info_signer_info(
//                                m_issuerIdentifier_sha256AndDigest(
//                                    vc_atCertificate.signer_info.signerInfo.digest
//                            )), 
//                            m_header_info_generation_time(1000 * f_getCurrentTime()), // In us
//                            m_header_info_generation_location(
//                                valueof(m_threeDLocation(
//                                    PX_WGSLATITUDE,
//                                    PX_WGSLONGITUDE,
//                                    '0000'O
//                                ))
//                            ),
//                            m_header_info_its_aid_Other
//                        }, 
//                        e_certificate,
//                        true
//                    ); 
//                    f_sendGeoNetMessage(valueof(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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_03_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_04_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_05_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_13_06_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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_13_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_selfOrClientSyncAndVerdict(c_prDone, e_success);
//                    
//                    // Test Body
//                    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
garciay's avatar
garciay committed
         * @see ETSI TS 103 096-2 V1.3.32 (2018-01) Clause 5.3.5 Profiles for certificates
        group recvCertificatesProfile {
//            /**
//             * @desc    Check that IUT discards the AT certificate with version 3
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_01_01_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields['signer_info'].signer
//             *                  containing type
garciay's avatar
garciay committed
//             *                      containing certificate
//             *                  and containing certificate (CERT_TS_01_01_BO_AT)
//             *                      containing  version
//             *                          indicating '3'
//             *      } then {
//             *          the IUT discards  the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_01_01_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.1 & 7.4.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 := valueof(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
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_01_02_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields['signer_info'].signer
//             *                  containing type
garciay's avatar
garciay committed
//             *                      containing certificate
//             *                  and containing certificate (CERT_TS_01_02_BO_AT)
//             *                      containing  version
//             *                          indicating '1'
//             *      } then {
//             *          the IUT discards  the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_01_02_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.1 & 7.4.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 := valueof(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
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_01_03_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              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
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_01_03_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.1 & 7.4.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 := valueof(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
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_01_04_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              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
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_01_04_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.1 & 7.4.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();
//                if (PICS_DEBUG_ADDON) {
//                    f_sendCertificateAndWaitForCertificateChainRequest(cc_taCert_F, f_generateDefaultCam());
//                }
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert0104_BO, -, e_certificate_chain);
//                
//                f_sleep(PX_TNOAC);
//                v_sentRawPayload := valueof(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 Ieee1609Dot2Data if the issuer certificate of the authorization ticket certificate contains the subject type 'enrolment_credential'
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_02_01_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields['signer_info'].signer
//             *                  containing type
garciay's avatar
garciay committed
//             *                      containing 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
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_02_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 6.3
//             */
//            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 := valueof(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 Ieee1609Dot2Data if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_credential'
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_02_02_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              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
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_02_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 6.3
//             */
//            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 := valueof(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
//