Skip to content
titanization.patch 1.83 MiB
Newer Older
22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 22945 22946 22947 22948 22949 22950 22951 22952 22953 22954 22955 22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_04_10_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )),
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_time_with_standard_deviation(
+                            m_time64WithStandardDeviation(
+                                1000 * f_getCurrentTime(),
+                                255
+                            )
+                        ),
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        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_DENM_04_10_BO
+            
+            /**
+             * @desc    Check that IUT discards the Secured DENM containing the header fields of type 'expiry_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_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *              and containing time
+             *                  indicating CURRENT_TIME
+             *          and containing header_fields[2]
+             *              containing type
+             *                  indicating 'expiration'
+             *              and containing expiry_time 
+             *                  indicating CURRENT_TIME + 1 h 
+             *          and containing header_fields[3].type
+             *                  indicating 'generation_location'
+             *          and containing header_fields[4].type
+             *              containing its_aid
+             *          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_DENM_04_11_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_04_11_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )),
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_expiry_time(
+                            1000 * (3600 + f_getCurrentTime()) // In us
+                        ),
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        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_DENM_04_11_BO
+            
+            /**
+             * @desc    Check that IUT accepts the Secured DENM containing additional non-standard HeaderField
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[3].type
+             *              containing its_aid
+             *          and containing header_fields[4]
+             *              containing type
+             *                  indicating non-standard header field type (200)
+             *              and containing other_header
+             *                  indicating non-empty data
+             *          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_DENM_04_12_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_04_12_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_digest(
+                                vc_atCertificate.signer_info.signerInfo.digest
+                        )),
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        m_header_field_its_aid_DENM,
+                        m_header_field_unspecify
+                    }, 
+                    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_DENM_04_12_BO
+            
+            /**
+             * @desc    Check that IUT discards the Secured CAM containing the header field 'encryption_parameter and recipient_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_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *          and containing header_fields[3].type
+             *              containing its_aid
+             *          and containing header_fields[4]
+             *              containing type
+             *                  indicating 'encryption_parameters'
+             *              and containing enc_params
+             *                  containing symm_algorithm
+             *                      indicating 'aes_128_ccm'
+             *                  and containing nonce
+             *              and containing header_fields[4]
+             *                  containing type
+             *                      indicating 'recipient_info'
+             *                  and containing recipients
+             *                      containing recipients[0]
+             *                          containing cert_id
+             *                              referencing to CERT_IUT_A_AT
+             *                          and containing pk_encryption
+             *                              indicating 'ecies_nistp256'
+             *                          and containing enc_key
+             *          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_DENM_04_13_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_04_13_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var Certificate v_iutATCertificate;
+                var SubjectAttribute v_encryption_key;
+                
+                // 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
+                if (
+                    (f_readCertificate(cc_iutCert_A, v_iutATCertificate) == false) or 
+                    (f_getCertificateSubjectAttribute(v_iutATCertificate, e_encryption_key, v_encryption_key) == false)
+                ) {
+                    f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); // Set verdict to inconc
+                } else {
+                    v_securedGnPdu := f_prepareSecuredDenm(
+                        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_generation_location(
+                                valueof(m_threeDLocation(
+                                    v_longPosVectorNodeB.latitude,
+                                    v_longPosVectorNodeB.longitude,
+                                    '0000'O
+                                ))
+                            ),
+                            m_header_field_its_aid_DENM,
+                            m_header_field_enc_params(                                  // containing header_fields[3].type.enc_params
+                                m_encryptionParameters_aes_128_ccm(                     //      indicating 'aes_128_ccm'
+                                    PX_ENCRYPTIONPARAMETERS_AES_128_CCM_NONCE           // and containing nonce
+                                )
+                            ),
+                            m_header_field_multiple_recipients(                         // containing header_fields[4].type
+                                {                                                       //     indicating 'encryption_parameters'
+                                    m_recipientInfo_ecies_enc_key(
+                                        v_iutATCertificate.signer_info.signerInfo.digest,
+                                        e_ecies_nistp256,                               // containing symm_algorithm
+                                                                                        //     indicating 'aes_128_ccm'
+                                        m_eciesEncryptedKey_aesccm(
+                                            v_encryption_key.attribute.rv,
+                                            '00000000000000000000000000000000'O, // FIXME Where to find these values
+                                            '00000000000000000000000000000000'O
+                                        )
+                                    )
+                                }
+                            )
+                        }, 
+                        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_DENM_04_13_BO
+            
+            /**
+             * @desc    Check that IUT discards the Secured DENM containing the header fields of type 'request_unrecognized_certificate'
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *          and containing header_fields[1].type
+             *              indicating 'generation_time'
+             *              and containing generation_time
+             *                  indicating CURRENT_TIME
+             *          and containing header_fields[2].type
+             *             indicating 'request_unrecognized_certificate'
+             *             and containing digests[0]
+             *                 indicating the digest of X_IUT_AT_CERT
+             *          and containing header_fields[3].type
+             *              indicating 'generation_location'
+             *          and containing header_fields[4].type
+             *              indicating 'its_aid'
+             *          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_DENM_04_14_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_04_14_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var Certificate v_iutATCertificate;
+                var SignerInfo v_signerInfo;
+                
+                // 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
+                if (
+                    (f_readCertificate(cc_iutCert_A, v_iutATCertificate) == false) or 
+                    (f_getCertificateSignerInfo(v_iutATCertificate, v_signerInfo) == false)
+                ) {
+                    f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); // Set verdict to inconc
+                } else {
+                    v_securedGnPdu := f_prepareSecuredDenm(
+                        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_unrecognised_certificate(
+                                f_HashedId3FromHashedId8(
+                                   f_calculateDigestFromCertificate(
+                                       v_signerInfo.signerInfo.certificate
+                                   )
+                                )
+                            ),
+                            m_header_field_generation_location(
+                                valueof(m_threeDLocation(
+                                    v_longPosVectorNodeB.latitude,
+                                    v_longPosVectorNodeB.longitude,
+                                    '0000'O
+                                ))
+                            ),
+                            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_DENM_04_14_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM if the header_fields contains a signer of type 'self'
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing signer.type
+             *                      indicating 'self'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_05_01_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_05_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_self
+                        ), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        m_header_field_its_aid_DENM
+                    }, 
+                    e_self,
+                    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_DENM_05_01_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM if the header_fields contains a signer of type 'certificate_digest_with_other_algorithm'
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing signer.type
+             *                      indicating 'certificate_digest_with_other_algorithm'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_05_02_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_05_02_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_other_certificates(
+                                m_certificateWithAlgo_ecdsa(
+                                    PX_OTHER_CERT_DIGEST
+                        ))), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        m_header_field_its_aid_DENM
+                    }, 
+                    e_certificate_digest_with_other_algorithm,
+                    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_DENM_05_02_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM if the header_fields contains a signer of type certificate_chain
+             * <pre>
+             * Pics Selection: PICS_GN_SECURITY
+             * Config Id: CF01
+             * Initial conditions:
+             * with { 
+             *  the IUT being in the 'authorized' state 
+             *  and the IUT current time is inside the time validity period of CERT_TS_A_AT
+             * } 
+             * ensure that { 
+             *  when { 
+             *      the IUT is receiving a SecuredMessage (MSG_SEC_RCV_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating 'signer_info'
+             *                  containing signer.type
+             *                      indicating 'certificate_digest_with_other_algorithm'
+             *  } then { 
+             *      the IUT discards the message 
+             *  } 
+             * } 
+             * </pre>
+             *
+             * @see          ETSI TS 103 096-2 v1.3.2 TP_SEC_ITSS_RCV_DENM_05_03_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_05_03_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_certificates(
+                                { vc_aaCertificate, vc_atCertificate }
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        m_header_field_its_aid_DENM
+                    }, 
+                    e_certificate_chain,
+                    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_DENM_05_03_BO
+            
+            /**
+             * @desc    Check that IUT discards a secured DENM 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_DENM_A) 
+             *          containing header_fields[0].type
+             *              indicating '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_DENM_05_04_BO
+             * @reference    ETSI TS 103 097 [1], clause 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_05_04_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                
+                // Test adapter configuration
+                if (not(PICS_GN_SECURITY)) {
+                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
+                    stop;
+                }
+                
+                // Test component configuration
+                f_cf01Up();
+                
+                // Test adapter configuration
+                
+                // Preamble
+                f_prNeighbour();
+                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+                
+                // Test Body
+                v_securedGnPdu := f_prepareSecuredDenm(
+                    cc_taCert_A, 
+                    {
+                        m_header_field_signer_info(
+                            m_signerInfo_unknown(
+                                'CAFFEEDECA'O
+                        )), 
+                        m_header_field_generation_time(1000 * f_getCurrentTime()), // In us
+                        m_header_field_generation_location(
+                            valueof(m_threeDLocation(
+                                v_longPosVectorNodeB.latitude,
+                                v_longPosVectorNodeB.longitude,
+                                '0000'O
+                            ))
+                        ),
+                        m_header_field_its_aid_DENM
+                    }, 
+                    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_DENM_05_04_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM 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_DENM_A) 
+             *          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_DENM_06_01_BO
+             * @reference    ETSI TS 103 097 [1], clauses 5.4 and 7.2
+             */
+            testcase TC_SEC_ITSS_RCV_DENM_06_01_BO() runs on ItsGeoNetworking system ItsSecSystem {
+                
+                // Local variables
+                var integer i;
+                var GeoNetworkingPdu v_securedGnPdu;
+                var GnRawPayload v_sentRawPayload;
+                var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
+                var ValidityRestriction v_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_prepareSecuredDenm(
+                    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_DENM_06_01_BO
+            
+            /**
+             * @desc    Check that IUT discards a Secured DENM 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_DENM_A)