diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index cddafc8..1b82697 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -150,7 +150,7 @@
             nlohmann::json::iterator paths = j.find("paths");
             if (paths != j.end())
             {
-                size_t interfaceCount = thisSession.interfaces.size();
+                int interfaceCount = thisSession.interfaces.size();
                 if (interfaceCount == 0)
                 {
                     interfaceCount = 1;
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index 947bc86..e45bb9a 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -48,8 +48,8 @@
                                  std::string& result)
 {
     int count = 0;
-    std::string::const_iterator first = path.begin();
-    std::string::const_iterator last = path.end();
+    auto first = path.begin();
+    auto last = path.end();
     for (auto it = path.begin(); it < path.end(); it++)
     {
         // skip first character as it's either a leading slash or the first
@@ -80,8 +80,7 @@
     {
         first++;
     }
-    result = path.substr(static_cast<size_t>(first - path.begin()),
-                         static_cast<size_t>(last - first));
+    result = path.substr(first - path.begin(), last - first);
     return true;
 }
 
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index e596920..ab35bb2 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -570,9 +570,8 @@
             {
                 return -1;
             }
-            r = sd_bus_message_append_basic(
-                m, argCode[0],
-                reinterpret_cast<const void *>(stringValue->c_str()));
+            r = sd_bus_message_append_basic(m, argCode[0],
+                                            (void *)stringValue->c_str());
             if (r < 0)
             {
                 return r;
@@ -738,13 +737,13 @@
             }
 
             nlohmann::json::const_iterator it = j->begin();
-            for (const std::string &argCode2 : dbusArgSplit(arg_type))
+            for (const std::string &argCode : dbusArgSplit(arg_type))
             {
                 if (it == j->end())
                 {
                     return -1;
                 }
-                r = convertJsonToDbus(m, argCode2, *it);
+                r = convertJsonToDbus(m, argCode, *it);
                 if (r < 0)
                 {
                     return r;
diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
index 1469aef..f211a29 100644
--- a/include/pam_authenticate.hpp
+++ b/include/pam_authenticate.hpp
@@ -25,7 +25,7 @@
     std::strcpy(pass, appPass);
 
     *resp = reinterpret_cast<pam_response*>(
-        calloc(static_cast<size_t>(numMsg), sizeof(struct pam_response)));
+        calloc(numMsg, sizeof(struct pam_response)));
 
     if (resp == nullptr)
     {
diff --git a/include/persistent_data_middleware.hpp b/include/persistent_data_middleware.hpp
index 4cd75e8..b384f02 100644
--- a/include/persistent_data_middleware.hpp
+++ b/include/persistent_data_middleware.hpp
@@ -24,7 +24,7 @@
 {
     // todo(ed) should read this from a fixed location somewhere, not CWD
     static constexpr const char* filename = "bmcweb_persistent_data.json";
-    uint64_t jsonRevision = 1;
+    int jsonRevision = 1;
 
   public:
     struct Context
@@ -58,7 +58,7 @@
     void readData()
     {
         std::ifstream persistentFile(filename);
-        uint64_t fileRevision = 0;
+        int fileRevision = 0;
         if (persistentFile.is_open())
         {
             // call with exceptions disabled
diff --git a/include/sessions.hpp b/include/sessions.hpp
index d55b199..6bc1c99 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -119,22 +119,22 @@
         // https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Session_ID_Entropy
         std::string sessionToken;
         sessionToken.resize(20, '0');
-        std::uniform_int_distribution<size_t> dist(0, alphanum.size() - 1);
-        for (size_t i = 0; i < sessionToken.size(); ++i)
+        std::uniform_int_distribution<int> dist(0, alphanum.size() - 1);
+        for (int i = 0; i < sessionToken.size(); ++i)
         {
             sessionToken[i] = alphanum[dist(rd)];
         }
         // Only need csrf tokens for cookie based auth, token doesn't matter
         std::string csrfToken;
         csrfToken.resize(20, '0');
-        for (size_t i = 0; i < csrfToken.size(); ++i)
+        for (int i = 0; i < csrfToken.size(); ++i)
         {
             csrfToken[i] = alphanum[dist(rd)];
         }
 
         std::string uniqueId;
         uniqueId.resize(10, '0');
-        for (size_t i = 0; i < uniqueId.size(); ++i)
+        for (int i = 0; i < uniqueId.size(); ++i)
         {
             uniqueId[i] = alphanum[dist(rd)];
         }
@@ -205,7 +205,7 @@
     {
         return needWrite;
     }
-    long getTimeoutInSeconds() const
+    int getTimeoutInSeconds() const
     {
         return std::chrono::seconds(timeoutInMinutes).count();
     };
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 133d40d..34a7c04 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -17,7 +17,9 @@
 namespace ensuressl
 {
 static void initOpenssl();
-static EVP_PKEY *createKey();
+static void cleanupOpenssl();
+static EVP_PKEY *createRsaKey();
+static EVP_PKEY *createEcKey();
 static void handleOpensslError();
 
 inline bool verifyOpensslKeyCert(const std::string &filepath)
@@ -108,7 +110,7 @@
     // EVP_PKEY *pRsaPrivKey = create_rsa_key();
 
     std::cerr << "Generating EC key\n";
-    EVP_PKEY *pRsaPrivKey = createKey();
+    EVP_PKEY *pRsaPrivKey = createEcKey();
     if (pRsaPrivKey != nullptr)
     {
         std::cerr << "Generating x509 Certificate\n";
@@ -175,16 +177,9 @@
 
     // cleanup_openssl();
 }
-EVP_PKEY *createKey()
+
+EVP_PKEY *createRsaKey()
 {
-    EVP_PKEY *pKey = NULL;
-    pKey = EVP_PKEY_new();
-    if (pKey == nullptr)
-    {
-        handleOpensslError();
-        return nullptr;
-    }
-#if BMCWEB_RSA_KEY
     RSA *pRSA = NULL;
 #if OPENSSL_VERSION_NUMBER < 0x00908000L
     pRSA = RSA_generate_key(2048, RSA_3, NULL, NULL);
@@ -192,54 +187,60 @@
     RSA_generate_key_ex(pRSA, 2048, NULL, NULL);
 #endif
 
-    if ((pRSA != nullptr) || EVP_PKEY_assign_RSA(pKey, pRSA) != 1)
+    EVP_PKEY *pKey = EVP_PKEY_new();
+    if ((pRSA != nullptr) && (pKey != nullptr) &&
+        EVP_PKEY_assign_RSA(pKey, pRSA))
+    {
+        /* pKey owns pRSA from now */
+        if (RSA_check_key(pRSA) <= 0)
+        {
+            fprintf(stderr, "RSA_check_key failed.\n");
+            handleOpensslError();
+            EVP_PKEY_free(pKey);
+            pKey = NULL;
+        }
+    }
+    else
     {
         handleOpensslError();
         if (pRSA != nullptr)
         {
             RSA_free(pRSA);
+            pRSA = NULL;
         }
         if (pKey != nullptr)
         {
             EVP_PKEY_free(pKey);
+            pKey = NULL;
         }
-        return nullptr;
     }
+    return pKey;
+}
 
-    /* pKey owns pRSA from now */
-    if (RSA_check_key(pRSA) != 1)
-    {
-        fprintf(stderr, "RSA_check_key failed.\n");
-        handleOpensslError();
-        EVP_PKEY_free(pKey);
-        return nullptr;
-    }
+EVP_PKEY *createEcKey()
+{
+    EVP_PKEY *pKey = NULL;
+    int eccgrp = 0;
+    eccgrp = OBJ_txt2nid("prime256v1");
 
-#else
-    int eccgrp = OBJ_txt2nid("prime256v1");
     EC_KEY *myecc = EC_KEY_new_by_curve_name(eccgrp);
-    if (myecc == nullptr)
+    if (myecc != nullptr)
     {
-        handleOpensslError();
-        return nullptr;
+        EC_KEY_set_asn1_flag(myecc, OPENSSL_EC_NAMED_CURVE);
+        EC_KEY_generate_key(myecc);
+        pKey = EVP_PKEY_new();
+        if (pKey != nullptr)
+        {
+            if (EVP_PKEY_assign_EC_KEY(pKey, myecc))
+            {
+                /* pKey owns pRSA from now */
+                if (EC_KEY_check_key(myecc) <= 0)
+                {
+                    fprintf(stderr, "EC_check_key failed.\n");
+                }
+            }
+        }
     }
-
-    EC_KEY_set_asn1_flag(myecc, OPENSSL_EC_NAMED_CURVE);
-    if (EC_KEY_generate_key(myecc) != 1)
-    {
-        handleOpensslError();
-        EC_KEY_free(myecc);
-        return nullptr;
-    }
-
-    if (EVP_PKEY_assign_EC_KEY(pKey, myecc) != 1)
-    {
-        handleOpensslError();
-        EC_KEY_free(myecc);
-        return nullptr;
-    }
-
-#endif
     return pKey;
 }
 
@@ -252,6 +253,16 @@
 #endif
 }
 
+void cleanupOpenssl()
+{
+    CRYPTO_cleanup_all_ex_data();
+    ERR_free_strings();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    ERR_remove_thread_state(0);
+#endif
+    EVP_cleanup();
+}
+
 void handleOpensslError()
 {
     ERR_print_errors_fp(stderr);
