diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index f715a4cff6401af0b434a78f87fc162e14aaa75f..21ca94ddef99a2c0696ab7892ddec8ff09ec653e 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -5284,10 +5284,14 @@ module OneM2M_Functions {
   			log(">>> f_getLocalPoA: ", p_portDesc);
   
 			if (ischosen(p_portDesc.binding.httpBindingDesc)) {
-				v_poa := "http://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
+	      if (ispresent(p_portDesc.binding.httpBindingDesc.bindingDesc.useTls) and (p_portDesc.binding.httpBindingDesc.bindingDesc.useTls == true)) {
+	      	v_poa := "https://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
+	      } else {
+					v_poa := "http://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
+				}
 				if (ispresent(p_portDesc.binding.httpBindingDesc.bindingDesc.localPort)) {
 			    	v_poa := v_poa & ":" & int2str(p_portDesc.binding.httpBindingDesc.bindingDesc.localPort);
-			    }
+			  }
 			} else if (ischosen(p_portDesc.binding.coapBindingDesc)) {
 			    v_poa := "coap://" & p_portDesc.binding.coapBindingDesc.bindingDesc.tsAddress;
 			    if (ispresent(p_portDesc.binding.coapBindingDesc.bindingDesc.localPort)) {
@@ -5306,7 +5310,8 @@ module OneM2M_Functions {
 			}
 			v_poa := v_poa & "/" & p_additionalContext;
       
-            return v_poa;
+      return v_poa;
+
 		}
 		
 		/**
diff --git a/OneM2M_Testcases_CSE_Release_4.ttcn b/OneM2M_Testcases_CSE_Release_4.ttcn
index a0160f7e38fbd7d3518f4cf4986113c7125125f4..4853342f014dd6b1e1084bd104f05cc039285a02 100644
--- a/OneM2M_Testcases_CSE_Release_4.ttcn
+++ b/OneM2M_Testcases_CSE_Release_4.ttcn
@@ -754,7 +754,7 @@ module OneM2M_Testcases_CSE_Release_4 {
 								
 								f_cse_createAccessControlPolicyAux();
 								
-								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getCompletePoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
+								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
 								
 								v_parentIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
 								
@@ -835,7 +835,7 @@ module OneM2M_Testcases_CSE_Release_4 {
 								
 								f_cse_createAccessControlPolicyAux();
 								
-								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getCompletePoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
+								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
 								
 								v_parentIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
 								
@@ -914,7 +914,7 @@ module OneM2M_Testcases_CSE_Release_4 {
 								
 								f_cse_createAccessControlPolicyAux();
 								
-								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getCompletePoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
+								v_aeIndex := f_cse_createResource_withAcpAux(int2, m_createAe(vc_aeSimuDesc.appId, -, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")}), -1); // AE1 is registred
 								
 								v_parentIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);