src: Making use of DEPRECATED macro and updating library code not to use deprecated methods

Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc
diff --git a/src/security/identity-certificate.cpp b/src/security/identity-certificate.cpp
index 33e1e71..b3c544a 100644
--- a/src/security/identity-certificate.cpp
+++ b/src/security/identity-certificate.cpp
@@ -26,7 +26,7 @@
   string idString("ID-CERT");
   int i = name.size() - 1;
   for (; i >= 0; i--) {
-    if (name.get(i).toEscapedString() == idString)
+    if (name.get(i).toUri() == idString)
       break;
   }
 
@@ -36,7 +36,7 @@
   string keyString("KEY");
   size_t keyIndex = 0;
   for (; keyIndex < name.size(); keyIndex++) {
-    if (name.get(keyIndex).toEscapedString() == keyString)
+    if (name.get(keyIndex).toUri() == keyString)
       break;
   }
 
@@ -68,7 +68,7 @@
   bool foundIdString = false;
   size_t idCertComponentIndex = certificateName.size() - 1;
   for (; idCertComponentIndex + 1 > 0; --idCertComponentIndex) {
-    if (certificateName.get(idCertComponentIndex).toEscapedString() == idString)
+    if (certificateName.get(idCertComponentIndex).toUri() == idString)
       {
         foundIdString = true;
         break;
@@ -83,7 +83,7 @@
   bool foundKeyString = false;
   size_t keyComponentIndex = 0;
   for (; keyComponentIndex < tmpName.size(); keyComponentIndex++) {
-    if (tmpName.get(keyComponentIndex).toEscapedString() == keyString)
+    if (tmpName.get(keyComponentIndex).toUri() == keyString)
       {
         foundKeyString = true;
         break;