diff --git a/tools/ndnsec/cert-gen.hpp b/tools/ndnsec/cert-gen.hpp
index 5c56039..0016333 100644
--- a/tools/ndnsec/cert-gen.hpp
+++ b/tools/ndnsec/cert-gen.hpp
@@ -213,7 +213,9 @@
 
   keyChain.createIdentity(signId);
   Name signingCertificateName = keyChain.getDefaultCertificateNameForIdentity(signId);
-  keyChain.sign(*certificate, signingCertificateName);
+  keyChain.sign(*certificate,
+                security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT,
+                                      signingCertificateName));
 
   Block wire = certificate->wireEncode();
 
diff --git a/tools/ndnsec/cert-revoke.hpp b/tools/ndnsec/cert-revoke.hpp
index d8512a5..c2b20c8 100644
--- a/tools/ndnsec/cert-revoke.hpp
+++ b/tools/ndnsec/cert-revoke.hpp
@@ -142,7 +142,9 @@
       if (keyChain.doesPublicKeyExist(keyName))
         {
           Name signingCertificateName = keyChain.getDefaultCertificateNameForKey(keyName);
-          keyChain.sign(revocationCert, signingCertificateName);
+          keyChain.sign(revocationCert,
+                        security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT,
+                                              signingCertificateName));
         }
       else
         {
diff --git a/tools/ndnsec/dsk-gen.hpp b/tools/ndnsec/dsk-gen.hpp
index 1258c8d..80a31ed 100644
--- a/tools/ndnsec/dsk-gen.hpp
+++ b/tools/ndnsec/dsk-gen.hpp
@@ -167,7 +167,8 @@
       return 1;
     }
 
-    keyChain.sign(*certificate, signingCertName);
+    keyChain.sign(*certificate,
+                  security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT, signingCertName));
 
     keyChain.addCertificateAsIdentityDefault(*certificate);
 
diff --git a/tools/ndnsec/op-tool.hpp b/tools/ndnsec/op-tool.hpp
index 65bb665..d72b014 100644
--- a/tools/ndnsec/op-tool.hpp
+++ b/tools/ndnsec/op-tool.hpp
@@ -78,17 +78,17 @@
 
       Buffer dataToSign((istreambuf_iterator<char>(cin)), istreambuf_iterator<char>());
 
-      Signature signature = keyChain.sign(dataToSign.buf(), dataToSign.size(),
-                                          keyChain.getDefaultCertificateName());
+      Block value = keyChain.sign(dataToSign.buf(), dataToSign.size(),
+                                  security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT,
+                                                        keyChain.getDefaultCertificateName()));
 
-      if (signature.getValue().value_size() == 0)
+      if (value.value_size() == 0)
         {
           std::cerr << "Error signing with default key" << std::endl;
           return -1;
         }
 
-      std::cout.write(reinterpret_cast<const char*>(signature.getValue().wire()),
-                      signature.getValue().size());
+      std::cout.write(reinterpret_cast<const char*>(value.wire()), value.size());
     }
 
   return 0;
