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
3824b1be
Commit
3824b1be
authored
Oct 24, 2016
by
garciay
Browse files
Bug fixed validating Security with Commsignia
parent
85e1745a
Changes
2
Show whitespace changes
Inline
Side-by-side
ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn
View file @
3824b1be
...
...
@@ -802,9 +802,12 @@ module ItsDenm_TpFunctions {
f_utTriggerEvent
(
m_utTriggerEvent
(
v_situation
));
f_awaitDenMessage
(
mw_denmInd
(
mw_anyDenmPdu
),
v_denmInd
);
v_timestampIts
:=
f_getCurrentTime
();
//log("v_timestampIts: ", v_timestampIts);
v_actionId
:=
v_denmInd
.
msgIn
.
denm
.
management
.
actionID
;
v_referenceTime1
:=
v_denmInd
.
msgIn
.
denm
.
management
.
referenceTime
;
//log("v_referenceTime1: ", v_referenceTime1);
v_diff
:=
v_timestampIts
-
v_referenceTime1
;
//log("v_diff: ", v_diff);
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
...
...
@@ -827,7 +830,9 @@ module ItsDenm_TpFunctions {
)
->
value
v_denmInd
{
tc_ac
.
stop
;
v_timestampIts
:=
f_getCurrentTime
();
//log("v_timestampIts: ", v_timestampIts);
v_msgtimestamp
:=
v_denmInd
.
msgIn
.
denm
.
management
.
referenceTime
;
//log("v_msgtimestamp: ", v_msgtimestamp);
if
(
(
(
v_timestampIts
+
v_diff
)
>
v_msgtimestamp
)
and
(
v_msgtimestamp
>
v_referenceTime1
)
)
{
log
(
"*** "
&
testcasename
()
&
": PASS: Successfully received expected DENM. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
...
...
@@ -1535,8 +1540,7 @@ module ItsDenm_TpFunctions {
const
float
c_upperRepetitionInterval
:=
int2float
(
c_repetitionInterval
)
*
1.05
;
// Local variables
var
template
(
value
)
SituationContainer
v_situation
:=
m_situation
(
CauseCodeType_vehicleBreakdown_
,
VehicleBreakdownSubCauseCode_unavailable_
);
var
template
(
present
)
DenmInd
v_expectedDenmInd
:=
mw_denmInd
(
mw_denmPdu
(
mw_denm
(
mw_denmMgmtCon
(
mw_actionId
,
-
,
-
,
c_validityDuration
))));
var
template
(
present
)
DenmInd
v_expectedDenmInd
:=
mw_denmInd
(
mw_denmPdu
(
mw_denm
(
mw_denmMgmtCon
(
mw_actionId
,
-
,
-
,
c_validityDuration
))));
var
ActionID
v_actionId
;
var
DenmInd
v_denmInd
;
// Local timers
...
...
@@ -2924,7 +2928,7 @@ module ItsDenm_TpFunctions {
function
f_DEN_MSRV_BO_08_01
()
runs
on
ItsDenm
{
f_DEN_MSRV_BO_08_XX
(
"CERT_TS_DENM_
01
"
,
"CERT_TS_DENM_
BO_01_AT
"
,
m_situation
(
CauseCodeType_trafficCondition_
,
TrafficConditionSubCauseCode_unavailable_
)
);
}
...
...
@@ -2932,7 +2936,7 @@ module ItsDenm_TpFunctions {
function
f_DEN_MSRV_BO_08_02
()
runs
on
ItsDenm
{
f_DEN_MSRV_BO_08_XX
(
"CERT_TS_DENM_
02
"
,
"CERT_TS_DENM_
BO_02_AT
"
,
m_situation
(
CauseCodeType_accident_
,
AccidentSubCauseCode_unavailable_
)
);
}
...
...
@@ -2980,6 +2984,7 @@ module ItsDenm_TpFunctions {
);
f_sleep
(
1.0
);
vc_utEvents
:=
{};
// instruct adapter to use p_certName to sign message
if
(
e_success
!=
f_acTriggerSecEvent
(
m_acEnableSecurity
(
p_certName
)))
{
...
...
@@ -3025,7 +3030,7 @@ module ItsDenm_TpFunctions {
function
f_DEN_MSRV_BO_09_01
()
runs
on
ItsDenm
{
f_DEN_MSRV_BO_09_XX
(
"CERT_TS_DENM_
01
"
,
"CERT_TS_DENM_
BO_01_AT
"
,
m_situation
(
CauseCodeType_trafficCondition_
,
TrafficConditionSubCauseCode_unavailable_
),
m_situation
(
CauseCodeType_trafficCondition_
,
TrafficConditionSubCauseCode_trafficJamIncreasing_
)
);
...
...
@@ -3034,7 +3039,7 @@ module ItsDenm_TpFunctions {
function
f_DEN_MSRV_BO_09_02
()
runs
on
ItsDenm
{
f_DEN_MSRV_BO_09_XX
(
"CERT_TS_DENM_
02
"
,
"CERT_TS_DENM_
BO_02_AT
"
,
m_situation
(
CauseCodeType_accident_
,
AccidentSubCauseCode_unavailable_
),
m_situation
(
CauseCodeType_accident_
,
AccidentSubCauseCode_multiVehicleAccident_
)
);
...
...
ttcn/AtsSecurity/AtsSecurity_TestCases.ttcn3
View file @
3824b1be
...
...
@@ -1803,10 +1803,11 @@ module AtsSecurity_TestCases {
log("*** " & testcasename() & ": PASS: Generation time within certificate validity ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
}
}
else {
log("*** " & testcasename() & ": FAIL: Generation time not within certificate validity ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
}
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwSecPdu(
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