security: change enum to enum class in security-common.hpp
Change-Id: I5565c845cd57f3457c8120b11399a105fa83418d
Refs: #3083
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index 9974336..1be311f 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -385,7 +385,7 @@
sqlite3_bind_string(statement, 1, identityName.toUri(), SQLITE_TRANSIENT);
sqlite3_bind_string(statement, 2, keyId, SQLITE_TRANSIENT);
- sqlite3_bind_int(statement, 3, publicKeyDer.getKeyType());
+ sqlite3_bind_int(statement, 3, static_cast<int>(publicKeyDer.getKeyType()));
sqlite3_bind_blob(statement, 4,
publicKeyDer.get().buf(),
publicKeyDer.get().size(),
@@ -432,7 +432,7 @@
SecPublicInfoSqlite3::getPublicKeyType(const Name& keyName)
{
if (keyName.empty())
- return KEY_TYPE_NULL;
+ return KeyType::NONE;
string keyId = keyName.get(-1).toUri();
Name identityName = keyName.getPrefix(-1);
@@ -454,7 +454,7 @@
}
else {
sqlite3_finalize(statement);
- return KEY_TYPE_NULL;
+ return KeyType::NONE;
}
}