diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 22d77a7..0c1bc62 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -640,8 +640,9 @@
  */
 static void getCertificateProperties(
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-    const std::string& objectPath, const std::string& service, long certId,
-    const std::string& certURL, const std::string& name)
+    const std::string& objectPath, const std::string& service,
+    const std::string& certId, const std::string& certURL,
+    const std::string& name)
 {
     BMCWEB_LOG_DEBUG << "getCertificateProperties Path=" << objectPath
                      << " certId=" << certId << " certURl=" << certURL;
@@ -652,14 +653,13 @@
         if (ec)
         {
             BMCWEB_LOG_ERROR << "DBUS response error: " << ec;
-            messages::resourceNotFound(asyncResp->res, name,
-                                       std::to_string(certId));
+            messages::resourceNotFound(asyncResp->res, name, certId);
             return;
         }
         asyncResp->res.jsonValue["@odata.id"] = certURL;
         asyncResp->res.jsonValue["@odata.type"] =
             "#Certificate.v1_0_0.Certificate";
-        asyncResp->res.jsonValue["Id"] = std::to_string(certId);
+        asyncResp->res.jsonValue["Id"] = certId;
         asyncResp->res.jsonValue["Name"] = name;
         asyncResp->res.jsonValue["Description"] = name;
         for (const auto& property : properties)
@@ -845,8 +845,8 @@
                 messages::internalError(asyncResp->res);
                 return;
             }
-            getCertificateProperties(asyncResp, objectPath, service, id,
-                                     certURI, name);
+            getCertificateProperties(asyncResp, objectPath, service,
+                                     std::to_string(id), certURI, name);
             BMCWEB_LOG_DEBUG << "HTTPS certificate install file="
                              << certFile->getCertFilePath();
             },
@@ -890,9 +890,9 @@
             std::string objectPath = certs::httpsObjectPath;
             objectPath += "/";
             objectPath += std::to_string(id);
-            getCertificateProperties(asyncResp, objectPath,
-                                     certs::httpsServiceName, id, certURL,
-                                     "HTTPS Certificate");
+            getCertificateProperties(
+                asyncResp, objectPath, certs::httpsServiceName,
+                std::to_string(id), certURL, "HTTPS Certificate");
         });
 }
 
@@ -971,9 +971,9 @@
             std::string certURL =
                 "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/" +
                 std::to_string(certId);
-            getCertificateProperties(asyncResp, objectPath,
-                                     certs::httpsServiceName, certId, certURL,
-                                     "HTTPS Certificate");
+            getCertificateProperties(
+                asyncResp, objectPath, certs::httpsServiceName,
+                std::to_string(certId), certURL, "HTTPS Certificate");
             BMCWEB_LOG_DEBUG << "HTTPS certificate install file="
                              << certFile->getCertFilePath();
             },
@@ -1082,9 +1082,9 @@
             std::string certURL =
                 "/redfish/v1/AccountService/LDAP/Certificates/" +
                 std::to_string(certId);
-            getCertificateProperties(asyncResp, objectPath,
-                                     certs::ldapServiceName, certId, certURL,
-                                     "LDAP Certificate");
+            getCertificateProperties(
+                asyncResp, objectPath, certs::ldapServiceName,
+                std::to_string(certId), certURL, "LDAP Certificate");
             BMCWEB_LOG_DEBUG << "LDAP certificate install file="
                              << certFile->getCertFilePath();
             },
@@ -1123,7 +1123,8 @@
         objectPath += "/";
         objectPath += std::to_string(id);
         getCertificateProperties(asyncResp, objectPath, certs::ldapServiceName,
-                                 id, certURL, "LDAP Certificate");
+                                 std::to_string(id), certURL,
+                                 "LDAP Certificate");
         });
 } // requestRoutesLDAPCertificate
 /**
@@ -1194,9 +1195,9 @@
                 "/redfish/v1/Managers/bmc/Truststore/Certificates/" +
                 std::to_string(certId);
 
-            getCertificateProperties(asyncResp, objectPath,
-                                     certs::authorityServiceName, certId,
-                                     certURL, "TrustStore Certificate");
+            getCertificateProperties(
+                asyncResp, objectPath, certs::authorityServiceName,
+                std::to_string(certId), certURL, "TrustStore Certificate");
             BMCWEB_LOG_DEBUG << "TrustStore certificate install file="
                              << certFile->getCertFilePath();
             },
@@ -1236,9 +1237,9 @@
         std::string objectPath = certs::authorityObjectPath;
         objectPath += "/";
         objectPath += std::to_string(id);
-        getCertificateProperties(asyncResp, objectPath,
-                                 certs::authorityServiceName, id, certURL,
-                                 "TrustStore Certificate");
+        getCertificateProperties(
+            asyncResp, objectPath, certs::authorityServiceName,
+            std::to_string(id), certURL, "TrustStore Certificate");
         });
 
     BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/Truststore/Certificates/<str>/")
