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
4a620079
Commit
4a620079
authored
Oct 17, 2018
by
garciay
Browse files
STF545: Validate first test case
parent
f18d6e12
Changes
2
Hide whitespace changes
Inline
Side-by-side
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
4a620079
...
...
@@ -33,22 +33,24 @@ module LibItsPki_Functions {
import
from
LibItsCommon_Functions
all
;
import
from
LibItsCommon_ASN1_NamedNumbers
all
;
import
from
LibItsCommon_Pixits
all
;
// LibItsSecurity
import
from
LibItsSecurity_TypesAndValues
all
;
import
from
LibItsSecurity_Templates
all
;
import
from
LibItsSecurity_Functions
all
;
import
from
LibItsSecurity_Pixits
all
;
// LibItsHttp
import
from
LibItsHttp_TypesAndValues
all
;
import
from
LibItsHttp_TestSystem
all
;
// LibItsPki
import
from
LibItsPki_TypesAndValues
all
;
import
from
LibItsPki_Templates
all
;
import
from
LibItsPki_Pics
all
;
import
from
LibItsPki_TestSystem
all
;
group
pkiConfigurationFunctions
{
group
pkiConfigurationFunctions
{
/**
* @desc Setups default configuration
...
...
@@ -129,6 +131,36 @@ module LibItsPki_Functions {
}
// End of function f_uninitialiseSecuredMode()
}
// End of pkiConfigurationFunctions
group
ac_port
{
function
f_sendAcPkiPrimitive
(
in
octetstring
p_private_key
,
in
octetstring
p_publicKeyCompressed
,
in
integer
p_compressedMode
)
runs
on
ItsPki
{
var
AcSetSecurityData
v_ac_set_security_data
;
v_ac_set_security_data
:=
{
PICS_TS_CERTIFICATE_ID
,
PICS_IUT_CERTIFICATE_ID
,
p_private_key
,
p_publicKeyCompressed
,
p_compressedMode
};
acPkiPort
.
send
(
AcPkiPrimitive
:
{
acSetSecurityData
:=
v_ac_set_security_data
});
tc_ac
.
start
;
alt
{
[]
acPkiPort
.
receive
(
AcPkiResponse
:
{
result
:=
true
})
{
tc_ac
.
stop
;
}
[]
acPkiPort
.
receive
(
AcPkiResponse
:
{
result
:=
false
})
{
tc_ac
.
stop
;
log
(
"*** f_sendAcPkiPrimitive: ERROR: Received unexpected message ***"
);
f_selfOrClientSyncAndVerdict
(
"error"
,
e_error
);
}
[]
tc_ac
.
timeout
{
log
(
"*** f_sendAcPkiPrimitive: ERROR: Timeout while waiting for adapter control event result ***"
);
f_selfOrClientSyncAndVerdict
(
"error"
,
e_timeout
);
}
}
// End of 'alt' statement
}
}
// End of group ac_port
group
inner_ec_xxx
{
...
...
ttcn/Pki/LibItsPki_Pics.ttcn
0 → 100644
View file @
4a620079
module
LibItsPki_Pics
{
/**
* @desc Does the IUT act as ITS-S device?
*/
modulepar
boolean
PICS_IUT_ITS_S_ROLE
:=
false
;
/**
* @desc Does the IUT act as EA device?
*/
modulepar
boolean
PICS_IUT_EA_ROLE
:=
true
;
/**
* @desc Does the IUT act as AA device?
*/
modulepar
boolean
PICS_IUT_AA_ROLE
:=
false
;
/**
* @desc Certificate used by the IUT
*/
modulepar
charstring
PICS_IUT_CERTIFICATE_ID
:=
"CERT_IUT_A_EA"
;
/**
* @desc Certificate used by the Test System
*/
modulepar
charstring
PICS_TS_CERTIFICATE_ID
:=
"CERT_TS_A_EA"
;
}
// End of module LibItsPki_Pics
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