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
e506ce4d
Commit
e506ce4d
authored
Sep 30, 2014
by
garciay
Browse files
Add support of secured beacon with certificate in TA
parent
3322fc51
Changes
1
Hide whitespace changes
Inline
Side-by-side
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn
View file @
e506ce4d
...
...
@@ -1714,10 +1714,12 @@ module LibItsGeoNetworking_Functions {
function
f_acEnableSecurity
()
runs
on
ItsBaseGeoNetworking
return
FncRetCode
{
// Local variables
var
template
(
value
)
ToBeSignedSecuredMessage
v_toBeSignedSecuredMessage
;
var
template
(
value
)
ToBeSignedSecuredMessage
v_toBeSignedSecuredMessageDigest
;
var
template
(
value
)
ToBeSignedSecuredMessage
v_toBeSignedSecuredMessageCertificate
;
// Build the beacon template
v_toBeSignedSecuredMessage
:=
f_buildSecuredMessagePayloadToBeSigned
();
v_toBeSignedSecuredMessageDigest
:=
f_buildSecuredMessagePayloadToBeSigned
();
v_toBeSignedSecuredMessageCertificate
:=
f_buildSecuredMessagePayloadToBeSigned
(
true
);
return
f_acTriggerEvent
(
AcGnPrimitive
:
{
acEnableSecurity
:=
m_enableSecurity
(
...
...
@@ -1727,8 +1729,9 @@ module LibItsGeoNetworking_Functions {
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
encryptPrivateKey
,
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
atCertificate
.
subject_attributes
[
1
].
attribute
.
key
.
public_key
.
aesCcm
.
eccPoint
.
x
,
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
atCertificate
.
subject_attributes
[
1
].
attribute
.
key
.
public_key
.
aesCcm
.
eccPoint
.
y
.
y
,
bit2oct
(
encvalue
(
v_toBeSignedSecuredMessage
)))
}
bit2oct
(
encvalue
(
v_toBeSignedSecuredMessageDigest
)),
bit2oct
(
encvalue
(
v_toBeSignedSecuredMessageCertificate
))
)
}
);
}
...
...
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