Commit abea3243 authored by garciay's avatar garciay
Browse files

Add security PIXIT PX_DEFAULT_IUT_HASHEDID8

Change AID for CAM to 36
Change AID for CAM to 37
Add logs on function failure
Set vc_hashedId8ToBeUsed to 'FFFFFFFFFFFFFFFF'O in case of the IUT can not manage test certificates
parent 1544da22
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1574,10 +1574,11 @@ module LibItsGeoNetworking_Functions {
            
            if (PICS_GN_SECURITY) {
                var Oct8 v_hashedId8ToBeUsed := f_setupIutCertificate(vc_hashedId8ToBeUsed);
                if (oct2int(v_hashedId8ToBeUsed) != 0) {
                if (oct2int(v_hashedId8ToBeUsed) == 0) {
                    v_hashedId8ToBeUsed := 'FFFFFFFFFFFFFFFF'O; // Reset to unknown value, the IUT will use its own certificates
                }
                f_utInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed));
                return;
                }
            } // else, default behavior
            f_utInitializeIut(m_gnInitialize);
        }
+3 −1
Original line number Diff line number Diff line
@@ -548,7 +548,7 @@ module LibItsSecurity_Functions {
                }
                
                // Load certificates
                if (f_readCertificate(valueof(p_certificateName) & ".AT_CERT", v_atCertificate) == false) {
                if (f_readCertificate(p_certificateName & ".AT_CERT", v_atCertificate) == false) {
                    return v_hashedId8;
                }
                
@@ -886,6 +886,8 @@ module LibItsSecurity_Functions {
                    p_si := valueof(p_cert.signer_info);
                    return true;
                }
                
                log("f_getCertificateSignerInfo: Failed to retrieve ");
                return false;
            }
            
+6 −0
Original line number Diff line number Diff line
@@ -12,4 +12,10 @@ module LibItsSecurity_Pixits {
     */
    modulepar charstring PX_ROOT_PATH_FOR_SECURITY := "";
    
    /**
     * @desc The certficate the IUT should use. Default: CERT_IUT_A
     * @remark If the IUT cannot use the test certificates, set this PIXIT to CERT_NONE
     */
    modulepar charstring PX_DEFAULT_IUT_HASHEDID8 := "CERT_IUT_A";
    
} // End of module LibItsSecurity_Pixits
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -37,13 +37,13 @@ module LibItsSecurity_Templates {
         * @desc Its AID for CAM
         * @see Draft ETSI TS 103 097 V1.1.14 Clause 7.1 Security profile for CAMs
         */
        const IntX c_its_aid_CAM := 16512;
        const IntX c_its_aid_CAM := 36;
        
        /**
         * @desc Its AID for DENM
         * @see Draft ETSI TS 103 097 V1.1.14 Clause 7.2 Security profile for DENMs
         */
        const IntX c_its_aid_DENM := 16513;
        const IntX c_its_aid_DENM := 37;
        
        /**
         * @desc Minimal value of Longitude
+5 −4
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ module LibItsSecurity_TestSystem {
    
    // LibItsSecurity
    import from LibItsSecurity_TypesAndValues all;
    import from LibItsSecurity_Pixits all;
    
    group componentDefinitions {
        
@@ -24,7 +25,7 @@ module LibItsSecurity_TestSystem {
            var Certificate vc_aaCertificate;                                   /** Test Adapter AT certificate */
            var Certificate vc_atCertificate;                                   /** Test Adapter AT certificate */
            var Certificate vc_lastAtCertificateUsed;                           /** Last Test Adapter certificate used in 'f_buildGnSecuredXXX' functions */
            var charstring vc_hashedId8ToBeUsed := "CERT_IUT_A";    /** Digest value of the certificate couple to be used by the IUT. Default: CERT_IUT_A */
            var charstring vc_hashedId8ToBeUsed := PX_DEFAULT_IUT_HASHEDID8;    /** Digest value of the certificate couple to be used by the IUT. Default: CERT_IUT_A */
            
            // Private keys
            var Oct32 vc_signingPrivateKey;