ItsSecurity_TestCases.ttcn 1.6 MB
Newer Older
//                v_securedGnPdu := f_sendSecuredCam(cc_taCert0707_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_07_07_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing certificate of this message contains rectangular region validity restriction which is not fully covered by the the rectangular region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_CIRCULAR_REGION
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_07_08_BO_AT
//             *      and the IUT current location is inside the RECT_REGION_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_07_08_BO_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'rectangle'
//             *                              containing rectangular_region[0]
//             *                                  indicating RECT_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_07_08_BO_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'rectangle'
//             *                                      and containing rectangular_region[0]
//             *                                          indicating RECT_REGION_AA_INTERSECT
//             *                                              not partialy RECT_REGION_AT
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_07_08_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_07_08_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_CIRCULAR_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_CIRCULAR_REGION' 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_taCert0708_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_07_08_BO
//            
//            /**
//             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the same polygonal region validity restriction as its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_01_BV_AT
//             *      and the IUT current location is inside the POLYGON_REGION_AA
//             *  }
//             *  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_08_01_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AA
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_D_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'polygon'
//             *                                      and containing polygonal_region
//             *                                          indicating POLYGON_REGION_AA
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_01_BV
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0801_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_08_01_BV
//            
//            /**
//             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the circular region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_02_BV_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_02_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_B_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'circle'
//             *                                      and containing circular_region
//             *                                          indicating CURCULAR_REGION_AA
//             *                                              fully including POLYGON_REGION_AT
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_02_BV
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_02_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0802_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_08_02_BV
//            
//            /**
//             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the rectangular region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_03_BV_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_03_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_C_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'rectangle'
//             *                                      and containing rectangular_region[0]
//             *                                          indicating RECT_REGION_AA
//             *                                              fully including POLYGON_REGION_AT
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_03_BV
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_03_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0803_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_08_03_BV
//            
//            /**
//             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the polygonal region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_04_BV_AT
//             *      and the IUT current location is inside the POLYGON_REGION_AA
//             *  }
//             *  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_08_04_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_D_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'polygon'
//             *                                      and containing polygonal_region[0]
//             *                                          indicating POLYGON_REGION_AA
//             *                                              fully including POLYGON_REGION_AT
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_04_BV
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_04_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0804_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_08_04_BV
//            
//            /**
//             * @desc    Check that the IUT accepts a message when the signing certificate of this message contains the polygonal region validity restriction which is fully inside in the identified region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_05_BV_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_05_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_D_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'id'
//             *                                      and containing id_region
//             *                                          containing region_dictionary
//             *                                              indicating 'iso_3166_1'
//             *                                          and containing local_region
//             *                                              indicating 0
//             *                                          and containing region_identifier
//             *                                              indicating ID_REGION_AT
//             *                                                  fully including POLYGON_REGION_AT
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_05_BV
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_05_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0805_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_08_05_BV
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the polygonal region validity restriction
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_06_BO_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_06_BO_AT)
//             *                          not containing validity_restrictions['region']
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_C_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'rectangle'
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_06_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_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) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0806_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_08_06_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing certificate of this message does not contain the region validity restriction but its issuing certificate contains the polygonal region validity restriction
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_07_BO_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_07_BO_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region (POLYGON_REGION_08_04_BO)
//             *                                  indicating length = 2
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_D_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'polygon'
//             *                                      and containing polygonal_region
//             *                                          indicating POLYGON_REGION_AA
//             *                                              fully covering all points of POLYGON_REGION_08_04_BO
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_07_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_07_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0807_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_08_07_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing certificate of this message contains polygonal region validity restriction which is outside of the polygonal region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_08_BO_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_08_BO_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_D_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'polygon'
//             *                                      and containing polygonal_region
//             *                                          indicating POLYGON_REGION_AA_OUTSIDE
//             *                                              not including POLYGON_REGION_AT
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_08_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_08_BO() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0808_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_08_08_BO
//            
//            /**
//             * @desc    Check that the IUT discards a message when the signing certificate of this message contains polygonal region validity restriction which is not fully covered by the the polygonal region validity restriction of its issuing certificate
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION
//             * 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_08_09_BO_AT
//             *      and the IUT current location is inside the POLYGON_REGION_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_08_09_BO_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'polygon'
//             *                              containing polygonal_region
//             *                                  indicating POLYGON_REGION_AT
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_08_08_BO_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'polygon'
//             *                                      and containing polygonal_region
//             *                                          indicating POLYGON_REGION_AA_INTERSECT
//             *                                              including partialy POLYGON_REGION_AT
//             *      } then {
//             *          the IUT discards the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_08_09_BO
//             * @reference    ETSI TS 103 097 [1] Clause 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_08_09_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) or not(PICS_USE_POLYGONAL_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_POLYGONAL_REGION' 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_taCert0809_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_08_09_BO
//            
//            /**
//             * @desc    Check that the IUT accepts a message when its signing certificate contains the identified region validity restriction with the same identified region as the issuing certificate and without local area definition 
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_09_01_BV_AT
//             *      and the IUT current location is inside the ID_REGION_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_09_01_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'id'
//             *                              and containing id_region
//             *                                  containing region_dictionary
//             *                                      indicating 'iso_3166_1'
//             *                                  and containing region_identifier
//             *                                      indicating ID_REGION_AT
//             *                                  and containing local_region
//             *                                      indicating 0
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_E_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'id'
//             *                                      and containing id_region
//             *                                          containing region_dictionary
//             *                                              indicating 'iso_3166_1'
//             *                                          and containing region_identifier
//             *                                              indicating ID_REGION_AT
//             *                                          and containing local_region
//             *                                              indicating 0
//             *      } then {
//             *          the IUT accepts the message
//             *      }
//             *  }
//             * </pre>
//             *
garciay's avatar
garciay committed
//             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CERT_09_01_BV
//             * @reference    ETSI TS 103 097 [1] Clauses 4.2.26 and 7.4.1
//             */
//            testcase TC_SEC_ITSS_RCV_CERT_09_01_BV() runs on ItsGeoNetworking system ItsSecSystem {
//                
//                // Local variables
//                var integer i;
//                var GeoNetworkingPdu v_securedGnPdu;
//                var GnRawPayload v_sentRawPayload;
//                
//                // Test adapter configuration
//                if (not(PICS_GN_SECURITY) or not(PICS_USE_IDENTIFIED_REGION)) {
//                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION' 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_taCert0901_BV, 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() & ": PASS: GN was transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
//                }
//                else {
//                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer***");
//                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
//                }
//                
//                // Postamble
//                f_poNeighbour();
//                f_cf01Down();
//            } // End of testcase TC_SEC_ITSS_RCV_CERT_09_01_BV
//            
//            /**
//             * @desc    Check that the IUT accepts a message when its signing certificate contains the identified region validity restriction with the same identified region as the issuing certificate and with local area definition 
//             * <pre>
//             * Pics Selection: PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION
//             * Config Id: CF01
//             * Initial conditions:
//             *  with {
//             *      the IUT being in the 'authorized' state
//             *      and the IUT current time is inside the time validity period of CERT_TS_09_02_BV_AT
//             *      and the IUT current location is inside the ID_REGION_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_09_02_BV_AT)
//             *                          containing validity_restrictions['region']
//             *                              containing region_type
//             *                                  indicating 'id'
//             *                              and containing id_region
//             *                                  containing region_dictionary
//             *                                      indicating 'iso_3166_1'
//             *                                  and containing region_identifier
//             *                                      indicating ID_REGION_AT
//             *                                  and containing local_region
//             *                                      indicating ID_LOCAL_REGION_1
//             *                          and containing signer_info.digest
//             *                              referencing to a CERT_TS_E_AA
//             *                                  containing validity_restrictions['region']
//             *                                      containing region_type
//             *                                          indicating 'id'
//             *                                      and containing id_region
//             *                                          containing region_dictionary
//             *                                              indicating 'iso_3166_1'
//             *                                          and containing region_identifier