Loading ttcn/DENM/LibItsDenm_Templates.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -134,14 +134,14 @@ module LibItsDenm_Templates { template (value) UtDenmTrigger m_utTriggerEvent( template (value) SituationContainer p_situation, template (value) LocationContainer p_location, template (omit) ValidityDuration p_validityDuration := omit, template (omit) ValidityDuration p_validityDuration := c_duration_2sec, template (omit) ValidityDuration p_repetitionDuration := omit, template (omit) TransmissionInterval p_repetitionInterval := omit, template (omit) TransmissionInterval p_transmissionInterval := omit, template (omit) AlacarteContainer p_alacarte := omit ) := { detectionTime := f_getCurrentTime(), validityDuration := c_duration_2sec, validityDuration := p_validityDuration, repetitionDuration := p_repetitionDuration, situation := p_situation, location := p_location, Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +9 −2 Original line number Diff line number Diff line Loading @@ -755,7 +755,10 @@ module LibItsGeoNetworking_Functions { */ function f_initialiseSecuredMode() runs on ItsBaseGeoNetworking { if (PICS_GN_SECURITY == true) { f_acEnableSecurity(); if(e_success != f_acEnableSecurity()){ log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); stop; } } } // End of function f_initialiseSecuredMode() Loading Loading @@ -1742,7 +1745,11 @@ module LibItsGeoNetworking_Functions { var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageCertificate; // Load certificates f_loadCertificates(PX_CONFIG_DIRECTORY_FOR_SECURITY); if( not f_loadCertificates(PX_CONFIG_DIRECTORY_FOR_SECURITY) ) { return e_error; } // Initialize vc_location f_setGenerationLocation( f_getTsLatitude(), Loading ttcn/MapSpat/LibItsMapSpat_Templates.ttcn +4 −4 Original line number Diff line number Diff line Loading @@ -233,8 +233,8 @@ module LibItsMapSpat_Templates { /** * @desc Receive template for MAP Message with SubId = 0 */ template (present) MapData mw_mapSubId0 modifies mw_anyMap := { msgSubID := 0 template (present) MapData mw_mapSubId1 modifies mw_anyMap := { msgSubID := 1 } /** Loading Loading @@ -325,8 +325,8 @@ module LibItsMapSpat_Templates { /** * @desc Receive template for SPAT Message with SubId = 0 */ template (present) SPAT mw_spatSubId0 modifies mw_anySpat := { msgSubID := 0 template (present) SPAT mw_spatSubId1 modifies mw_anySpat := { msgSubID := 1 } } // end mapSpatTemplates Loading ttcn/Security/LibItsSecurity_Functions.ttcn3 +48 −20 Original line number Diff line number Diff line Loading @@ -128,15 +128,15 @@ module LibItsSecurity_Functions { // Load certificates if required if (ispresent(p_certificateName) and (valueof(p_certificateName) != cc_taCert_A)) { if (f_readCertificate(valueof(p_certificateName) & ".AA_CERT", p_aaCertificate) == false) { if (f_readCertificate(valueof(p_certificateName), p_atCertificate) == false){ return false; } if (f_readCertificate(valueof(p_certificateName) & ".AT_CERT", p_atCertificate) == false) { if (f_readCertificate(oct2str(p_atCertificate.signer_info.signerInfo.digest), p_aaCertificate) == false) { return false; } } else { p_aaCertificate := vc_aaCertificate; p_atCertificate := vc_atCertificate; p_aaCertificate := vc_aaCertificate; } // Store the certificte to build this message vc_lastAtCertificateUsed := p_atCertificate; Loading Loading @@ -548,7 +548,7 @@ module LibItsSecurity_Functions { } // Load certificates if (f_readCertificate(p_certificateName & ".AT_CERT", v_atCertificate) == false) { if (f_readCertificate(p_certificateName, v_atCertificate) == false) { return v_hashedId8; } Loading Loading @@ -796,14 +796,22 @@ module LibItsSecurity_Functions { // Setup certificates memory cache if (fx_loadCertificates(PX_ROOT_PATH_FOR_SECURITY, p_configId) == true) { // Setup security component variables f_readCertificate(cc_taCert_A & ".AA_CERT", vc_aaCertificate); f_readCertificate(cc_taCert_A & ".AT_CERT", vc_atCertificate); f_readPrivateKeys(cc_taCert_A & ".AT_PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey); if(f_readCertificate(cc_taCert_A, vc_atCertificate)) { if(f_readCertificate(oct2str(vc_atCertificate.signer_info.signerInfo.digest), vc_aaCertificate)) { if(f_readSigningKey(cc_taCert_A, vc_signingPrivateKey)) { f_readEncryptingKey(cc_taCert_A, vc_encryptPrivateKey); return true; } log("f_loadCertificates: Failed to access ", p_configId); log("f_loadCertificates: Failed to load signing key for ", cc_taCert_A); }else{ log("f_loadCertificates: Failed to load AA certificate for ", cc_taCert_A); } }else{ log("f_loadCertificates: Failed to load AA certificate for ", cc_taCert_A); } }else{ log("f_loadCertificates: Failed to load certificates from ", PX_ROOT_PATH_FOR_SECURITY); } return false; } // End of function f_loadCertificates Loading Loading @@ -847,19 +855,30 @@ module LibItsSecurity_Functions { } // End of function f_readCertificate /** * @desc Read the private keys for the specified certificate * @desc Read the signing private key for the specified certificate * @param p_keysId the keys identifier * @param p_signingPrivateKey the signing private key * @return true on success, false otherwise */ function f_readSigningKey( in charstring p_keysId, out Oct32 p_signingPrivateKey ) runs on ItsSecurityBaseComponent return boolean { return fx_readSigningKey(p_keysId, p_signingPrivateKey); } // End of function f_readSigningKey /** * @desc Read the encrypting private keys for the specified certificate * @param p_keysId the keys identifier * @param p_encryptPrivateKey the encrypt private key * @return true on success, false otherwise */ function f_readPrivateKeys( function f_readEncryptingKey( in charstring p_keysId, out Oct32 p_signingPrivateKey, out Oct32 p_encryptPrivateKey ) runs on ItsSecurityBaseComponent return boolean { return fx_readPrivateKeys(p_keysId, p_signingPrivateKey, p_encryptPrivateKey); } // End of function f_readPrivateKeys return fx_readEncryptingKey(p_keysId, p_encryptPrivateKey); } // End of function f_readEncryptingKey function f_getCertificateValidityRestriction( in template (value) Certificate p_cert, Loading Loading @@ -985,10 +1004,19 @@ module LibItsSecurity_Functions { * @desc Read the private keys for the specified certificate * @param p_keysId the keys identifier * @param p_signingPrivateKey the signing private key * @return true on success, false otherwise */ external function fx_readSigningKey(in charstring p_keysId, out Oct32 p_signingPrivateKey) return boolean; /** * @desc Read the private keys for the specified certificate * @param p_keysId the keys identifier * @param p_encryptPrivateKey the encrypt private key * @return true on success, false otherwise */ external function fx_readPrivateKeys(in charstring p_keysId, out Oct32 p_signingPrivateKey, out Oct32 p_encryptPrivateKey) return boolean; external function fx_readEncryptingKey(in charstring p_keysId, out Oct32 p_encryptingPrivateKey) return boolean; } // End of group certificatesLoader Loading ttcn/Security/LibItsSecurity_Pics.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,9 @@ module LibItsSecurity_Pics { */ modulepar boolean PICS_USE_ISO31661_REGION_DICTIONARY := true; /** * Does the IUT support ITS-AID for Generic profile? */ modulepar boolean PICS_ITS_AID_OTHER_PROFILE := true; } // End of module LibItsSecurity_Pics No newline at end of file Loading
ttcn/DENM/LibItsDenm_Templates.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -134,14 +134,14 @@ module LibItsDenm_Templates { template (value) UtDenmTrigger m_utTriggerEvent( template (value) SituationContainer p_situation, template (value) LocationContainer p_location, template (omit) ValidityDuration p_validityDuration := omit, template (omit) ValidityDuration p_validityDuration := c_duration_2sec, template (omit) ValidityDuration p_repetitionDuration := omit, template (omit) TransmissionInterval p_repetitionInterval := omit, template (omit) TransmissionInterval p_transmissionInterval := omit, template (omit) AlacarteContainer p_alacarte := omit ) := { detectionTime := f_getCurrentTime(), validityDuration := c_duration_2sec, validityDuration := p_validityDuration, repetitionDuration := p_repetitionDuration, situation := p_situation, location := p_location, Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +9 −2 Original line number Diff line number Diff line Loading @@ -755,7 +755,10 @@ module LibItsGeoNetworking_Functions { */ function f_initialiseSecuredMode() runs on ItsBaseGeoNetworking { if (PICS_GN_SECURITY == true) { f_acEnableSecurity(); if(e_success != f_acEnableSecurity()){ log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); stop; } } } // End of function f_initialiseSecuredMode() Loading Loading @@ -1742,7 +1745,11 @@ module LibItsGeoNetworking_Functions { var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageCertificate; // Load certificates f_loadCertificates(PX_CONFIG_DIRECTORY_FOR_SECURITY); if( not f_loadCertificates(PX_CONFIG_DIRECTORY_FOR_SECURITY) ) { return e_error; } // Initialize vc_location f_setGenerationLocation( f_getTsLatitude(), Loading
ttcn/MapSpat/LibItsMapSpat_Templates.ttcn +4 −4 Original line number Diff line number Diff line Loading @@ -233,8 +233,8 @@ module LibItsMapSpat_Templates { /** * @desc Receive template for MAP Message with SubId = 0 */ template (present) MapData mw_mapSubId0 modifies mw_anyMap := { msgSubID := 0 template (present) MapData mw_mapSubId1 modifies mw_anyMap := { msgSubID := 1 } /** Loading Loading @@ -325,8 +325,8 @@ module LibItsMapSpat_Templates { /** * @desc Receive template for SPAT Message with SubId = 0 */ template (present) SPAT mw_spatSubId0 modifies mw_anySpat := { msgSubID := 0 template (present) SPAT mw_spatSubId1 modifies mw_anySpat := { msgSubID := 1 } } // end mapSpatTemplates Loading
ttcn/Security/LibItsSecurity_Functions.ttcn3 +48 −20 Original line number Diff line number Diff line Loading @@ -128,15 +128,15 @@ module LibItsSecurity_Functions { // Load certificates if required if (ispresent(p_certificateName) and (valueof(p_certificateName) != cc_taCert_A)) { if (f_readCertificate(valueof(p_certificateName) & ".AA_CERT", p_aaCertificate) == false) { if (f_readCertificate(valueof(p_certificateName), p_atCertificate) == false){ return false; } if (f_readCertificate(valueof(p_certificateName) & ".AT_CERT", p_atCertificate) == false) { if (f_readCertificate(oct2str(p_atCertificate.signer_info.signerInfo.digest), p_aaCertificate) == false) { return false; } } else { p_aaCertificate := vc_aaCertificate; p_atCertificate := vc_atCertificate; p_aaCertificate := vc_aaCertificate; } // Store the certificte to build this message vc_lastAtCertificateUsed := p_atCertificate; Loading Loading @@ -548,7 +548,7 @@ module LibItsSecurity_Functions { } // Load certificates if (f_readCertificate(p_certificateName & ".AT_CERT", v_atCertificate) == false) { if (f_readCertificate(p_certificateName, v_atCertificate) == false) { return v_hashedId8; } Loading Loading @@ -796,14 +796,22 @@ module LibItsSecurity_Functions { // Setup certificates memory cache if (fx_loadCertificates(PX_ROOT_PATH_FOR_SECURITY, p_configId) == true) { // Setup security component variables f_readCertificate(cc_taCert_A & ".AA_CERT", vc_aaCertificate); f_readCertificate(cc_taCert_A & ".AT_CERT", vc_atCertificate); f_readPrivateKeys(cc_taCert_A & ".AT_PRIVATE_KEYS", vc_signingPrivateKey, vc_encryptPrivateKey); if(f_readCertificate(cc_taCert_A, vc_atCertificate)) { if(f_readCertificate(oct2str(vc_atCertificate.signer_info.signerInfo.digest), vc_aaCertificate)) { if(f_readSigningKey(cc_taCert_A, vc_signingPrivateKey)) { f_readEncryptingKey(cc_taCert_A, vc_encryptPrivateKey); return true; } log("f_loadCertificates: Failed to access ", p_configId); log("f_loadCertificates: Failed to load signing key for ", cc_taCert_A); }else{ log("f_loadCertificates: Failed to load AA certificate for ", cc_taCert_A); } }else{ log("f_loadCertificates: Failed to load AA certificate for ", cc_taCert_A); } }else{ log("f_loadCertificates: Failed to load certificates from ", PX_ROOT_PATH_FOR_SECURITY); } return false; } // End of function f_loadCertificates Loading Loading @@ -847,19 +855,30 @@ module LibItsSecurity_Functions { } // End of function f_readCertificate /** * @desc Read the private keys for the specified certificate * @desc Read the signing private key for the specified certificate * @param p_keysId the keys identifier * @param p_signingPrivateKey the signing private key * @return true on success, false otherwise */ function f_readSigningKey( in charstring p_keysId, out Oct32 p_signingPrivateKey ) runs on ItsSecurityBaseComponent return boolean { return fx_readSigningKey(p_keysId, p_signingPrivateKey); } // End of function f_readSigningKey /** * @desc Read the encrypting private keys for the specified certificate * @param p_keysId the keys identifier * @param p_encryptPrivateKey the encrypt private key * @return true on success, false otherwise */ function f_readPrivateKeys( function f_readEncryptingKey( in charstring p_keysId, out Oct32 p_signingPrivateKey, out Oct32 p_encryptPrivateKey ) runs on ItsSecurityBaseComponent return boolean { return fx_readPrivateKeys(p_keysId, p_signingPrivateKey, p_encryptPrivateKey); } // End of function f_readPrivateKeys return fx_readEncryptingKey(p_keysId, p_encryptPrivateKey); } // End of function f_readEncryptingKey function f_getCertificateValidityRestriction( in template (value) Certificate p_cert, Loading Loading @@ -985,10 +1004,19 @@ module LibItsSecurity_Functions { * @desc Read the private keys for the specified certificate * @param p_keysId the keys identifier * @param p_signingPrivateKey the signing private key * @return true on success, false otherwise */ external function fx_readSigningKey(in charstring p_keysId, out Oct32 p_signingPrivateKey) return boolean; /** * @desc Read the private keys for the specified certificate * @param p_keysId the keys identifier * @param p_encryptPrivateKey the encrypt private key * @return true on success, false otherwise */ external function fx_readPrivateKeys(in charstring p_keysId, out Oct32 p_signingPrivateKey, out Oct32 p_encryptPrivateKey) return boolean; external function fx_readEncryptingKey(in charstring p_keysId, out Oct32 p_encryptingPrivateKey) return boolean; } // End of group certificatesLoader Loading
ttcn/Security/LibItsSecurity_Pics.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,9 @@ module LibItsSecurity_Pics { */ modulepar boolean PICS_USE_ISO31661_REGION_DICTIONARY := true; /** * Does the IUT support ITS-AID for Generic profile? */ modulepar boolean PICS_ITS_AID_OTHER_PROFILE := true; } // End of module LibItsSecurity_Pics No newline at end of file