Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TTCN-3 Libraries
LibIts
Commits
76314a8b
Commit
76314a8b
authored
Oct 09, 2014
by
garciay
Browse files
Add certificate identifiers in security component
parent
5b65f533
Changes
2
Hide whitespace changes
Inline
Side-by-side
ttcn/Security/LibItsSecurity_Functions.ttcn3
View file @
76314a8b
...
...
@@ -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_C
ONFIG
_A
* @param p_certificateName The certificate identifier to be used. Default: TA_C
ERT
_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
;
}
...
...
ttcn/Security/LibItsSecurity_TestSystem.ttcn3
View file @
76314a8b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment