security: Allow Identity and Key abstractions to be used in SigningInfo

Change-Id: Ic1c8d6925557ea5da2011ab68f16587eef2102f3
Refs: #3153
diff --git a/src/security/v2/key-chain.cpp b/src/security/v2/key-chain.cpp
index 0f3909e..d0fd486 100644
--- a/src/security/v2/key-chain.cpp
+++ b/src/security/v2/key-chain.cpp
@@ -643,6 +643,18 @@
       sigInfo.setSignatureType(tlv::DigestSha256);
       return std::make_tuple(SigningInfo::getDigestSha256Identity(), sigInfo);
     }
+    case SigningInfo::SIGNER_TYPE_PIB_ID: {
+      identity = params.getPibIdentity();
+      if (!identity)
+        BOOST_THROW_EXCEPTION(InvalidSigningInfoError("PIB Identity is invalid"));
+      break;
+    }
+    case SigningInfo::SIGNER_TYPE_PIB_KEY: {
+      key = params.getPibKey();
+      if (!key)
+        BOOST_THROW_EXCEPTION(InvalidSigningInfoError("PIB Key is invalid"));
+      break;
+    }
     default: {
       BOOST_THROW_EXCEPTION(InvalidSigningInfoError("Unrecognized signer type " +
                                                     boost::lexical_cast<std::string>(params.getSignerType())));