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
15fef2a5
Commit
15fef2a5
authored
Jul 27, 2018
by
garciay
Browse files
STF545: Update first TC
parent
155307e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsPki/ItsPki_Functions.ttcn
View file @
15fef2a5
...
...
@@ -56,7 +56,7 @@ module ItsPki_Functions {
)
runs
on
ItsPki
{
// Local variables
var
octetstring
v_encMsg
;
var
octetstring
v_
gnPayloa
d
;
var
octetstring
v_
raw_payload_to_be_signe
d
;
var
EtsiTs103097Data
v_securedMessage
:=
{};
var
HeaderLines
v_headers
;
...
...
@@ -79,10 +79,8 @@ module ItsPki_Functions {
p_configId
);
// Encode secured Gn packet
v_securedGnPdu
:=
valueof
(
m_geoNwSecPdu
(
v_gnNonSecuredPacket
,
v_securedMessage
));
v_encMsg
:=
bit2oct
(
encvalue
(
v_securedGnPdu
));
// Send secured Gn packet
// Send HTTP request
v_encMsg
:=
bit2oct
(
encvalue
(
v_securedMessage
));
f_init_default_headers_list
(
v_headers
);
httpPort
.
send
(
m_http_request
(
m_http_request_post
(
"/"
,
v_headers
,
m_http_message_body_binary
(
m_binary_body_raw
(
v_encMsg
)))));
}
...
...
@@ -93,7 +91,7 @@ module ItsPki_Functions {
in
SignerIdentifier
p_signerIdentifierType
,
in
charstring
p_certificateName
:=
""
/*,
in boolean p_addMissingHeaders := true*/
)
runs
on
ItsPki
{
)
runs
on
ItsPki
return
boolean
{
// Local variables
var
EtsiTs103097Certificate
v_aaCertificate
,
v_atCertificate
;
...
...
@@ -173,6 +171,7 @@ module ItsPki_Functions {
}
log
(
"f_buildSecuredPki: p_securedMessage = "
,
p_securedMessage
);
return
true
;
}
// End of function f_buildSecuredPki
}
// End of module ItsPki_Functions
\ No newline at end of file
ttcn/AtsPki/ItsPki_TestCases.ttcn
View file @
15fef2a5
...
...
@@ -78,15 +78,16 @@ module ItsPki_TestCases {
}
// Test component configuration
f_cf01Up
();
// Initialise IUT with CERT_IUT_A_AT signed with CERT_IUT_A_AA
vc_hashedId8ToBeUsed
:=
"CERT_IUT_F_AT"
;
f_cf01Up
();
// Initialise IUT with CERT_IUT_F_AT signed with CERT_IUT_F_AA
v_longPosVectorIut
:=
f_getPosition
(
c_compIut
);
log
(
"v_longPosVectorIut = "
,
v_longPosVectorIut
);
f_readCertificate
(
vc_hashedId8ToBeUsed
,
v_certificate
);
// Test adapter configuration
// Preamble
f_prNeighbour
();
f_acTriggerEvent
(
m_startPassBeaconing
(
m_beaconHeader
(
v_longPosVectorIut
).
beaconHeader
));
// Authorize the TA to forward the received beacons
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
...
...
@@ -130,7 +131,6 @@ module ItsPki_TestCases {
}
// End of 'alt' statement
// Postamble
f_acTriggerEvent
(
m_stopPassBeaconing
);
f_poNeighbour
();
f_cf01Down
();
...
...
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