ItsSecurity_TestCases.ttcn 1.59 MB
Newer Older
//                
//                // Preamble
//                f_prNeighbour();
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert1005_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_10_05_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when its signing certificate contains 'time_start_and_duration' validity restriction
//             * <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 less then time_end validity restricyion of CERT_TS_10_06_BO_AT
//             *      and the IUT current location is inside the CERT_TS_10_06_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields['signer_info']
//             *                  and containing signer 
//             *                      containing type
garciay's avatar
garciay committed
//             *                          containing certificate
//             *                      and containing certificate (CERT_TS_10_06_BO_AT)
//             *                          containing signer_info.digest
//             *                              referencing to CERT_TS_10_06_BO_AA
//             *                                  containing validity_restrictions['time_start_and_duration']
//             *      } 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_10_06_BO
//             * @reference    ETSI TS 103 097 [1] Clauses 7.4.2 & 7.4.4
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_10_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
//                    stop;
//                }
//                
//                // Test component configuration
//                f_cf01Up();
//                
//                // Test adapter configuration
//                
//                // Preamble
//                f_prNeighbour();
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert1006_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_10_06_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the validity period of the signing certificate ends after the validity period of its issuing certificate
//             * <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 greater than START_VALIDITY_AA and less than END_VALIDITY_AA
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_01_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_A_AA
//             *                          containing validity_restrictions['time_start_and_end']
//             *                              containing start_validity
//             *                                  indicating START_VALIDITY_AA
//             *                              and containing end_validity
//             *                                  indicating END_VALIDITY_AA
//             *              and containing validity_restrictions['time_start_and_end'] 
//             *                  containing start_validity
//             *                      indicating START_VALIDITY_AA
//             *                  and containing end_validity
//             *                      indicating END_VALIDITY_AA + 1d
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_11_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_11_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_taCert1101_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_11_01_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the validity period of its signing certificate starts before the validity period of the issuing certificate 
//             * <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 greater than START_VALIDITY_AA and less than END_VALIDITY_AA
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_02_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_A_AA
//             *                          containing validity_restrictions['time_start_and_end']
//             *                              containing start_validity
//             *                                  indicating START_VALIDITY_AA
//             *                              and containing end_validity
//             *                                  indicating END_VALIDITY_AA
//             *              and containing validity_restrictions['time_start_and_end'] 
//             *                  containing start_validity
//             *                      indicating START_VALIDITY_AA - 1d
//             *                  and containing end_validity
//             *                      indicating END_VALIDITY_AA
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_11_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_11_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_taCert1102_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_11_02_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the issuing certificate of signing certificate is expired but the signing certificate is not expired yet.
//             * <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 greater than START_VALIDITY_AA and less than END_VALIDITY_AA
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_03_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_A_AA
//             *                          containing validity_restrictions['time_start_and_end']
//             *                              containing start_validity
//             *                                  indicating START_VALIDITY_AA - 365d
//             *                              and containing end_validity
//             *                                  indicating END_VALIDITY_AA - 1d
//             *              and containing validity_restrictions['time_start_and_end'] 
//             *                  containing start_validity
//             *                      indicating START_VALIDITY_AA - 365d
//             *                  and containing end_validity
//             *                      indicating END_VALIDITY_AA
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_11_03_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_11_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_taCert1103_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_11_03_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the validity period of the signing certificate is after the validity period of its issuing certificate
//             * <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 greater than START_VALIDITY_AA and less than END_VALIDITY_AA
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_11_04_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_A_AA
//             *                          containing validity_restrictions['time_start_and_end']
//             *                              containing start_validity
//             *                                  indicating START_VALIDITY_AA
//             *                              and containing end_validity
//             *                                  indicating END_VALIDITY_AA + 365d
//             *              and containing validity_restrictions['time_start_and_end'] 
//             *                  containing start_validity
//             *                      indicating START_VALIDITY_AA
//             *                  and containing end_validity
//             *                      indicating END_VALIDITY_AA + 365d
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_11_04_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_11_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
//                    stop;
//                }
//                
//                // Test component configuration
//                f_cf01Up();
//                
//                // Test adapter configuration
//                
//                // Preamble
//                f_prNeighbour();
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert1104_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_11_04_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when its signing certificate does not contain the SSP-AID subject attribute
//             * <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_12_01_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Ieee1609Dot2Data 
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_12_01_BO_AT)
//             *                  not containing subject_attributes['its_aid_ssp_list']
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_12_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.2
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_12_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_taCert1201_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_12_01_BO
//            
//            /**
//             * @desc    Check that the IUT discards a Secured CAM when its signing certificate does not contain a record with AID_CAM in the its_aid_ssp_list subject attribute 
//             * <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_12_02_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['its_aid']
//             *                      containing its_aid
//             *                          indicating 'AID_CAM'
//             *              and containing header_fields ['signer_info']
//             *                  containing signer
//             *                      containing certificate 
//             *                          indicating CERT_TS_12_02_BO_AT
//             *                              containing subject_attributes['its_aid_ssp_list']
//             *                                  not containing an item
//             *                                      containing its_aid
//             *                                          indicating 'AID_CAM'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_12_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.2
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_12_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_taCert1202_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_12_02_BO
//            
//            /**
//             * @desc    Check that the IUT discards a Secured DENM when its signing certificate does not contain a record with AID_DENM in the its_aid_ssp_list subject attribute
//             * <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_12_03_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured DENM (MSG_SEC_RCV_DENM_A)
//             *              containing header_fields ['its_aid']
//             *                      containing its_aid
//             *                          indicating 'AID_DENM'
//             *              and containing header_fields ['signer_info']
//             *                  containing signer
//             *                      containing certificate 
//             *                          indicating CERT_TS_12_03_BO_AT
//             *                              containing subject_attributes['its_aid_ssp_list']
//             *                                  not containing an item
//             *                                      containing its_aid
//             *                                          indicating 'AID_DENM'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_12_03_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.2
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_12_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_sendSecuredDenm(cc_taCert1203_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_12_03_BO
//            
//            /**
//             * @desc    Check that the IUT discards a Secured CAM when its signing certificate contains two records with AID_CAM in the its_aid_ssp_list subject attribute
//             * <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 greater than START_VALIDITY_AA and less than END_VALIDITY_AA
//             *      and the IUT current location is inside the CERT_TS_12_04_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['its_aid']
//             *                      containing its_aid
//             *                          indicating 'AID_CAM'
//             *              and containing header_fields ['signer_info']
//             *                  containing signer
//             *                      containing certificate 
//             *                          indicating CERT_TS_12_04_BO_AT
//             *                              containing subject_attributes['its_aid_ssp_list']
//             *                                  containing item [0].its_aid
//             *                                      indicating 'AID_CAM'
//             *                                  and containing item [1].its_aid
//             *                                      indicating 'AID_CAM'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_12_04_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.2
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_12_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
//                    stop;
//                }
//                
//                // Test component configuration
//                f_cf01Up();
//                
//                // Test adapter configuration
//                
//                // Preamble
//                f_prNeighbour();
//                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//                // Test Body
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert1204_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_12_04_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing AT certificate contains a CAM AID-SSP record whereas the issuing AA certificate does not contain the record with AID_CAM
//             * <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_13_01_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_13_01_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_13_01_BO_AA
//             *                          containing validity_restrictions['its_aid_list']
//             *                              not containing 'AID_CAM'
//             *              and containing validity_restrictions['its_aid_ssp_list']
//             *                  containing a record
//             *                      containing its_aid
//             *                          indicating 'AID_CAM'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_13_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_13_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_taCert1301_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_13_01_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing AT certificate contains a DENM AID-SSP record whereas the issuing AA certificate does not contain the AID record with AID_DENM 
//             * <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_13_02_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured DENM (MSG_SEC_RCV_DENM_A)
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_13_02_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_13_02_BO_AA
//             *                          containing validity_restrictions['its_aid_list']
//             *                              not containing 'AID_DENM'
//             *              and containing validity_restrictions['its_aid_ssp_list']
//             *                  containing a record
//             *                      containing its_aid
//             *                          indicating 'AID_DENM'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_13_02_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_13_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_sendSecuredDenm(cc_taCert1302_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_13_02_BO
//            
//            /**
//             * @desc    Check that IUT discards a Ieee1609Dot2Data if the AA certificate does not contain a subject_attribute of type its_aid_list
//             * <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_13_03_BO_AT
//             *  }
//             *  ensure that {
//             *      when { 
//             *          the IUT is receiving a Secured CAM (MSG_SEC_RCV_CAM_01)
//             *              containing header_fields ['signer_info'].signer.certificate (CERT_TS_13_03_BO_AT)
//             *                  containing signer_info.digest
//             *                      referencing to CERT_TS_13_03_BO_AA
//             *                          not containing validity_restrictions['its_aid_list']
//             *      } 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_13_03_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_13_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_sendSecuredDenm(cc_taCert1303_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_13_03_BO
//            
//            /**
//             * @desc    Check that IUT discards the AT certificate with signer info of type '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_14_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_14_01_BO_AT)
//             *                  containing signer_info.type
garciay's avatar
garciay committed
//             *                      containing certificate
//             *                      and containing certificate
//             *                          indicating CERT_TS_AA_A
//             *      } 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_14_01_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.2
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_14_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_taCert1401_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***");