Skip to content
Snippets Groups Projects
Commit b2e44724 authored by Enrique Sabatel's avatar Enrique Sabatel Committed by Miguel Angel Reina Ortega
Browse files

Added TC_AE_SEC_ESP_NTF_003

parent 522fca60
No related branches found
No related tags found
No related merge requests found
......@@ -1129,6 +1129,93 @@ module OneM2M_Testcases_AE_Release_3 {
group Security {
group ESPrim {
group Notify {
/**
* @desc Check that the IUT sends a valid ESPrim object to the Target CSE
*
*/
testcase TC_AE_SEC_ESP_NTF_003() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_AE_SEC_ESP_NTF_003());
v_cse1.done;
}
function f_AE_SEC_ESP_NTF_003() runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var XSD.ID v_targetResourceAddress;
var template RequestPrimitive v_notifyRequest;
// Test control
if(not(PICS_ESP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": End-to-End Security of Primitives (ESPrim) support is required to run this test case");
stop;
}
// Test component configuration
f_cf03Up();
// Test adapter configuration
// Preamble
fx_establish_pairwiseESPrimKey();
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
v_notifyRequest := valueof(m_notify(f_getResourceAddress()));
v_notifyRequest.primitiveContent.securityInfo.securityInfoType := int5;
// Test Body
var template UtTriggerPrimitive v_utRequest := m_utNotify;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid ESPrim object to " & f_getPortAddress(PX_TS_CSE1.mcaPortIn); // Test control
v_utRequest.requestPrimitive.to_ := f_getResourceAddress();
f_sendUtPrimitive(v_utRequest, v_action);
tc_ac.start;
alt {
[] mcaPortIn.receive(mw_request(v_notifyRequest)) -> value vc_request {
tc_ac.stop;
if (ispresent(vc_request.primitive.requestPrimitive.primitiveContent.securityInfo.esprimObject))
{
setverdict(pass, __SCOPE__ & ": ESPrim object received");
}
else
{
setverdict(fail, __SCOPE__ & ": Wrong message received");
}
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong message received");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while waiting for a valid ESPrim object");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf03Down();
}//end f_AE_SEC_ESP_NTF_003
} //end group Notify
group Retrieve {
} //end group Retrieve
} //end group ESCertKE
group ESCertKE {
group Notify {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment