Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
312dc93b
Commit
312dc93b
authored
Jun 14, 2018
by
garciay
Browse files
Update AtsPki
Add support of UtGnTrigger in AtsRSUsSimulator test suite
parent
780f1227
Changes
4
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsPki/ItsPki_Functions.ttcn
View file @
312dc93b
...
...
@@ -56,7 +56,7 @@ module ItsPki_Functions {
in
template
(
value
)
HeaderInfo
p_headerInfo
,
in
SignerIdentifier
p_signerIdentifier
,
in
boolean
p_addMissingHeaders
:=
true
)
runs
on
ItsGeoNetworking
return
GeoNetworkingPdu
{
)
runs
on
ItsGeoNetworking
{
// Local variables
var
GnNonSecuredPacket
v_gnNonSecuredPacket
;
var
GeoNetworkingPdu
v_securedGnPdu
;
...
...
@@ -112,7 +112,7 @@ module ItsPki_Functions {
in
SignerIdentifier
p_signerIdentifierType
,
in
charstring
p_certificateName
:=
""
/*,
in boolean p_addMissingHeaders := true*/
)
runs
on
Its
SecurityBaseComponent
return
boolean
{
)
runs
on
Its
GeoNetworking
return
boolean
{
// Local variables
var
EtsiTs103097Certificate
v_aaCertificate
,
v_atCertificate
;
...
...
ttcn/AtsPki/ItsPki_TestCases.ttcn
View file @
312dc93b
...
...
@@ -63,7 +63,7 @@ module ItsPki_TestCases {
import
from
ItsPki_Functions
all
;
import
from
ItsPki_TestSystem
all
;
testcase
TC_SEC_PKI_SND_EA_01_BV
()
runs
on
Its
SecurityBaseComponent
system
ItsPkiSystem
{
testcase
TC_SEC_PKI_SND_EA_01_BV
()
runs
on
Its
GeoNetworking
system
ItsPkiSystem
{
// Local variables
var
LongPosVector
v_longPosVectorIut
;
...
...
@@ -90,23 +90,23 @@ module ItsPki_TestCases {
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
v_securedGnPdu
:=
f_sendEnrollmentRequest
(
m_innerEcRequest
(
"TODO"
,
m_publicKeys
(
v_certificate
.
toBeSigned
.
verifyKeyIndicator
.
verificationKey
,
v_certificate
.
toBeSigned
.
encryptionKey
),
m_certificateSubjectAttributes
(
v_certificate
.
toBeSigned
.
appPermissions
,
v_certificate
.
toBeSigned
.
validityPeriod
,
v_certificate
.
toBeSigned
.
region
,
v_certificate
.
toBeSigned
.
assuranceLevel
)),
cc_taCert_A
,
valueof
(
mw_headerInfo_gn
(
-
,
f_computeGnTimestamp
())),
valueof
(
m_signerIdentifier_digest
)
f_sendEnrollmentRequest
(
m_innerEcRequest
(
"TODO"
,
m_publicKeys
(
v_certificate
.
toBeSigned
.
verifyKeyIndicator
.
verificationKey
,
v_certificate
.
toBeSigned
.
encryptionKey
),
m_certificateSubjectAttributes
(
v_certificate
.
toBeSigned
.
appPermissions
,
v_certificate
.
toBeSigned
.
validityPeriod
,
v_certificate
.
toBeSigned
.
region
,
v_certificate
.
toBeSigned
.
assuranceLevel
)),
cc_taCert_A
,
valueof
(
mw_headerInfo_gn
(
-
,
f_computeGnTimestamp
())),
valueof
(
m_signerIdentifier_digest
)
);
tc_ac
.
start
;
alt
{
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
312dc93b
...
...
@@ -883,12 +883,38 @@ module ItsRSUsSimulator_Functions {
altstep
a_process_cf_ut_command
()
runs
on
ItsRSUsSimulator
{
var
UtGnInitialize
v_utGnInitialize
;
var
UtGnTrigger
v_utGnTrigger
;
[]
cfPort
.
receive
(
UtGnInitialize
:?
)
->
value
v_utGnInitialize
{
log
(
"v_utGnInitialize = "
,
v_utGnInitialize
);
cfPort
.
send
(
UtGnResults
:
{
utGnInitializeResult
:=
true
}
);
repeat
;
}
[]
cfPort
.
receive
(
UtGnTrigger
:?
)
->
value
v_utGnTrigger
{
log
(
"v_utGnTrigger = "
,
v_utGnTrigger
);
if
(
ischosen
(
v_utGnTrigger
.
geoUnicast
))
{
var
GnNonSecuredPacket
v_geoNwUnicastPacket
:=
valueof
(
m_geoNwUnicastPacket_with_payload
(
vc_longPosVectorRsu
,
f_getIutShortPosVector
(),
f_incLocalSeqNumber
(),
c_defaultHopLimit
,
v_utGnTrigger
.
geoUnicast
.
trafficClass
,
v_utGnTrigger
.
geoUnicast
.
payload
));
var
GeoNetworkingPdu
v_geoNwPdu
:=
valueof
(
m_geoNwPdu
(
v_geoNwUnicastPacket
,
v_utGnTrigger
.
geoUnicast
.
lifetime
,
c_defaultHopLimit
)
);
// FIXME Check what to do with GN_Address v_geoNwPdu.gnPacket.packet.extendedHeader.geoUnicastHeader. := v_utGnTrigger.geoUnicast.gnAddress;
geoNetworkingPort
.
send
(
m_geoNwReq_linkLayerBroadcast
(
v_geoNwPdu
));
}
cfPort
.
send
(
UtGnResults
:
{
utGnTriggerResult
:=
true
}
);
repeat
;
}
[
vc_cam
==
true
]
cfPort
.
receive
(
UtCamInitialize
:?
)
{
cfPort
.
send
(
UtCamResults
:
{
utCamInitializeResult
:=
true
}
);
repeat
;
...
...
@@ -902,9 +928,10 @@ module ItsRSUsSimulator_Functions {
cfPort
.
send
(
UtDenmResults
:
{
utDenmInitializeResult
:=
true
}
);
repeat
;
}
/* [PICS_GENERATE_DENM == true] utPort.receive(UtDenmInitialize:?) { */
/* utPort.send(UtDenmResults: { utDenmInitializeResult := true }); */
/* } */
[
vc_denm
==
true
]
utPort
.
receive
(
UtDenmInitialize
:?
)
{
utPort
.
send
(
UtDenmResults
:
{
utDenmInitializeResult
:=
true
});
repeat
;
}
[]
cfPort
.
receive
{
// Ignore it
log
(
"*** "
&
testcasename
()
&
": INFO: Unexpected CF message received ***"
);
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestSystem.ttcn
View file @
312dc93b
...
...
@@ -151,7 +151,7 @@ module ItsRSUsSimulator_TestSystem {
out
CfInitialize
,
CfResult
,
UtGnResults
,
UtCamResults
,
UtDenmResults
;
in
CfEvent
,
CfEventInd
,
UtGnInitialize
,
UtCamInitialize
,
UtDenmInitialize
,
UtCamTrigger
CfEvent
,
CfEventInd
,
UtGnInitialize
,
UtCamInitialize
,
UtDenmInitialize
,
UtGnTrigger
,
UtCamTrigger
}
// End of ConfigRsuSimulatorPort
}
// End of group configRsuSimulatorPort
...
...
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