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
eef4aca7
Commit
eef4aca7
authored
Feb 13, 2019
by
Yann Garcia
Browse files
Merge branch 'STF525' of
https://forge.etsi.org/gitlab/ITS/ITS
into STF525
parents
41e92f25
af58f006
Changes
3
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
eef4aca7
...
...
@@ -127,9 +127,6 @@ module ItsRSUsSimulator_Functions {
map
(
self
:
acPort
,
system
:
acPort
);
map
(
self
:
cfPort
,
system
:
cfPort
);
map
(
self
:
geoNetworkingPort
,
system
:
geoNetworkingPort
);
if
(
vc_pki
==
true
)
{
map
(
self
:
httpPort
,
system
:
httpPort
);
}
// Connect
f_connect4SelfOrClientSync
();
...
...
@@ -137,7 +134,7 @@ module ItsRSUsSimulator_Functions {
// Initialise secured mode
LibItsGeoNetworking_Functions
.
f_initialiseSecuredMode
();
//Initialze the Config module
//cfPort.send(CfInitialize:{});
...
...
@@ -160,9 +157,6 @@ module ItsRSUsSimulator_Functions {
unmap
(
self
:
acPort
,
system
:
acPort
);
unmap
(
self
:
cfPort
,
system
:
cfPort
);
unmap
(
self
:
geoNetworkingPort
,
system
:
geoNetworkingPort
);
if
(
vc_pki
==
true
)
{
unmap
(
self
:
httpPort
,
system
:
httpPort
);
}
// Disconnect
f_disconnect4SelfOrClientSync
();
...
...
@@ -1064,18 +1058,22 @@ module ItsRSUsSimulator_Functions {
cfPort
.
send
(
UtDenmResults
:
{
utDenmInitializeResult
:=
true
}
);
repeat
;
}
[
vc_denm
==
true
]
cfPort
.
receive
(
UtDenmInitialize
:?
)
{
cfPort
.
send
(
UtDenmResults
:
{
utDenmInitializeResult
:=
true
});
repeat
;
}
[
vc_pki
==
true
]
cfPort
.
receive
(
UtPkiInitialize
:?
)
->
value
v_utPkiInitialize
{
log
(
"v_utPkiInitialize = "
,
v_utPkiInitialize
);
cfPort
.
send
(
UtPkiResults
:
{
utPkiInitializeResult
:=
true
}
);
repeat
;
}
[
vc_pki
==
true
]
cfPort
.
receive
(
UtPkiTrigger
:?
)
->
value
v_utPkiTrigger
{
var
ItsPkiHttp
v_pki
;
cfPort
.
send
(
UtPkiResults
:
{
utPkiTriggerResult
:=
true
}
);
f_trigger_enrolment_request_await_response
();
v_pki
:=
ItsPkiHttp
.
create
(
"TriggeredEc"
)
alive
;
v_pki
.
start
(
f_trigger_enrolment_request_await_response
(
vc_reenrolment
,
vc_ec_certificates_counter
,
vc_ec_certificates
));
//v_pki.done;
repeat
;
}
[]
cfPort
.
receive
{
...
...
@@ -1085,7 +1083,11 @@ module ItsRSUsSimulator_Functions {
}
}
// End of 'altstep' statement
function
f_trigger_enrolment_request_await_response
()
runs
on
ItsRSUsSimulator
{
function
f_trigger_enrolment_request_await_response
(
inout
boolean
p_reenrolment
,
inout
integer
p_ec_certificates_counter
,
inout
SequenceOfCertificate
p_ec_certificates
)
runs
on
ItsPkiHttp
{
// Local variables
var
Oct32
v_private_key
;
var
Oct32
v_compressed_public_key
;
...
...
@@ -1104,6 +1106,8 @@ module ItsRSUsSimulator_Functions {
log
(
">>> f_trigger_enrolment_request_await_response"
);
f_cfHttpUp
(
PICS_TS_EA_CERTIFICATE_ID
);
f_http_build_inner_ec_request
(
v_private_key
,
v_compressed_public_key
,
v_compressed_mode
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_salt
,
v_ieee1609dot2_signed_and_encrypted_data
,
v_request_hash
);
f_init_default_headers_list
(
-
,
"inner_ec_request"
,
v_headers
);
httpPort
.
send
(
...
...
@@ -1142,10 +1146,10 @@ module ItsRSUsSimulator_Functions {
if
(
f_verify_ec_certificate
(
v_etsi_ts_102941_data
.
content
.
enrolmentResponse
.
certificate
,
vc_eaCertificate
,
v_compressed_public_key
,
v_compressed_mode
))
{
log
(
"f_trigger_enrolment_request_await_response: Well-secured EA certificate received ***"
);
log
(
"p_inner_ec_response= "
,
v_inner_ec_response
);
vc
_reenrolment
:=
true
;
p
_reenrolment
:=
true
;
// Store the new certificate
vc
_ec_certificates
[
vc
_ec_certificates_counter
]
:=
v_inner_ec_response
.
certificate
;
vc
_ec_certificates_counter
:=
vc
_ec_certificates_counter
+
1
;
p
_ec_certificates
[
p
_ec_certificates_counter
]
:=
v_inner_ec_response
.
certificate
;
p
_ec_certificates_counter
:=
p
_ec_certificates_counter
+
1
;
}
else
{
log
(
"f_trigger_enrolment_request_await_response: Cannot verify EC certificate signature ***"
);
}
...
...
@@ -1154,10 +1158,13 @@ module ItsRSUsSimulator_Functions {
}
}
}
[]
tc_ac
.
timeout
{
[]
v_t
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Expected message not received ***"
);
}
}
// End of 'alt' statement
f_cfHttpDown
();
log
(
"<<< f_trigger_enrolment_request_await_response"
);
}
}
// End of module ItsRSUsSimulator_Functions
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestSystem.ttcn
View file @
eef4aca7
...
...
@@ -119,9 +119,9 @@ module ItsRSUsSimulator_TestSystem {
var
boolean
vc_reenrolment
:=
false
;
var
integer
vc_ec_certificates_counter
:=
0
;
var
SequenceOfCertificate
vc_ec_certificates
;
var
SequenceOfCertificate
vc_ec_certificates
:=
{}
;
var
integer
vc_at_certificates_counter
:=
0
;
var
SequenceOfCertificate
vc_at_certificates
;
var
SequenceOfCertificate
vc_at_certificates
:=
{}
;
}
// End of component ItsRSUsSimulator
/**
...
...
LibIts
@
a904ba27
Compare
467ea0b7
...
a904ba27
Subproject commit
467ea0b72dbef25dc1a8ce0c938f77442a7fdf4d
Subproject commit
a904ba2789456073401b34024cd5e03963633fc4
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