security: use EVP_DigestSign* routines in SignerFilter

Change-Id: Ib87c4681084bf0389de527450a2248fe2161e6ee
diff --git a/src/security/transform/public-key.cpp b/src/security/transform/public-key.cpp
index 13b8f00..16dd3d1 100644
--- a/src/security/transform/public-key.cpp
+++ b/src/security/transform/public-key.cpp
@@ -71,7 +71,8 @@
 KeyType
 PublicKey::getKeyType() const
 {
-  ENSURE_PUBLIC_KEY_LOADED(m_impl->key);
+  if (!m_impl->key)
+    return KeyType::NONE;
 
   switch (detail::getEvpPkeyType(m_impl->key)) {
   case EVP_PKEY_RSA: