Skip to content
titanization.patch 1.83 MiB
Newer Older
18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_CAM_05_04_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields contains a signer info of unknown or reserved type
+             * <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_CAM_02) 
+             *          containing header_fields['signer_info']
+             *                  containing signer.type
+             *                      indicating X_UNKNOWN_SIGNERINFO_TYPE
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_05_05_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_05_05_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_unknown(
+                                'CAFFEEDECA'O
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_its_aid_CAM
+                    }, 
+                    e_unknown,
+                    false
+                ); 
+                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_CAM_05_05_BO
+            
+            /**
+             * @desc    Check that IUT discards message containing generation_time before the certificate validity period
+             * <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_CAM_01)
+             *              and containing header_fields['signer_info'].signer 
+             *                  containing certificate (CERT_TS_MSG_06_01_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 < START_VALIDITY_AT
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_06_01_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_06_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var ValidityRestriction v_timeValidity;
+                
+                // 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_timeValidity);
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert0601_BO, 
+                    {
+                        m_header_field_generation_time( 
+                            (v_timeValidity.validity.time_start_and_end.start_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_CAM_06_01_BO
+            
+            /**
+             * @desc    Check that IUT discards message containing generation_time after the certificate validity period
+             * <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_CAM_01)
+             *              and 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_CAM_06_02_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_06_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var ValidityRestriction v_timeValidity;
+                
+                // 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_timeValidity);
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert0602_BO, 
+                    {
+                        m_header_field_generation_time( 
+                            (v_timeValidity.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_CAM_06_02_BO
+            
+            /**
+             * @desc    Check that IUT discards Secured CAM if the generation_time is more than 5 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
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating GEN_TIME ( CURRENT_TIME - 302sec )
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_06_03_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_06_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_time(
+                            (1000 * f_getCurrentTime() - 302) * 1000
+                        ) // In us
+                    },
+                    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 
+                } // 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_CAM_06_03_BO
+            
+            /**
+             * @desc    Check that IUT discards Secured CAM if the generation_time is more than 5 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
+             *          containing header_fields ['generation_time']
+             *              containing generation_time
+             *                  indicating GEN_TIME ( CURRENT_TIME + 302sec )
+             *      } then {
+             *          the IUT discards the message
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_06_04_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_06_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_time(
+                            (1000 * f_getCurrentTime() + 302) * 1000
+                        ) // In us
+                    },
+                    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 
+                } // 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_CAM_06_04_BO
+            
+            /**
+             * @desc    Check that IUT discards secured CAM when its_aid value is not AID_CAM
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *     when {  
+             *         the IUT is receiving a SecuredMessage (MSG_SEC_RCV_CAM_01) 
+             *             containing header_fields['its_aid'] 
+             *                 indicating AID_DENM 
+             *             and containing payload_field { 
+             *                 containing type 
+             *                     indicating 'signed' 
+             *                 containing data 
+             *                     containing CAM payload 
+             *             } 
+             *     } then { 
+             *         the IUT discards the message 
+             *     } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_07_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_07_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_its_aid_DENM
+                    },
+                    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 
+                } // 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_CAM_07_01_BO
+            
+            /**
+             * @desc    Check that IUT discards secured CAM 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 
+             *  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_CAM_01) 
+             *             containing header_fields['its_aid'] 
+             *                 indicating 'AID_UNDEFINED' 
+             *             and containing payload_field { 
+             *                 containing type 
+             *                     indicating 'signed' 
+             *                 containing data 
+             *                     containing CAM payload 
+             *             } 
+             *     } then { 
+             *         the IUT discards the message 
+             *     } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_07_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_07_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_its_aid_Other
+                    },
+                    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 
+                } // 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_CAM_07_02_BO
+            
+            /**
+            * @desc    Check that IUT discards the Secured CAM 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_CAM_01)
+            *               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_CAM_09_02_BO
+            * @reference    ETSI TS 103 097 [1], clause 7.1
+            */
+            testcase TC_SEC_ITSS_RCV_CAM_09_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
+                v_gnNonSecuredPacket.payload := valueof(
+                    f_adaptPayload_m(
+                        bit2oct(
+                            encvalue(
+                                m_camReq(
+                                    m_camMsg_vehicle_HF_BV(
+                                        f_getTsStationId(),
+                                        f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
+                                        LibItsCam_Templates.m_tsPosition
+                ))))));
+                v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
+                f_buildGnSecuredCam(
+                    v_securedMessage,
+                    m_payload_signed(
+                        ''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
+                }
+                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_CAM_09_02_BO
+            
+            /**
+            * @desc    Check that IUT discards the Secured CAM containing non-empty payload of type 'unsecured'
+            * <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_CAM_01)
+            *               containing payload_field
+            *                   containing type
+            *                       indicating 'unsecured'
+            *                   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_CAM_09_03_BO
+            * @reference    ETSI TS 103 097 [1], clause 7.1
+            */
+            testcase TC_SEC_ITSS_RCV_CAM_09_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
+                v_gnNonSecuredPacket.payload := valueof(
+                    f_adaptPayload_m(
+                        bit2oct(
+                            encvalue(
+                                m_camReq(
+                                    m_camMsg_vehicle_HF_BV(
+                                        f_getTsStationId(),
+                                        f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
+                                        LibItsCam_Templates.m_tsPosition
+                ))))));
+                v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
+                f_buildGnSecuredCam(
+                    v_securedMessage,
+                    m_payload_unsecured(
+                        v_gnPayload
+                    )
+                );
+                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
+                }
+                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_CAM_09_03_BO
+
+            /**
+            * @desc    Check that IUT discards the Secured CAM containing non-empty payload of type 'encrypted'
+            * <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_CAM_01)
+            *               and containing payload_field
+            *                   containing type
+            *                       indicating 'encrypted'
+            *                   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_CAM_09_04_BO
+            * @reference    ETSI TS 103 097 [1], clause 7.1
+            */
+            testcase TC_SEC_ITSS_RCV_CAM_09_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
+                v_gnNonSecuredPacket.payload := valueof(
+                    f_adaptPayload_m(
+                        bit2oct(
+                            encvalue(
+                                m_camReq(
+                                    m_camMsg_vehicle_HF_BV(
+                                        f_getTsStationId(),
+                                        f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
+                                        LibItsCam_Templates.m_tsPosition
+                ))))));
+                v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
+                f_buildGnSecuredCam(
+                    v_securedMessage,
+                    m_payload_encrypted(
+                        v_gnPayload
+                    )
+                );
+                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
+                }
+                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_CAM_09_04_BO
+            
+            /**
+            * @desc    Check that IUT discards the Secured CAM containing exactly one non-empty payload of type 'signed_external'
+            * <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_CAM_01)
+            *              containing payload_field
+            *                   containing type
+            *                       indicating 'signed_external'
+            *                   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_CAM_09_05_BO
+            * @reference    ETSI TS 103 097 [1], clause 7.1
+            */
+            testcase TC_SEC_ITSS_RCV_CAM_09_05_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_gnNonSecuredPacket := valueof(m_geoNwShbPacket(f_getPosition(c_compNodeC)));
+                v_gnNonSecuredPacket.payload := valueof(
+                    f_adaptPayload_m(
+                        bit2oct(
+                            encvalue(
+                                m_camReq(
+                                    m_camMsg_vehicle_HF_BV(
+                                        f_getTsStationId(),
+                                        f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
+                                        LibItsCam_Templates.m_tsPosition
+                ))))));
+                v_gnPayload := bit2oct(encvalue(v_gnNonSecuredPacket));
+                f_buildGnSecuredCam(
+                    v_securedMessage,
+                    m_payload_signed_external(
+                        v_gnPayload
+                    )
+                );
+                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
+                }
+                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_CAM_09_05_BO
+            
+            /**
+            * @desc    Check that IUT discards the Secured CAM containing non-empty payload of type 'signed_and_encrypted'
+            * <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_CAM_01)
+            *              containing payload_field
+            *                   containing type
+            *                       indicating 'signed_and_encrypted'
+            *                   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_CAM_09_06_BO
+            * @reference    ETSI TS 103 097 [1], clause 7.1
+            */
+            testcase TC_SEC_ITSS_RCV_CAM_09_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnNonSecuredPacket v_gnNonSecuredPacket;
+                var octetstring v_gnPayload;
+                var template (value) SecuredMessage v_securedMessage;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();