ItsSecurity_TestCases.ttcn 1.59 MB
Newer Older
//                    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) Ieee1609Dot2Data 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(valueof(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'
//             * <pre>
//             * 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 Ieee1609Dot2Data (MSG_SEC_RCV_GENMSG_A) 
//             *          containing payload_field
//             *              containing type
//             *                  indicating 'unsecured'
//             *              and containing data
//             *                  indicating length > 0
//             *  } 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_09_03_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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) Ieee1609Dot2Data 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(valueof(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'
//             * <pre>
//             * 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 Ieee1609Dot2Data (MSG_SEC_RCV_GENMSG_A) 
//             *          containing payload_field
//             *              containing type
//             *                  indicating 'encrypted'
//             *              and containing data
//             *                  indicating length > 0
//             *  } 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_09_04_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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) Ieee1609Dot2Data 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(valueof(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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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 
//             *  } 
//             * } 
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_05_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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) Ieee1609Dot2Data 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(valueof(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
//             * <pre>
//             * 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 Ieee1609Dot2Data (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 
//             *  } 
//             * } 
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_09_06_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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) Ieee1609Dot2Data 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(valueof(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' 
//             * <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
//             *         containing trailer_fields
//             *             not containing trailer_fields['signature']
//             *   } 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_10_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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'
//             * <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
//             *         containing trailer_fields[0]
//             *             containing type
//             *                 indicating 'signature'
//             *             and containing trailer_fields[1]
//             *                 containing type
//             *                     indicating 'signature'
//             *   } 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_10_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.3
//             */
//            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
//             * <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
//            *            the IUT is receiving a Ieee1609Dot2Data (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
//             *   }
//             * }
//             * </pre>
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_GENMSG_11_01_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 4.2.2 & 7.3
//             */
//            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(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_11_01_BO
//            
//            /**
//             * @desc    Check that IUT discards the Secured Message if the message contains trailer field of type 'signature' with reserved public key algorythms
//             * <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
//            *            the IUT is receiving a Ieee1609Dot2Data (MSG_SEC_RCV_GENMSG_A)
//            *                containing trailer_fields
//            *                    containing an instance of type TrailerField
//            *                        containing type
//            *                            indicating 'signature'
//            *                        and containing signature
//            *                            indicating X_RESERVED_PK_ALGORYTHM
//             *   } 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_11_02_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 4.2.2 & 7.3
//             */
//            testcase TC_SEC_ITSS_RCV_GENMSG_11_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_11_0x_BO_nodeB(3));
//                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_02_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(
//                                                                 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, 
//                        -, 
//                        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'
//             * <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_EC_A)
//             *                      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_01_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.3 & 7.3
//             */
//            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'
//             * <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_AA)
//             *                      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_02_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 6.3 & 7.3
//             */
//            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'
//             * <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_EA)
//             *                      containing subject_info.subject_type
//             *                          indicating 'enrolment_credentials'
//             *   } then {
//             *       the IUT discards the message