diff --git a/OneM2M_Testcases_AE_Release_3.ttcn b/OneM2M_Testcases_AE_Release_3.ttcn index 75830d4fb758e30eda9675d49be00069cc0d0c29..bda41938f7506356e7fe5687a70d9f040881c60f 100644 --- a/OneM2M_Testcases_AE_Release_3.ttcn +++ b/OneM2M_Testcases_AE_Release_3.ttcn @@ -1134,7 +1134,7 @@ module OneM2M_Testcases_AE_Release_3 { group Notify { /** - * @desc Check that the IUT sends a valid ESPrim object to the Target CSE + * @desc Check that the IUT sends a valid ESPrim object to the Target CSE when requested * */ testcase TC_AE_SEC_ESP_NTF_003() runs on Tester system CseSystem { @@ -1148,7 +1148,6 @@ module OneM2M_Testcases_AE_Release_3 { 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; @@ -1206,12 +1205,87 @@ module OneM2M_Testcases_AE_Release_3 { f_cf03Down(); }//end f_AE_SEC_ESP_NTF_003 - + + + } //end group Notify group Retrieve { + /** + * @desc Check that the IUT sends a valid request for e2eSecInfo attribute of the Receiver’s <remoteCSE> resource in for Target CSE to Receiver CSE + * + */ + testcase TC_AE_SEC_ESP_RET_001() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_AE_SEC_ESP_RET_001()); + v_cse1.done; + } + + function f_AE_SEC_ESP_RET_001() runs on CseSimu system CseSystem { + // Local variables + var MsgIn v_response; + 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_RET_001 + } //end group Retrieve } //end group ESCertKE diff --git a/OneM2M_Testcases_CSE_Release_3.ttcn b/OneM2M_Testcases_CSE_Release_3.ttcn index 017e9e49dca1fa63729c40226f8220db9e2ce5a7..950cac470291222a93df088591ea089ba37c6ad3 100644 --- a/OneM2M_Testcases_CSE_Release_3.ttcn +++ b/OneM2M_Testcases_CSE_Release_3.ttcn @@ -7580,7 +7580,7 @@ module OneM2M_Testcases_CSE_Release_3 { //Test behavior tc_ac.start; alt{ - [] mccPortIn.receive(mw_request(v_requestPrimitive)) -> value vc_request { + [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value vc_request { tc_ac.stop; if(ischosen(vc_request.primitive.requestPrimitive.primitiveContent.remoteCSE)) { if(ispresent(vc_request.primitive.requestPrimitive.primitiveContent.remoteCSE.e2eSecInfo)) { @@ -7596,7 +7596,7 @@ module OneM2M_Testcases_CSE_Release_3 { setverdict(fail, __SCOPE__ & ": Error: Unexpected retrieve request"); } } - [] mccPortIn.receive(mw_request(?)) -> value vc_request { + [] mcaPortIn.receive(mw_request(?)) -> value vc_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Unexpected request received"); f_send(e_mcc_in_port, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));