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
289f34c9
Commit
289f34c9
authored
May 03, 2022
by
Yann Garcia
Browse files
Merge branch 'TTF011' into 'devel'
Ttf011IntoDevel See merge request
!2
parents
6a8ac311
d4311521
Changes
3
Hide whitespace changes
Inline
Side-by-side
ttcn/Common/LibItsCommon_Functions.ttcn
View file @
289f34c9
...
...
@@ -119,7 +119,7 @@ module LibItsCommon_Functions {
/**
* @desc Gets the current time since 01/01/1970 in UTC format
* @return The current time since 01/01/1970 in UTC format
* @return The current time since 01/01/1970 in UTC format
in milliseconds
*/
function
f_getCurrentTimeUtc
()
return
UInt64
{
var
UInt64
v_time
:=
0
;
...
...
ttcn/Common/LibItsCommon_TypesAndValues.ttcn
View file @
289f34c9
...
...
@@ -203,7 +203,9 @@ module LibItsCommon_TypesAndValues {
const
integer
c_its_aid_TLC
:=
140
;
const
integer
c_its_aid_TLS
:=
140
;
const
integer
c_its_aid_GN
:=
141
;
const
integer
c_its_aid_CRL
:=
622
;
// ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
const
integer
c_its_aid_SCR
:=
623
;
// Secured Certificate Request, https://standards.ieee.org/products-services/regauth/psid/public.html
const
integer
c_its_aid_CPOC
:=
624
;
// ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
}
}
with
{
...
...
ttcn/Http/LibItsHttp_Functions.ttcn
View file @
289f34c9
...
...
@@ -145,6 +145,32 @@ module LibItsHttp_Functions {
}
// End of 'for' statement
}
// End of function f_get_header
/**
* @desc Check HTTP response headers
* @param p_headers The HTTP headers
* @param p_value the expected va;ue
* @return true on success, false otherwise
*/
function
f_check_headers
(
in
Headers
p_headers
,
in
charstring
p_header_name
:=
"Location"
,
in
template
(
present
)
charstring
p_value
:=
?
)
return
boolean
{
// Local variables
var
boolean
v_header_matched
:=
false
;
for
(
var
integer
v_idx
:=
0
;
v_idx
<
lengthof
(
p_headers
);
v_idx
:=
v_idx
+
1
)
{
if
(
p_headers
[
v_idx
].
header_name
==
p_header_name
)
{
if
(
match
(
p_headers
[
v_idx
].
header_value
[
0
],
p_value
)
==
true
)
{
v_header_matched
:=
true
;
}
// else, nothing to do
break
;
}
}
// End of 'for' statement
return
v_header_matched
;
}
// End of function f_check_headers
}
// End of group http_headers
}
// End of module LibItsHttp_Functions
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