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
31b3b032
Commit
31b3b032
authored
4 years ago
by
Yann Garcia
Browse files
Options
Downloads
Patches
Plain Diff
Add TLS support
parent
b036be1e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
LibOneM2M/OneM2M_Pixits.ttcn
+28
-14
28 additions, 14 deletions
LibOneM2M/OneM2M_Pixits.ttcn
LibOneM2M/OneM2M_TypesAndValues.ttcn
+4
-1
4 additions, 1 deletion
LibOneM2M/OneM2M_TypesAndValues.ttcn
OneM2M_Testcases_CSE_Release_4.ttcn
+62
-4
62 additions, 4 deletions
OneM2M_Testcases_CSE_Release_4.ttcn
with
94 additions
and
19 deletions
LibOneM2M/OneM2M_Pixits.ttcn
+
28
−
14
View file @
31b3b032
...
@@ -166,7 +166,8 @@ module OneM2M_Pixits {
...
@@ -166,7 +166,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
// SUT CoAP/HTTP port
remotePort
:=
8080
,
// SUT CoAP/HTTP port
localPort
:=
3031
,
// Test Adapter client port (for debug purpose only)
localPort
:=
3031
,
// Test Adapter client port (for debug purpose only)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -180,7 +181,8 @@ module OneM2M_Pixits {
...
@@ -180,7 +181,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
omit
,
remotePort
:=
omit
,
localPort
:=
3041
,
// Test Adapter listener port (AeSimu acts as server)
localPort
:=
3041
,
// Test Adapter listener port (AeSimu acts as server)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -198,7 +200,8 @@ module OneM2M_Pixits {
...
@@ -198,7 +200,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
// SUT CoAP/HTTP port
remotePort
:=
8080
,
// SUT CoAP/HTTP port
localPort
:=
3032
,
// Test Adapter client port (for debug purpose only)
localPort
:=
3032
,
// Test Adapter client port (for debug purpose only)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -212,7 +215,8 @@ module OneM2M_Pixits {
...
@@ -212,7 +215,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
omit
,
remotePort
:=
omit
,
localPort
:=
3042
,
// Test Adapter listener port (AeSimu acts as server)
localPort
:=
3042
,
// Test Adapter listener port (AeSimu acts as server)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -233,7 +237,8 @@ module OneM2M_Pixits {
...
@@ -233,7 +237,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
3131
,
localPort
:=
3131
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -247,7 +252,8 @@ module OneM2M_Pixits {
...
@@ -247,7 +252,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
omit
,
remotePort
:=
omit
,
localPort
:=
3141
,
localPort
:=
3141
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -261,7 +267,8 @@ module OneM2M_Pixits {
...
@@ -261,7 +267,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
4131
,
localPort
:=
4131
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -275,7 +282,8 @@ module OneM2M_Pixits {
...
@@ -275,7 +282,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
omit
,
remotePort
:=
omit
,
localPort
:=
4141
,
localPort
:=
4141
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -296,7 +304,8 @@ module OneM2M_Pixits {
...
@@ -296,7 +304,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
3132
,
localPort
:=
3132
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -310,7 +319,8 @@ module OneM2M_Pixits {
...
@@ -310,7 +319,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
3142
,
localPort
:=
3142
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -324,7 +334,8 @@ module OneM2M_Pixits {
...
@@ -324,7 +334,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
4132
,
localPort
:=
4132
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -338,7 +349,8 @@ module OneM2M_Pixits {
...
@@ -338,7 +349,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
remotePort
:=
8080
,
localPort
:=
4142
,
localPort
:=
4142
,
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -358,7 +370,8 @@ module OneM2M_Pixits {
...
@@ -358,7 +370,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
8080
,
// SUT CoAP/HTTP port
remotePort
:=
8080
,
// SUT CoAP/HTTP port
localPort
:=
3033
,
// Test Adapter client port (for debug purpose only)
localPort
:=
3033
,
// Test Adapter client port (for debug purpose only)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
@@ -372,7 +385,8 @@ module OneM2M_Pixits {
...
@@ -372,7 +385,8 @@ module OneM2M_Pixits {
tsAddress
:=
"127.0.0.1"
,
tsAddress
:=
"127.0.0.1"
,
remotePort
:=
omit
,
remotePort
:=
omit
,
localPort
:=
3043
,
// Test Adapter listener port (AeSimu acts as server)
localPort
:=
3043
,
// Test Adapter listener port (AeSimu acts as server)
sutAddress
:=
"127.0.0.1"
sutAddress
:=
"127.0.0.1"
,
useTls
:=
omit
}
}
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
LibOneM2M/OneM2M_TypesAndValues.ttcn
+
4
−
1
View file @
31b3b032
...
@@ -4325,12 +4325,15 @@ group OtherTypes {
...
@@ -4325,12 +4325,15 @@ group OtherTypes {
* The local client port. In this case, the value 'omit' is interpreted as random port number by the Test Adapter
* The local client port. In this case, the value 'omit' is interpreted as random port number by the Test Adapter
* @member sutAddress SUT IP address, optional.
* @member sutAddress SUT IP address, optional.
* If omitted, the SUT IP address defined in SutDesc data structure will be used by the Test Adapter
* If omitted, the SUT IP address defined in SutDesc data structure will be used by the Test Adapter
* @member useTls Set to true if HTTPS shall be used, optional.
* If omitted, regular HTTP is used
*/
*/
type
record
BindingDesc
{
type
record
BindingDesc
{
charstring
tsAddress
,
charstring
tsAddress
,
integer
remotePort
optional
,
integer
remotePort
optional
,
integer
localPort
optional
,
integer
localPort
optional
,
charstring
sutAddress
charstring
sutAddress
,
boolean
useTls
optional
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
OneM2M_Testcases_CSE_Release_4.ttcn
+
62
−
4
View file @
31b3b032
...
@@ -1084,6 +1084,7 @@ module OneM2M_Testcases_CSE_Release_4 {
...
@@ -1084,6 +1084,7 @@ module OneM2M_Testcases_CSE_Release_4 {
var
XSD
.
ID
v_ae1ResourceId
;
var
XSD
.
ID
v_ae1ResourceId
;
var
template
RequestPrimitive
v_groupRequest
:=
m_createGroup
(
1
,
-
,
omit
,
int2
,
-
,
-
,
-
);
var
template
RequestPrimitive
v_groupRequest
:=
m_createGroup
(
1
,
-
,
omit
,
int2
,
-
,
-
,
-
);
var
template
RequestPrimitive
v_createRequest
:=
valueof
(
m_createAcpBase
);
var
template
RequestPrimitive
v_createRequest
:=
valueof
(
m_createAcpBase
);
var
integer
v_state
:=
0
;
// Sequencing of received message
// Test control
// Test control
if
(
not
(
PICS_ACP_SUPPORT
))
{
if
(
not
(
PICS_ACP_SUPPORT
))
{
...
@@ -1114,15 +1115,16 @@ module OneM2M_Testcases_CSE_Release_4 {
...
@@ -1114,15 +1115,16 @@ module OneM2M_Testcases_CSE_Release_4 {
v_groupIndex
:=
f_cse_createResource
(
int3
,
v_groupRequest
,
v_aeIndex
);
v_groupIndex
:=
f_cse_createResource
(
int3
,
v_groupRequest
,
v_aeIndex
);
v_createRequest
:=
m_createAcp
(
-
,
{
f_getResourceId
(
vc_resourcesList
[
v_groupIndex
].
resource
)}
,
-
);
v_createRequest
:=
m_createDynamicAuthorizationConsultationBase
(
omit
,
true
);
//dynamicAuthorizationEnable set to TRUE
v_createRequest
.
primitiveContent
.
dynamicAuthorizationConsultation
.
dynamicAuthorizationPoA
:=
{
f_getResourceAddress
(
v_aeIndex
)};
// Test Body
// Test Body
v_createRequest
:=
f_getCreateRequestPrimitive
(
int
1
,
v_createRequest
,
v_aeIndex
);
v_createRequest
:=
f_getCreateRequestPrimitive
(
int
34
,
v_createRequest
,
v_aeIndex
);
// dynamicAuthorizationConsultation, TS-0004 Table 6.3.4.2.1 1: Interpretation of resourceType
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_createRequest
)));
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_createRequest
)));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2001
)
))
->
value
vc_response
{
[
v_state
==
0
]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
OK
))
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
//Check mandatory fields
//Check mandatory fields
if
(
ischosen
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
))
{
if
(
ischosen
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
))
{
...
@@ -1136,13 +1138,27 @@ module OneM2M_Testcases_CSE_Release_4 {
...
@@ -1136,13 +1138,27 @@ module OneM2M_Testcases_CSE_Release_4 {
setverdict
(
fail
,
__SCOPE__
&
": authorSignReqInfo element is not set to 'true' (Steps 6-8 not applied)"
);
setverdict
(
fail
,
__SCOPE__
&
": authorSignReqInfo element is not set to 'true' (Steps 6-8 not applied)"
);
}
}
if
(
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
d
as
Response
)
and
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
d
ynAuthRelMap
Response
)
and
(
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
)
or
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
)
or
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
)
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
)
)
)
)
{
)
{
var
SignatureList
v_authorSigns
;
var
template
RequestPrimitive
v_notifyRequest
:=
m_notifyNotification
(
f_getResourceAddress
(
v_aeIndex
));
setverdict
(
pass
,
__SCOPE__
&
": Tokens/TokenIDs were created"
);
setverdict
(
pass
,
__SCOPE__
&
": Tokens/TokenIDs were created"
);
v_state
:=
v_state
+
1
;
// TODO Process signature of MIC???
// TODO Send Notify to the IUT (step 6.1 & 6.2)
//fx_generateAuthorSignForTokens(vc_response.primitive.responsePrimitive, v_authorSigns);
v_notifyRequest
.
authorSigns
:=
v_authorSigns
;
v_notifyRequest
.
tokens
:=
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
;
v_notifyRequest
.
tokenIDs
:=
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
;
v_notifyRequest
.
authorSignIndicator
:=
true
;
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_notifyRequest
)));
tc_ac
.
start
;
repeat
;
}
else
{
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
}
}
...
@@ -1150,6 +1166,10 @@ module OneM2M_Testcases_CSE_Release_4 {
...
@@ -1150,6 +1166,10 @@ module OneM2M_Testcases_CSE_Release_4 {
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
}
}
}
}
[
v_state
==
1
]
mcaPort
.
receive
(
mw_response
(
mw_responseNotify
(
int2000
)))
->
value
vc_response
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Step 6-8 were applied"
);
}
[]
mcaPort
.
receive
(
mw_response
)
->
value
vc_response
{
[]
mcaPort
.
receive
(
mw_response
)
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code"
);
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code"
);
...
@@ -1167,12 +1187,50 @@ module OneM2M_Testcases_CSE_Release_4 {
...
@@ -1167,12 +1187,50 @@ module OneM2M_Testcases_CSE_Release_4 {
}
//end TC_CSE_SEC_DDA_CRE_002
}
//end TC_CSE_SEC_DDA_CRE_002
/**
* @desc Check that the IUT processes properly Direct Dynamic Authorization with no DynamicAuthorizationConsultation attribute (Steps 6-8 not applied)
*/
testcase
TC_CSE_SEC_DDA_CRE_003
()
runs
on
Tester
system
CseSystem
{
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
v_ae1
.
start
(
f_CSE_SEC_DDA_CRE_003
());
v_ae1
.
done
;
}
function
f_CSE_SEC_DDA_CRE_003
()
runs
on
AeSimu
system
CseSystem
{
// TODO
}
//end TC_CSE_SEC_DDA_CRE_003
}
// end of group Create
}
// end of group Create
}
//end group DirectDynamic_Authorization
}
//end group DirectDynamic_Authorization
group
Indirect_Dynamic_Authorization
{
group
Indirect_Dynamic_Authorization
{
group
Create
{
/**
* @desc Check that the IUT processes properly basic Indirect Dynamic Authorization (Only mandatories steps applied)
*/
testcase
TC_CSE_SEC_DDA_CRE_004
()
runs
on
Tester
system
CseSystem
{
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
v_ae1
.
start
(
f_CSE_SEC_DDA_CRE_004
());
v_ae1
.
done
;
}
function
f_CSE_SEC_DDA_CRE_004
()
runs
on
AeSimu
system
CseSystem
{
// TODO
}
//end TC_CSE_SEC_DDA_CRE_004
}
// end of group Create
}
//end group IndirectDynamic_Authorization
}
//end group IndirectDynamic_Authorization
}
//end group Dynamic_Authorization
}
//end group Dynamic_Authorization
...
...
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