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
77c2251e
Commit
77c2251e
authored
Oct 09, 2014
by
garciay
Browse files
Add support of disk/memory cache for certificates/private keys
parent
5eebede3
Changes
4
Hide whitespace changes
Inline
Side-by-side
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn
View file @
77c2251e
...
...
@@ -24,9 +24,7 @@ module LibItsGeoNetworking_Functions {
import
from
LibItsSecurity_TypesAndValues
all
;
import
from
LibItsSecurity_Templates
all
;
import
from
LibItsSecurity_Functions
all
;
import
from
LibItsSecurity_Pixits
{
modulepar
PX_CERTIFICATE_CONFIG_IDX
,
PX_TA_CONFIGS
};
import
from
LibItsSecurity_Pixits
all
;
// LibItsGeoNetworking
import
from
LibItsGeoNetworking_TestSystem
all
;
...
...
@@ -723,6 +721,11 @@ module LibItsGeoNetworking_Functions {
vc_areaTable
:=
p_areaTable
;
vc_componentName
:=
p_componentName
;
f_setGenerationLocation
(
// TODO To be checked
f_getTsLatitude
(),
f_getTsLongitude
()
);
}
// end f_initialiseComponent
/**
...
...
@@ -1730,14 +1733,16 @@ module LibItsGeoNetworking_Functions {
v_toBeSignedSecuredMessageDigest
:=
f_buildSecuredMessagePayloadToBeSigned
();
v_toBeSignedSecuredMessageCertificate
:=
f_buildSecuredMessagePayloadToBeSigned
(
true
);
f_loadCertificates
(
"cfg01"
);
return
f_acTriggerEvent
(
AcGnPrimitive
:
{
acEnableSecurity
:=
m_enableSecurity
(
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
signingPrivateKey
,
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
atCertificate
.
subject_attributes
[
0
].
attribute
.
key
.
public_key
.
eccPoint
.
x
,
PX_TA_CONFIGS
[
PX_CERTIFICATE_CONFIG_IDX
].
atCertificate
.
subject_attributes
[
0
].
attribute
.
key
.
public_key
.
eccPoint
.
y
.
y
,
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
,
vc_
signingPrivateKey
,
vc_
atCertificate
.
subject_attributes
[
0
].
attribute
.
key
.
public_key
.
eccPoint
.
x
,
vc_
atCertificate
.
subject_attributes
[
0
].
attribute
.
key
.
public_key
.
eccPoint
.
y
.
y
,
vc_
encryptPrivateKey
,
vc_
atCertificate
.
subject_attributes
[
1
].
attribute
.
key
.
public_key
.
aesCcm
.
eccPoint
.
x
,
vc_
atCertificate
.
subject_attributes
[
1
].
attribute
.
key
.
public_key
.
aesCcm
.
eccPoint
.
y
.
y
,
bit2oct
(
encvalue
(
v_toBeSignedSecuredMessageDigest
)),
bit2oct
(
encvalue
(
v_toBeSignedSecuredMessageCertificate
))
)
}
...
...
@@ -1750,6 +1755,8 @@ module LibItsGeoNetworking_Functions {
*/
function
f_acDisableSecurity
()
runs
on
ItsBaseGeoNetworking
return
FncRetCode
{
f_unloadCertificates
();
return
f_acTriggerEvent
(
AcGnPrimitive
:
{
acDisableSecurity
:=
m_disableSecurity
}
);
}
...
...
@@ -2559,7 +2566,7 @@ module LibItsGeoNetworking_Functions {
);
// Add CAM payload
v_gnNonSecuredPacket
.
payload
:=
f_adaptPayload_m
(
p_payload
);
f_buildGnSecuredCam
(
v_securedMessage
,
bit2oct
(
encvalue
(
v_gnNonSecuredPacket
)),
...
...
ttcn/GeoNetworking/LibItsGeoNetworking_Pics.ttcn
View file @
77c2251e
...
...
@@ -185,7 +185,7 @@ module LibItsGeoNetworking_Pics {
/**
* @desc Is the IUT support secured mode?
* @see
TODO
* @see
Draft ETSI TS 103 097
*/
modulepar
boolean
PICS_SECURED_MODE
:=
false
;
...
...
ttcn/GeoNetworking/LibItsGeoNetworking_TestSystem.ttcn
View file @
77c2251e
...
...
@@ -15,14 +15,20 @@ module LibItsGeoNetworking_TestSystem {
const
c_uInt16Max
};
// LibIts
// LibIts
Common
import
from
LibItsCommon_TestSystem
all
;
import
from
LibItsCommon_TypesAndValues
all
;
import
from
LibItsGeoNetworking_TypesAndValues
all
;
import
from
LibItsIpv6OverGeoNetworking_TypesAndValues
all
;
import
from
LibItsExternal_TypesAndValues
all
;
// LibItsGeoNetworking
import
from
LibItsGeoNetworking_TypesAndValues
all
;
import
from
LibItsGeoNetworking_Functions
all
;
// LibItsSecurity
import
from
LibItsSecurity_TestSystem
all
;
import
from
LibItsIpv6OverGeoNetworking_TypesAndValues
all
;
group
portDefinitions
{
/**
...
...
@@ -72,7 +78,7 @@ module LibItsGeoNetworking_TestSystem {
/**
* @desc ITS Main Test Component
*/
type
component
ItsMtc
extends
ItsBaseMtc
,
ServerSyncComp
{
type
component
ItsMtc
extends
ItsBaseMtc
,
ServerSyncComp
,
ItsSecurityBaseComponent
{
// TODO Extend ItsBaseMtc with ItsSecurityBaseComponent?
{
port
UpperTesterPort
utPort
;
port
AdapterControlPort
acPort
;
...
...
@@ -96,7 +102,7 @@ module LibItsGeoNetworking_TestSystem {
}
// End of group componentDefinitions
type
component
ItsBaseGeoNetworking
extends
ItsBaseComponent
{
type
component
ItsBaseGeoNetworking
extends
ItsBaseComponent
,
ItsSecurityBaseComponent
{
// TODO Extend ItsBaseComponent with ItsSecurityBaseComponent?
port
UpperTesterPort
utPort
;
port
AdapterControlPort
acPort
;
...
...
ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn
View file @
77c2251e
...
...
@@ -7,11 +7,11 @@
*/
module
LibItsGeoNetworking_TypesAndValues
{
//LibCommon
//
LibCommon
import
from
LibCommon_BasicTypesAndValues
all
;
import
from
LibCommon_DataStrings
all
;
//LibIts
//
LibIts
import
from
LibItsCommon_TypesAndValues
all
;
import
from
LibItsBtp_TypesAndValues
{
type
BtpPacket
;}
import
from
LibItsIpv6OverGeoNetworking_TypesAndValues
{
type
Ipv6Packet
;}
...
...
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