ItsSecurity_TestCases.ttcn 1.6 MB
Newer Older
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert1801_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_18_01_BO
//            
//            /**
//             * @desc    Check that IUT discards a Ieee1609Dot2Data if the subject attribute of type verification_key is missing in the AA certificate
//             * <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_18_01_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['signer_info'].signer.type
garciay's avatar
garciay committed
//             *                  containing certificate
//             *              and containing certificate (CERT_TS_18_02_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to certificate (CERT_TS_18_02_BO_AA)
//             *                          not containing subject_attributes['verification_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_CERT_18_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_18_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_taCert1802_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_18_02_BO
//            
//            /**
//             * @desc    Check that IUT discards a Ieee1609Dot2Data if the reserved region type has been used in region validity restriction of the AT certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_19_01_BO_AT)
//             *                  containing region_type
//             *                      indicating 240
//             *      } 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_19_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 4.2.2.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_19_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_taCert1901_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_19_01_BO
//            
        } // End of group recvCertificatesProfile
//        
//    } // End of group receiverbehavior
//    
} // End of module ItsSecurity_TestCase