Skip to content
Snippets Groups Projects
Commit 46e7a737 authored by aahmad's avatar aahmad
Browse files

Added contentSecurityInfo response message to template. Implemented TP...

Added contentSecurityInfo response message to template. Implemented TP CSE/ESC/BV/001 of TS0028 with one initial missing (provision of key and certificate)
parent b6cfa521
No related branches found
No related tags found
No related merge requests found
......@@ -1354,6 +1354,19 @@ module OneM2M_Templates {
escertkeMessage := omit
}
/**
* @desc SecurityInfo content
* @param p_securityInfoType security type integer
*/
template SecurityInfo mw_contentSecurityInfo (in SecurityInfoType p_securityInfoType, in XSD.Base64Binary p_escertkeMessage) := {
securityInfoType := p_securityInfoType,
dasRequest := ?,
dasResponse := ?,
esprimRandObject := ?,
esprimObject := ?,
escertkeMessage := p_escertkeMessage
}
/**
* @desc Base primitiveContent for CREATE operation for AEAnnc resource
......
......@@ -81,10 +81,9 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
group ESCertKE {
testcase TC_CSE_ESC_BV_001() runs on AeSimu system CseSystem {
testcase TC_CSE_ESC_BV_001() runs on CseSimu system CseSystem {
var MsgIn v_response;
var integer v_aeIndex := -1;
var template RequestPrimitive v_requestNotify := m_notifyEmpty;
var template RequestPrimitive v_requestNotify := m_notify;
//Test component configuration
f_cf02Up();
......@@ -92,15 +91,38 @@ module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
//TODO => " and the IUT has been provisioned with private key and certificate"
//TestBody
v_requestNotify.to_ := f_getResourceAddress(vc_remoteCseIndex);
v_requestNotify.from_ := PX_CSE1_ID;
v_requestNotify.primitiveContent := {securityInfo := m_contentSecurityInfo(int6)};
v_requestNotify.primitiveContent.securityInfo.escertkeMessage := "Q2xpZW50IEhlbGxv"; //'Q2xpZW50IEhlbGxv'O => "Client Hello" Bqse64 representation Was ''O
v_requestNotify.primitiveContent.securityInfo.escertkeMessage := str2oct("VExTIE1lc3NhZ2U6IENsaWVudCBIZWxsbw==");
mccPort.send(m_request(v_requestNotify));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, mw_contentSecurityInfo(int6, str2oct("VExTIE1lc3NhZ2VzOiBTZXJ2ZXIgSGVsbG8sIENlcnRpZmljYXRlKiwgU2VydmVyS2V5RXhjaGFuZ2UqLCBDZXJ0aWZpY2F0ZVJlcXVlc3QqLCBTZXJ2ZXJIZWxsb0RvbmU=")))))-> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Message 2 received successfully");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong Message received (Should be Message 2)");
}
[] mccPort.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_cf02Down();
}
} // end of group ESCertKE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment