Commit 5dbf02ad authored by garciay's avatar garciay
Browse files

STF507: Remove TODOs/FIXMEs

parent d597a1fd
Loading
Loading
Loading
Loading
+16 −9
Original line number Original line Diff line number Diff line
@@ -1051,11 +1051,6 @@ module LibItsSecurity_Functions {
                v_secPayload := bit2oct(encvalue(v_toBeSignedSecuredMessage));
                v_secPayload := bit2oct(encvalue(v_toBeSignedSecuredMessage));
                log("f_verifyGnSecuredMessageSignatureWithPublicKey: v_secPayload=", v_secPayload);
                log("f_verifyGnSecuredMessageSignatureWithPublicKey: v_secPayload=", v_secPayload);
                
                
                // FIXME BUG Framework already compute the hash
//                // Calculate the hash of the SecuredMessage payload to be signed
//                v_hash := fx_hashWithSha256(v_secPayload);
//                log("f_verifyGnSecuredMessageSignatureWithPublicKey: v_hash=", v_hash);
//                
                // Verify payload
                // Verify payload
                for (v_counter := 0; v_counter < lengthof(p_securedMessage.trailer_fields); v_counter := v_counter + 1) {
                for (v_counter := 0; v_counter < lengthof(p_securedMessage.trailer_fields); v_counter := v_counter + 1) {
                    var SecuredMessage v_securedMessage := valueof(p_securedMessage);
                    var SecuredMessage v_securedMessage := valueof(p_securedMessage);
@@ -1069,7 +1064,7 @@ module LibItsSecurity_Functions {
                        v_securedMessage.trailer_fields[v_counter].trailerField.signature_.signature_.ecdsa_signature.s;
                        v_securedMessage.trailer_fields[v_counter].trailerField.signature_.signature_.ecdsa_signature.s;
                        log("f_verifyGnSecuredMessageSignatureWithPublicKey: v_signedData=", v_signedData);
                        log("f_verifyGnSecuredMessageSignatureWithPublicKey: v_signedData=", v_signedData);
                        v_result := f_verifyWithEcdsaNistp256WithSha256(
                        v_result := f_verifyWithEcdsaNistp256WithSha256(
                            v_secPayload, // FIXME BUG Framework already compute the hash v_hash,
                            v_secPayload, 
                            v_signedData,
                            v_signedData,
                            valueof(p_publicKey.public_key.eccPoint.x),
                            valueof(p_publicKey.public_key.eccPoint.x),
                            valueof(p_publicKey.public_key.eccPoint.y.y)
                            valueof(p_publicKey.public_key.eccPoint.y.y)
@@ -1551,6 +1546,15 @@ module LibItsSecurity_Functions {
            */
            */
            external function fx_isLocationInsideIdentifiedRegion(in IdentifiedRegion p_region, in ThreeDLocation p_location) return boolean;
            external function fx_isLocationInsideIdentifiedRegion(in IdentifiedRegion p_region, in ThreeDLocation p_location) return boolean;
            
            
            /**
            * @desc Check if the location is inside an undefined region
            * @param p_region      The identified region to consider
            * @param p_location    The device location
            * @return true on success, false otherwise
            * @verdict Unchanged
            */
//          TODO To be implemented in TA
            external function fx_isLocationInsideOtherRegion(in octetstring p_region, in ThreeDLocation p_location) return boolean; 
            
            
            /**
            /**
             * @desc    Check that p_circular_region_1 circular region is included into p_circular_region_2 circular region
             * @desc    Check that p_circular_region_1 circular region is included into p_circular_region_2 circular region
@@ -1730,7 +1734,6 @@ module LibItsSecurity_Functions {
        /**
        /**
         * @desc    Check that two given rectanlular regions are intersected
         * @desc    Check that two given rectanlular regions are intersected
         *          Note: Regions must be normalized(northwest.latitude >= southeast.latitude)
         *          Note: Regions must be normalized(northwest.latitude >= southeast.latitude)
         *          TODO: Add case when
         * @param   p_r1    Region 1
         * @param   p_r1    Region 1
         * @param   p_r2    Region 2
         * @param   p_r2    Region 2
         *
         *
@@ -1944,8 +1947,12 @@ module LibItsSecurity_Functions {
                                               in template (value) octetstring p_region,
                                               in template (value) octetstring p_region,
                                               in template (value) ThreeDLocation p_location
                                               in template (value) ThreeDLocation p_location
        ) return boolean {
        ) return boolean {
            // FIXME To be removed
            // Sanity check
            if (valueof(p_region) == ''O) {
                return false;
                return false;
            }
            
            return fx_isLocationInsideOtherRegion(valueof(p_region), valueof(p_location)); 
        } // End of function f_isLocationInsideOtherRegion
        } // End of function f_isLocationInsideOtherRegion
        
        
        /**
        /**
+3 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,9 @@ module LibItsSecurity_Pics {
     */
     */
    modulepar boolean PICS_ITS_AID_OTHER_PROFILE := true;
    modulepar boolean PICS_ITS_AID_OTHER_PROFILE := true;
    
    
    /**
     * Does the IUT support C2C profile?
     */
    modulepar boolean PICS_ITS_C2C_MODE := false; // FIXME To be merge with C2C ATS, see Dirk T.
    modulepar boolean PICS_ITS_C2C_MODE := false; // FIXME To be merge with C2C ATS, see Dirk T.
    
    
} // End of module LibItsSecurity_Pics
} // End of module LibItsSecurity_Pics
 No newline at end of file
+12 −4
Original line number Original line Diff line number Diff line
@@ -396,8 +396,8 @@ module LibItsSecurity_Templates {
            
            
            /**
            /**
             * @desc Send template for Time64WithStandardDeviation
             * @desc Send template for Time64WithStandardDeviation
             * @param p_time        TODO
             * @param p_time        Time in microseconds
             * @param p_log_std_dev TODO
             * @param p_log_std_dev Estimate standard deviation (unit: nanoseconds)
             * @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.17    Time64WithStandardDeviation
             * @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.17    Time64WithStandardDeviation
             */
             */
            template (value) Time64WithStandardDeviation m_time64WithStandardDeviation(
            template (value) Time64WithStandardDeviation m_time64WithStandardDeviation(
@@ -2504,7 +2504,15 @@ module LibItsSecurity_Templates {
            trailerFieldType        := p_trailer_field_type
            trailerFieldType        := p_trailer_field_type
        } // End of template m_toBeSignedSecuredMessage
        } // End of template m_toBeSignedSecuredMessage
        
        
        // FIXME Replace c_protocol_version by a PIXIT
        /**
         * @desc SecuredMesage template used to calculate the signature
         * @member p_header_fields        The headers list
         * @member p_payload_field        The payloads list 
         * @member p_trailer_field_type   The trailer type
         * @member p_protocol_version     The protocol version
         * @member p_trailer_fieldsLength The trailer fields length, set to 67
         * @see Draft ETSI TS 103 097 V1.1.14 Clause 7    Security profiles 
         */
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage_wrong_protocol(
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage_wrong_protocol(
            in template (value) HeaderFields p_header_fields,
            in template (value) HeaderFields p_header_fields,
            in template (value) SecPayload p_payload_field,
            in template (value) SecPayload p_payload_field,
+2 −0
Original line number Original line Diff line number Diff line
@@ -61,6 +61,8 @@ module LibItsSecurity_TestSystem {
            const charstring cc_taCert0204_BO := "CERT_TS_02_04_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_authority' */
            const charstring cc_taCert0204_BO := "CERT_TS_02_04_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'enrolment_authority' */
            const charstring cc_taCert0301_BO := "CERT_TS_03_01_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'authorization_ticket' */
            const charstring cc_taCert0301_BO := "CERT_TS_03_01_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization ticket certificate contains the subject type 'authorization_ticket' */
            const charstring cc_taCert0302_BO := "CERT_TS_03_02_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'authorization_ticket' */
            const charstring cc_taCert0302_BO := "CERT_TS_03_02_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the authorization authority certificate contains the subject type 'authorization_ticket' */
            const charstring cc_taCert0601_BO := "CERT_TS_06_01_BO_AT"; /** Check that IUT discards a SecuredMessage containing generation_time before the message signing certificate validity period */
            const charstring cc_taCert0602_BO := "CERT_TS_06_02_BO_AT"; /** Check that IUT discards a SecuredMessage containing generation_time after the message signing certificate validity period */
            const charstring cc_taCert0401_BO := "CERT_TS_04_01_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the AA certificate contains the subject type 'authorization_authority' */
            const charstring cc_taCert0401_BO := "CERT_TS_04_01_BO_AT"; /** Check that IUT discards a SecuredMessage if the issuer certificate of the AA certificate contains the subject type 'authorization_authority' */
            const charstring cc_taCertMsg1301_BO := "CERT_TS_MSG_13_01_BO_AT"; /** Check that IUT discards secured CAM signed with the not yet valid certificate */
            const charstring cc_taCertMsg1301_BO := "CERT_TS_MSG_13_01_BO_AT"; /** Check that IUT discards secured CAM signed with the not yet valid certificate */
            const charstring cc_taCertMsg1302_BO := "CERT_TS_MSG_13_02_BO_AT"; /** Check that IUT discards secured CAM signed with the expired certificate */
            const charstring cc_taCertMsg1302_BO := "CERT_TS_MSG_13_02_BO_AT"; /** Check that IUT discards secured CAM signed with the expired certificate */
+2 −2
Original line number Original line Diff line number Diff line
@@ -154,7 +154,7 @@ module LibItsSecurity_TypesAndValues {
        /**
        /**
         * @desc Description an ECDSA based signature
         * @desc Description an ECDSA based signature
         * @member r            Coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
         * @member r            Coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
         * @member s            TODO
         * @member s            Signature
         * @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.9  EcdsaSignature
         * @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.9  EcdsaSignature
         */
         */
        type record EcdsaSignature {
        type record EcdsaSignature {
@@ -751,7 +751,7 @@ module LibItsSecurity_TypesAndValues {
         * @member time_start_and_duration  Validity restriction between into a range from a start date and inside a geographical aera
         * @member time_start_and_duration  Validity restriction between into a range from a start date and inside a geographical aera
         * @member region                   Validity restriction into a geographical area
         * @member region                   Validity restriction into a geographical area
         * @member region                   Validity restriction into a geographical area
         * @member region                   Validity restriction into a geographical area
         * @member data                     TODO
         * @member data                     Undefined
         */
         */
        type union ValidityRestrictionContainer {
        type union ValidityRestrictionContainer {
            Time32              end_validity,
            Time32              end_validity,