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

Add certificate identifiers in security component

parent 5b65f533
......@@ -187,7 +187,7 @@ module LibItsSecurity_Functions {
* @param p_headerFields HeaderFields to be inserted in the message
* @param p_configId The configuration identifier to be used
* @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
* @verdict Unchanged
*/
......@@ -211,7 +211,7 @@ module LibItsSecurity_Functions {
var HeaderField v_signerInfo;
// 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) {
return false;
}
......@@ -805,9 +805,9 @@ module LibItsSecurity_Functions {
// Setup certificates memory cache
if (fx_loadCertificates(PX_ROOT_PATH_FOR_SECURITY, p_configId) == true) {
// Setup security component variables
f_readCertificate("TA_CONFIG_A.AA_CERT", vc_aaCertificate);
f_readCertificate("TA_CONFIG_A.AT_CERT", vc_atCertificate);
f_readPrivateKeys("TA_CONFIG_A.PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey);
f_readCertificate(cc_taCertA & "TA_CERT_A.AA_CERT", vc_aaCertificate);
f_readCertificate(cc_taCertA & "TA_CERT_A.AT_CERT", vc_atCertificate);
f_readPrivateKeys(cc_taCertA & ".PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey);
return true;
}
......
......@@ -28,8 +28,13 @@ module LibItsSecurity_TestSystem {
var Oct32 vc_signingPrivateKey;
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;
// Test Adapter certificates & private keys
const charstring cc_taCertA := "TA_CERT_A";
const charstring cc_taCertB := "TA_CERT_B";
} // End of ItsSecurityBaseComponent
} // End of group componentDefinitions
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment