Skip to content
titanization.patch 1.83 MiB
Newer Older
16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000
+             *                      indicating 'AID_CAM'
+             *              and not containing any other header fields
+             *              and containing payload_field 
+             *                  containing type
+             *                      indicating 'signed'
+             *                  containing data
+             *                      indicating length > 0
+             *                      containing CAM payload
+             *              and containing trailer_fields
+             *                  containing single instance of type TrailerField
+             *                      containing type
+             *                          indicating 'signature'
+             *                      containing signature
+             *                          verifiable using KEY
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_01_02_BV
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_01_02_BV() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_sendSecuredCam(cc_taCert_A, omit, e_certificate_digest_with_sha256);
+                
+                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: GN was transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+                }
+                else {
+                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+                }
+                
+                // Postamble
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_CAM_01_02_BV
+            
+            /**
+             * @desc    Check that IUT accepts a well-formed Secured CAM containing certificate chain in signer_info
+             * <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 protocol_version 
+             *                  indicating value '2'
+             *              and containing header_fields[0]
+             *                  containing type 
+             *                      indicating 'signer_info'
+             *                  and containing signer
+             *                      containing type
+             *                          indicating 'certificate_chain'
+             *                      and containing certificates
+             *                          containing certificate (CERT_TS_A_AA) at index 0 
+             *                              containing subject_info.subject_type
+             *                                  indicating 'authorization_authority'
+             *                              and containing subject_attributes['verification key'] (KEY_TS_AA)
+             *                          and containing certificate (CERT_TS_A_AT) at index 1 
+             *                              containing subject_info.subject_type
+             *                                  indicating 'authorization_ticket'
+             *                              and containing signer_info 
+             *                                  containing type
+             *                                      indicating 'certificate_digest_with_sha256'
+             *                                  containing digest
+             *                                      referencing to the CERT_TS_A_AA
+             *                              and containing signature
+             *                                  verifiable using KEY_TS_AA
+             *                              and containing subject_attributes['verification key'] (KEY_TS_AT)
+             *              and containing header_fields [1] 
+             *                  containing type
+             *                      indicating 'generation_time'
+             *                  containing generation_time
+             *                      indicating CURRENT_TIME
+             *              and containing header_fields[2] 
+             *                  containing type
+             *                      indicating 'its_aid'
+             *                  containing its_aid
+             *                      indicating 'AID_CAM'
+             *              and not containing any other header fields
+             *              and containing payload_field 
+             *                  containing type
+             *                      indicating 'signed'
+             *                  containing data
+             *                      indicating length > 0
+             *                      containing CAM payload
+             *              and containing trailer_fields 
+             *                  containing single instance of type TrailerField 
+             *                      containing type
+             *                          indicating 'signature'
+             *                      containing signature
+             *                          verifiable using KEY_TC_AT
+             *      } then {
+             *          the IUT accepts the message
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_01_03_BV
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_01_03_BV() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_sendSecuredCam(cc_taCert_A, -, e_certificate_chain);
+                
+                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: GN was transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+                }
+                else {
+                    log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
+                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
+                }
+                 
+                // Postamble
+                f_poNeighbour();
+                f_cf01Down();
+            } // End of testcase TC_SEC_ITSS_RCV_CAM_01_03_BV
+            
+            /**
+             * @desc    Check that IUT discards a Secured CAM containing protocol version set to a value less then 2
+             * <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 protocol_version 
+             *                  indicating 1
+             *      } then {
+             *          the IUT discards a SecuredMessage
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_02_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 5.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_02_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_sendSecuredCam_Bo(cc_taCert_A, PX_WRONG_PROTOCOL_VERSION);
+                
+                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_02_01_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured CAM containing protocol version set to a value greater then 2
+             * <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_CAM_01)
+             *              containing protocol_version 
+             *                  indicating 3
+             *      } then {
+             *          the IUT discards a SecuredMessage
+             *      }
+             *  }
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_02_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 5.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_02_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_sendSecuredCam_Bo(cc_taCert_A, PX_WRONG_PROTOCOL_VERSION); // Change PX_WRONG_PROTOCOL_VERSION to 3
+                
+                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_02_02_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields contains more than one element of header field type: signer_info
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[3]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_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_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_signer_info(
+                            m_signerInfo_certificate(
+                                vc_atCertificate
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_its_aid_CAM
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_01_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields does not contain the header field type: signer_info
+             * <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[0].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[1]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_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();
+                if (PICS_DEBUG_ADDON) {
+                    f_sendCertificateAndWaitForCertificateChainRequest(cc_taCert_F, f_generateDefaultCam());
+                }
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_its_aid_CAM
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_02_BO
+            
+            /**
+             * @desc    Check that IUT is able to receive a secured CAM if the signer_info header field is not encoded first
+             * <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[0].type
+             *        indicating 'signer_info'
+             *      and containing header_fields[1].type
+             *        indicating 'generation_time'
+             *      and containing header_fields[2].type
+             *        indicating 'signer_info'
+             *      and containing header_fields[3]
+             *        containing type
+             *          indicating 'its_aid'
+             *        containing its_aid
+             *          indicating 'AID_CAM'
+             *      and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_03_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_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()), // In us
+                        m_header_field_its_aid_CAM,
+                        m_header_field_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        ))
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_03_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields doesn't contain the element of header field of type: generation_time
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *       and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_04_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_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_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_its_aid_CAM
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_04_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields does not contain the header field type: generation_time
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *          and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_05_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_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_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_its_aid_CAM
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_05_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields contain more than one element of header field of type: its_aid
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[2]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *          and containing header_fields[3]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_DENM'
+             *       and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_06_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_06_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredCam(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_its_aid_CAM,
+                        m_header_field_its_aid_DENM
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_06_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header_fields contain more than one element of header field of type: its_aid
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *       and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_06a_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_06a_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_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()) // In us
+                    }, 
+                    e_certificate_digest_with_sha256,
+                    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_04_06a_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured CAM if the header fields are not in the ascending order according to the numbering of the enumeration
+             * <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[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1]
+             *              containing type
+             *                  indicating 'its_aid'
+             *              containing its_aid
+             *                  indicating 'AID_CAM'
+             *          and containing header_fields[2].type
+             *              indicating 'generation_time'
+             *       and not containing other header fields
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_CAM_04_07_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.1
+             */
+            testcase TC_SEC_ITSS_RCV_CAM_04_07_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    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_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )), 
+                        m_header_field_its_aid_CAM,