Skip to content
titanization.patch 1.83 MiB
Newer Older
23001 23002 23003 23004 23005 23006 23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 23045 23046 23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 23085 23086 23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 23125 23126 23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 23165 23166 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 23205 23206 23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 23245 23246 23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 23449 23450 23451 23452 23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 23472 23473 23474 23475 23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 23495 23496 23497 23498 23499 23500 23501 23502 23503 23504 23505 23506 23507 23508 23509 23510 23511 23512 23513 23514 23515 23516 23517 23518 23519 23520 23521 23522 23523 23524 23525 23526 23527 23528 23529 23530 23531 23532 23533 23534 23535 23536 23537 23538 23539 23540 23541 23542 23543 23544 23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 23571 23572 23573 23574 23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 23594 23595 23596 23597 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 23640 23641 23642 23643 23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 23663 23664 23665 23666 23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 23692 23693 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 23707 23708 23709 23710 23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 23779 23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 23799 23800 23801 23802 23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 23825 23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 23845 23846 23847 23848 23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 23869 23870 23871 23872 23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 23892 23893 23894 23895 23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 23922 23923 23924 23925 23926 23927 23928 23929 23930 23931 23932 23933 23934 23935 23936 23937 23938 23939 23940 23941 23942 23943 23944 23945 23946 23947 23948 23949 23950 23951 23952 23953 23954 23955 23956 23957 23958 23959 23960 23961 23962 23963 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 23978 23979 23980 23981 23982 23983 23984 23985 23986 23987 23988 23989 23990 23991 23992 23993 23994 23995 23996 23997 23998 23999 24000
+             *          containing header_fields['signer_info'].signer 
+             *              containing certificate (CERT_TS_MSG_06_02_BO_AT)
+             *                  containing validity_restrictions['time_start_and_end']
+             *                      containing start_validity
+             *                          indicating START_VALIDITY_AT
+             *                      and containing end_validity
+             *                          indicating END_VALIDITY_AT
+             *          and containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating GEN_TIME > END_VALIDITY_AT
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_02_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_06_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var ValidityRestriction v_validity;
+                
+                // 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
+                f_getCertificateValidityRestriction(vc_atCertificate, e_time_start_and_end, v_validity);
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert0602_BO, 
+                    {
+                        m_header_field_generation_time(
+                            (v_validity.validity.time_start_and_end.end_validity + 3600) * 1000
+                        ) // In us
+                    }, 
+                    e_certificate
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_06_02_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM if the generation_time is more than 10 minute in the past (C2C only)
+             * <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_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating GEN_TIME ( CURRENT_TIME - 11min )
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_03_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_06_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // 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_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_time( 
+                            (1000 * f_getCurrentTime() - 660) * 1000
+                        ) // In us
+                    }, 
+                    e_certificate
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_06_03_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM if the generation_time is more than 10 minute in the future(C2C only)
+             * <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_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating GEN_TIME ( CURRENT_TIME + 11min )
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_06_04_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_06_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // 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_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_time( 
+                            (1000 * f_getCurrentTime() + 660) * 1000
+                        ) // In us
+                    }, 
+                    e_certificate
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_06_04_BO
+            
+            /**
+             * @desc  Check that IUT discards secured DENM when its_aid value is not equal to AID_DENM
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
+             *              containing header_fields['its_aid']
+             *                  indicating 'AID_CAM'
+             *              and containing payload_field 
+             *                  containing type    
+             *                    indicating 'signed' 
+             *                  containing data    
+             *                    containing DENM payload
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             *  }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_07_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_07_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                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_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_its_aid_CAM
+                    }
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_07_01_BO
+            
+            /**
+             * @desc  Check that IUT discards a Secured DENM when its_aid value is undefined
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the 'authorized' state
+             *  }
+             *  ensure that {
+             *      when { 
+             *          the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
+             *             containing header_fields['its_aid'] 
+             *                 indicating 'AID_UNDEFINED' 
+             *             and containing payload_field { 
+             *                 containing type 
+             *                     indicating 'signed' 
+             *                 containing data 
+             *                     containing DENM payload 
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             *  }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_07_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_07_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                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_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_its_aid_Other
+                    }
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_07_02_BO
+            
+            /**
+             * @desc   Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the circular validity region of the signing 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
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is requested to send DENM
+             *   } then {
+             *     the IUT is receiving a SecuredMessage
+             *          containing header_fields['signer_info'].type
+             *              indicating 'certificate'
+             *          and containing  header_fields ['signer_info'].certificate (CERT_AT_B)
+             *              containing validity_restrictions['region']
+             *                  containing region
+             *                      containing region_type
+             *                          indicating 'circle'
+             *                      and containing circular_region
+             *                          indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              containing generation_location
+             *                  indicating position outside the REGION
+             *          and containing header_fields['its_aid']
+             *              indicating 'AID_DENM'
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                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_sendSecuredDenm(cc_taCert_B_BO, omit, e_certificate);
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_08_01_BO
+            
+            /**
+             * @desc    Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the rectangilar validity region of the signing certificate
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY and PICS_USE_RECTANGULAR_REGION
+             * Config Id: CF01
+             * Initial conditions:
+             * with {
+             *   the IUT being in the 'authorized' state
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is requested to send DENM
+             *   } then {
+             *     the IUT is receiving a SecuredMessage
+             *          containing header_fields['signer_info'].type
+             *              indicating 'certificate'
+             *          and containing  header_fields ['signer_info'].certificate (CERT_AT_C)
+             *              containing validity_restrictions['region']
+             *                  containing region
+             *                      containing region_type
+             *                          indicating 'rectangle'
+             *                      and containing rectangular_regions
+             *                          indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              containing generation_location
+             *                  indicating position outside the REGION
+             *          and containing header_fields['its_aid']
+             *              indicating 'AID_DENM'
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                if (not(PICS_GN_SECURITY) or not(PICS_USE_RECTANGULAR_REGION)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_USE_RECTANGULAR_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_sendSecuredDenm(cc_taCert_C_BO, omit, e_certificate);
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_08_02_BO
+            
+            /**
+             * @desc    Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the polygonal validity region of the signing 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
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is requested to send DENM
+             *   } then {
+             *     the IUT is receiving a SecuredMessage
+             *          containing header_fields['signer_info'].type
+             *              indicating 'certificate'
+             *          and containing  header_fields ['signer_info'].certificate (CERT_AT_D)
+             *              containing validity_restrictions['region']
+             *                  containing region
+             *                      containing region_type
+             *                          indicating 'polygon'
+             *                      and containing polygonal_region
+             *                          indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              containing generation_location
+             *                  indicating position outside the REGION
+             *          and containing header_fields['its_aid']
+             *              indicating 'AID_DENM'
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_03_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                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_sendSecuredDenm(cc_taCert_D_BO, omit, e_certificate);
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_08_03_BO
+            
+            /**
+             * @desc    Check that IUT discards Secured DENM if the HeaderField generation_location is outside of the identified validity region of the signing certificate 
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY and PICS_USE_IDENTIFIED_REGION
+             * Config Id: CF01
+             * Initial conditions:
+             * with {
+             *   the IUT being in the 'authorized' state
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is requested to send DENM
+             *   } then {
+             *     the IUT is receiving a SecuredMessage
+             *          containing header_fields['signer_info'].type
+             *              indicating 'certificate'
+             *          and containing  header_fields ['signer_info'].certificate (CERT_AT_E)
+             *              containing validity_restrictions['region']
+             *                  containing region
+             *                      containing region_type
+             *                          indicating 'id_region'
+             *                      and containing identified_region
+             *                          indicating REGION
+             *          and containing header_fields ['generation_location']
+             *              containing generation_location
+             *                  indicating position outside the REGION
+             *          and containing header_fields['its_aid']
+             *              indicating 'AID_DENM'
+             *      } then {
+             *          the IUT discards the DENM
+             *      }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_04_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test control
+                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_sendSecuredDenm(cc_taCert_E_BO, omit, e_certificate);
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                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_DENM_08_04_BO
+            
+            /**
+             * @desc    Check that IUT accepts a Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is 29.9 km (C2C only)
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
+             *          containing header_fields[generation_location].type 
+             *              indicating 'generation_location'
+             *          and containing generation_location
+             *              indicating position in 29.9 km from the current position of IUT
+             *   } then {
+             *     the IUT accepts the message
+             *   }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_05_BV
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_05_BV() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var Int32 v_latitude;
+                var Int32 v_longitude;
+                
+                
+                // Test control
+                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
+                fx_computePositionUsingDistance(
+                    v_longPosVectorNodeB.latitude,
+                    v_longPosVectorNodeB.longitude,
+                    29900.0, 
+                    0,
+                    v_latitude,
+                    v_longitude
+                );
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_latitude,
+                                v_longitude,
+                                '0000'O
+                            ))
+                        )
+                    }, 
+                    e_certificate_digest_with_sha256
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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: DENM was transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+                }
+                else {
+                    log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+                }
+                
+                // Postamble
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_DENM_08_05_BV
+            
+            /**
+             * @desc    Check that IUT discards Secured DENM if the distance between the current position of IUT and the value of optional HeaderField generation_location is more than 30 km
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Expected behavior:
+             * with {
+             *   the IUT being in the 'authorized' state
+             *   and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * }
+             * ensure that {
+             *   when {
+             *     the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A)
+             *          containing header_fields[generation_location].type 
+             *              indicating 'generation_location'
+             *          and containing generation_location
+             *              indicating position in 31 km from the current position of IUT
+             *   } then {
+             *     the IUT discards the message
+             *   }
+             * }
+             * </pre>
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_08_06_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_08_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var Int32 v_latitude;
+                var Int32 v_longitude;
+                
+                
+                // Test control
+                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
+                fx_computePositionUsingDistance(
+                    v_longPosVectorNodeB.latitude,
+                    v_longPosVectorNodeB.longitude,
+                    31000.0, 
+                    0,
+                    v_latitude,
+                    v_longitude
+                );
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_latitude,
+                                v_longitude,
+                                '0000'O
+                            ))
+                        )
+                    }, 
+                    e_certificate_digest_with_sha256
+                ); 
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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_DENM_08_06_BO
+            
+            /**
+             * @desc    Check that IUT discards the Secured DENM containing empty payload of type 'signed'
+             * <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_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing payload_field
+             *              containing type
+             *                  indicating 'signed'
+             *              and containing data
+             *                  indicating length 0
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_09_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_09_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
+                
+                // 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_gnNonSecuredPacket := valueof(
+                    m_geoNwBroadcastPacket(
+                        v_longPosVectorNodeB,
+                        vc_localSeqNumber,
+                        f_getGeoBroadcastArea(
+                            c_area1                 // Select area1 (see ETSI TS 102 871-2 Clause 4.2 Configuration 1)
+                )));
+                // Add the DENM payload
+                v_gnNonSecuredPacket.payload := valueof(
+                    f_adaptPayload_m(
+                        bit2oct(
+                            encvalue(
+                                m_denmReq(
+                                    m_denmPdu(
+                                        m_denm(
+                                            m_denmMgmtCon(
+                                                m_tsActionId
+                                            ),
+                                            v_situation,
+                                            m_denmLocation_zeroDelta
+                )))))));
+                
+                // Encode it
+                v_gnPayload := bit2oct(
+                    encvalue(
+                        v_gnNonSecuredPacket
+                    )
+                );
+                f_buildGnSecuredDenm(
+                    v_securedMessage,
+                    m_payload_signed(
+                        ''O
+                    ),
+                    e_certificate_digest_with_sha256,
+                    valueof(m_threeDLocation(
+                        v_longPosVectorNodeB.latitude,
+                        v_longPosVectorNodeB.longitude,
+                        '0000'O
+                    ))
+                );
+                v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage));
+                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu));
+                
+                f_sleep(PX_TNOAC);
+                v_sentRawPayload := f_adaptPayloadForUtInd_m(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 
+                } // End of 'for' statement
+                if (i < lengthof(vc_utInds)) {
+                    log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");