Commit 76314a8b authored by garciay's avatar garciay
Browse files

Add certificate identifiers in security component

parent 5b65f533
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -187,7 +187,7 @@ module LibItsSecurity_Functions {
            * @param p_headerFields        HeaderFields to be inserted in the message
            * @param p_headerFields        HeaderFields to be inserted in the message
            * @param p_configId            The configuration identifier to be used
            * @param p_configId            The configuration identifier to be used
            * @param p_addMissingHeaders   Whether to add mandatory headers not present in p_headerFields
            * @param p_addMissingHeaders   Whether to add mandatory headers not present in p_headerFields
            * @param p_certificateName     The certificate identifier to be used. Default: TA_CONFIG_A
            * @param p_certificateName     The certificate identifier to be used. Default: TA_CERT_A
            * @return true on success, false otherwise
            * @return true on success, false otherwise
            * @verdict Unchanged
            * @verdict Unchanged
            */
            */
@@ -211,7 +211,7 @@ module LibItsSecurity_Functions {
                var HeaderField v_signerInfo;
                var HeaderField v_signerInfo;
                 
                 
                // Sanity check
                // Sanity check
                if (ispresent(p_certificateName) and (valueof(p_certificateName) != "TA_CONFIG_A")) {
                if (ispresent(p_certificateName) and (valueof(p_certificateName) != cc_taCertA)) {
                    if (f_readCertificate(valueof(p_certificateName) & ".AA_CERT", v_aaCertificate) == false) {
                    if (f_readCertificate(valueof(p_certificateName) & ".AA_CERT", v_aaCertificate) == false) {
                        return false;
                        return false;
                    }
                    }
@@ -805,9 +805,9 @@ module LibItsSecurity_Functions {
                // Setup certificates memory cache
                // Setup certificates memory cache
                if (fx_loadCertificates(PX_ROOT_PATH_FOR_SECURITY, p_configId) == true) {
                if (fx_loadCertificates(PX_ROOT_PATH_FOR_SECURITY, p_configId) == true) {
                    // Setup security component variables
                    // Setup security component variables
                    f_readCertificate("TA_CONFIG_A.AA_CERT", vc_aaCertificate);
                    f_readCertificate(cc_taCertA & "TA_CERT_A.AA_CERT", vc_aaCertificate);
                    f_readCertificate("TA_CONFIG_A.AT_CERT", vc_atCertificate);
                    f_readCertificate(cc_taCertA & "TA_CERT_A.AT_CERT", vc_atCertificate);
                    f_readPrivateKeys("TA_CONFIG_A.PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey);
                    f_readPrivateKeys(cc_taCertA & ".PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey);
                    
                    
                    return true;
                    return true;
                }
                }
+5 −0
Original line number Original line Diff line number Diff line
@@ -28,8 +28,13 @@ module LibItsSecurity_TestSystem {
            var Oct32 vc_signingPrivateKey; 
            var Oct32 vc_signingPrivateKey; 
            var Oct32 vc_encryptPrivateKey; 
            var Oct32 vc_encryptPrivateKey; 
            
            
            // Generation position. See Draft ETSI TS 103 097 V1.1.6 Clause 7.2    Security profiles for DENMs
            var ThreeDLocation vc_location; 
            var ThreeDLocation vc_location; 
            
            
            // Test Adapter certificates & private keys
            const charstring cc_taCertA := "TA_CERT_A";
            const charstring cc_taCertB := "TA_CERT_B";
            
        } // End of ItsSecurityBaseComponent
        } // End of ItsSecurityBaseComponent
        
        
    } // End of group componentDefinitions
    } // End of group componentDefinitions