Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
ec5adf9c
Commit
ec5adf9c
authored
7 years ago
by
abbas ahmad
Browse files
Options
Downloads
Patches
Plain Diff
Implemented 1 DAS TC. Made corrections on message representation in ESC TC's.
parent
c0eea593
Branches
Release4-onwards-Sec
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
LibOneM2M/OneM2M_Functions.ttcn
+2
-2
2 additions, 2 deletions
LibOneM2M/OneM2M_Functions.ttcn
LibOneM2M/OneM2M_Templates.ttcn
+3
-1
3 additions, 1 deletion
LibOneM2M/OneM2M_Templates.ttcn
OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn
+76
-8
76 additions, 8 deletions
OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn
with
81 additions
and
11 deletions
LibOneM2M/OneM2M_Functions.ttcn
+
2
−
2
View file @
ec5adf9c
...
@@ -4008,8 +4008,8 @@ module OneM2M_Functions {
...
@@ -4008,8 +4008,8 @@ module OneM2M_Functions {
v_requestNotify
.
to_
:=
f_getResourceAddress
(
vc_remoteCseIndex
);
v_requestNotify
.
to_
:=
f_getResourceAddress
(
vc_remoteCseIndex
);
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"
VExTIE1lc3NhZ2U6IENsaWVudCBIZWxsbw==
"
);
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"
Q2xpZW50IEhlbGxv
"
);
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"
VExTIE1lc3NhZ2VzOiBTZXJ2ZXIg
SGVsbG8sIENlcnRpZmljYXRlKiwgU2VydmVyS2V5RXhjaGFuZ2UqLCBDZXJ0aWZpY2F0ZVJlcXVlc3QqLCBTZXJ2ZXJIZWxsb0RvbmU="
));
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"
U2VydmVy
SGVsbG8sIENlcnRpZmljYXRlKiwgU2VydmVyS2V5RXhjaGFuZ2UqLCBDZXJ0aWZpY2F0ZVJlcXVlc3QqLCBTZXJ2ZXJIZWxsb0RvbmU="
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
tc_ac
.
start
;
tc_ac
.
start
;
...
...
This diff is collapsed.
Click to expand it.
LibOneM2M/OneM2M_Templates.ttcn
+
3
−
1
View file @
ec5adf9c
...
@@ -1358,13 +1358,15 @@ module OneM2M_Templates {
...
@@ -1358,13 +1358,15 @@ module OneM2M_Templates {
* @desc SecurityInfo content
* @desc SecurityInfo content
* @param p_securityInfoType security type integer
* @param p_securityInfoType security type integer
*/
*/
template
SecurityInfo
mw_contentSecurityInfo
(
in
SecurityInfoType
p_securityInfoType
,
in
XSD
.
Base64Binary
p_escertkeMessage
)
:=
{
template
SecurityInfo
mw_contentSecurityInfo
(
in
SecurityInfoType
p_securityInfoType
,
in
template
(
omit
)
XSD
.
Base64Binary
p_escertkeMessage
:=
omit
,
in
template
(
omit
)
DynAuthDasRequest
p_dasRequest
:=
omit
)
:=
{
securityInfoType
:=
p_securityInfoType
,
securityInfoType
:=
p_securityInfoType
,
dasRequest
:=
*
,
dasRequest
:=
*
,
dasResponse
:=
*
,
dasResponse
:=
*
,
esprimRandObject
:=
*
,
esprimRandObject
:=
*
,
esprimObject
:=
*
,
esprimObject
:=
*
,
escertkeMessage
:=
p_escertkeMessage
escertkeMessage
:=
p_escertkeMessage
//dynAuthDasRequest
}
}
...
...
This diff is collapsed.
Click to expand it.
OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn
+
76
−
8
View file @
ec5adf9c
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
*/
*/
module
OneM2M_Testcases_CSE_Release_2_SEC_STF531
{
module
OneM2M_Testcases_CSE_Release_2_SEC_STF531
{
import
from
LibCommon_BasicTypesAndValues
all
;
import
from
OneM2M_TestSystem
all
;
import
from
OneM2M_TestSystem
all
;
import
from
OneM2M_Templates
all
;
import
from
OneM2M_Templates
all
;
import
from
OneM2M_Types
all
;
//{type XSD.ID};
import
from
OneM2M_Types
all
;
//{type XSD.ID};
...
@@ -77,8 +79,74 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
...
@@ -77,8 +79,74 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
}
//end group oneM2M_demos
}
//end group oneM2M_demos
group
AE
{
group
ESCertKE
{
}
}
group
CSE
{
group
CSE
{
group
DAS
{
testcase
TC_CSE_DAS_BV_001
()
runs
on
AeSimu
system
CseSystem
{
var
MsgIn
v_response
;
var
RequestPrimitive
v_requestRetrive
;
var
PrimitiveContent
v_primitiveContentResponse
;
var
integer
v_ae1Index
,
v_contIndex
,
v_auxAcpIndex
;
var
DynAuthDasRequest
v_dasRequest
;
//Test component configuration
f_cf01Up
();
//Preamble (initial conditions)
v_auxAcpIndex
:=
f_cse_preamble_createAcpAux
(
-
,
int61
);
v_ae1Index
:=
f_cse_preamble_registerAe
();
v_contIndex
:=
f_cse_createResource_withAcpAux
(
int3
,
m_createContainerBase
,
v_ae1Index
);
//TODO => ? and the IUT having registered at least one DAS AE
//TestBody
v_requestRetrive
.
to_
:=
f_getResourceAddress
(
v_contIndex
);
v_requestRetrive
.
from_
:=
f_getOriginator
(
v_ae1Index
);
v_primitiveContentResponse
.
responsePrimitive
.
to_
:=
f_getResourceAddress
(
v_contIndex
);
v_primitiveContentResponse
.
responsePrimitive
.
from_
:=
f_getOriginator
(
v_ae1Index
);
v_dasRequest
.
originator
:=
f_getOriginator
(
v_ae1Index
);
v_dasRequest
.
targetedResourceType
:=
int3
;
v_dasRequest
.
operation
:=
int2
;
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int1
,
-
,
v_dasRequest
);
mcaPort
.
send
(
m_request
(
v_requestRetrive
));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
,
v_primitiveContentResponse
)))
->
value
v_response
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": DAS Request received successfully"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
->
value
v_response
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong SecurityInfo (securityInfoType ¦¦ dasRequest ) Message received"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
->
value
v_response
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
__SCOPE__
&
":INFO: Timeout while awaiting the reception of a message"
);
}
}
f_cse_postamble_deleteResources
();
f_cf01Down
();
}
}
group
ESCertKE
{
group
ESCertKE
{
testcase
TC_CSE_ESC_BV_001
()
runs
on
CseSimu
system
CseSystem
{
testcase
TC_CSE_ESC_BV_001
()
runs
on
CseSimu
system
CseSystem
{
...
@@ -100,9 +168,10 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
...
@@ -100,9 +168,10 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
//TODO Base 64 representation of message ?
//Base 64 representation of message (https://www.base64encode.org/) ? ClientHello
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"ClientHello"
);
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"Q2xpZW50SGVsbG8="
);
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"ServerHello, Certificate*, ServerKeyExchange*, CertificateRequest*, ServerHelloDone"
));
//msg ? ServerHello, Certificate*, ServerKeyExchange*, CertificateRequest*, ServerHelloDone
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"U2VydmVySGVsbG8sIENlcnRpZmljYXRlKiwgU2VydmVyS2V5RXhjaGFuZ2UqLCBDZXJ0aWZpY2F0ZVJlcXVlc3QqLCBTZXJ2ZXJIZWxsb0RvbmU="
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
tc_ac
.
start
;
tc_ac
.
start
;
...
@@ -128,8 +197,6 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
...
@@ -128,8 +197,6 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
f_cf02DownCseSimuMaster
();
f_cf02DownCseSimuMaster
();
}
}
testcase
TC_CSE_ESC_BV_002
()
runs
on
CseSimu
system
CseSystem
{
testcase
TC_CSE_ESC_BV_002
()
runs
on
CseSimu
system
CseSystem
{
var
MsgIn
v_response
;
var
MsgIn
v_response
;
var
RequestPrimitive
v_requestNotify
;
var
RequestPrimitive
v_requestNotify
;
...
@@ -150,9 +217,10 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
...
@@ -150,9 +217,10 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
from_
:=
PX_CSE1_ID
;
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
v_requestNotify
.
primitiveContent
:=
{
securityInfo
:=
m_contentSecurityInfo
(
int6
)};
//TODO Base 64 representation of message ?
//TODO Base 64 representation of message ? Certificate*, ClientKeyExchange, CertificateVerify*, [ChangeCipherSpec], Finished
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"Certificate*, ClientKeyExchange, CertificateVerify*, [ChangeCipherSpec], Finished"
);
v_requestNotify
.
primitiveContent
.
securityInfo
.
escertkeMessage
:=
str2oct
(
"Q2VydGlmaWNhdGUqLCBDbGllbnRLZXlFeGNoYW5nZSwgQ2VydGlmaWNhdGVWZXJpZnkqLCBbQ2hhbmdlQ2lwaGVyU3BlY10sIEZpbmlzaGVk"
);
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"[ChangeCipherSpec], Finished"
));
// Msg: ? [ChangeCipherSpec], Finished
v_primitiveContentResponse
.
securityInfo
:=
mw_contentSecurityInfo
(
int6
,
str2oct
(
"W0NoYW5nZUNpcGhlclNwZWNdLCBGaW5pc2hlZA=="
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
mccPort
.
send
(
m_request
(
v_requestNotify
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment