diff --git a/ndn-traffic-server.conf.sample b/ndn-traffic-server.conf.sample
index dbd8370..8a67525 100644
--- a/ndn-traffic-server.conf.sample
+++ b/ndn-traffic-server.conf.sample
@@ -25,7 +25,7 @@
 #ContentBytes=NNI [>0]
 #Content=String
 #ContentDelay=NNI [Milliseconds]
-#SignWithSha256=Bool [0:default, 1:Sha256]
+#SigningInfo=String [Ex: signing with a default certificate of a default key for the identity: `id:/my-identity`]
 #
 #
 ##########
diff --git a/src/ndn-traffic-server.cpp b/src/ndn-traffic-server.cpp
index e9ba339..e7a0cb6 100644
--- a/src/ndn-traffic-server.cpp
+++ b/src/ndn-traffic-server.cpp
@@ -32,7 +32,7 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/signing-helpers.hpp>
+#include <ndn-cxx/security/signing-info.hpp>
 #include <ndn-cxx/util/backports.hpp>
 
 #include "logger.hpp"
@@ -66,33 +66,31 @@
       , m_contentBytes(-1)
       , m_contentDelay(time::milliseconds(-1))
       , m_nInterestsReceived(0)
-      , m_signWithSha256(false)
+      , m_signingInfo()
     {
     }
 
     void
     printTrafficConfiguration(Logger& logger)
     {
-      std::string detail;
+      std::stringstream detail;
 
       if (!m_name.empty())
-        detail += "Name=" + m_name + ", ";
+        detail << "Name=" << m_name << ", ";
       if (m_contentType >= 0)
-        detail += "ContentType=" + to_string(m_contentType) + ", ";
+        detail << "ContentType=" << to_string(m_contentType) << ", ";
       if (m_freshnessPeriod >= time::milliseconds(0))
-        detail += "FreshnessPeriod=" +
-                  to_string(static_cast<int>(m_freshnessPeriod.count())) + ", ";
+        detail << "FreshnessPeriod=" <<
+                  to_string(static_cast<int>(m_freshnessPeriod.count())) << ", ";
       if (m_contentBytes >= 0)
-        detail += "ContentBytes=" + to_string(m_contentBytes) + ", ";
+        detail << "ContentBytes=" << to_string(m_contentBytes) << ", ";
       if (m_contentDelay >= time::milliseconds(0))
-        detail += "ContentDelay=" + to_string(m_contentDelay.count()) + ", ";
+        detail << "ContentDelay=" << to_string(m_contentDelay.count()) << ", ";
       if (!m_content.empty())
-        detail += "Content=" + m_content + ", ";
-      detail += "SignWithSha256=" + to_string(m_signWithSha256) + ", ";
-      if (detail.length() >= 2)
-        detail = detail.substr(0, detail.length() - 2);
+        detail << "Content=" << m_content << ", ";
+      detail << "SigningInfo=" << m_signingInfo;
 
-      logger.log(detail, false, false);
+      logger.log(detail.str(), false, false);
     }
 
     bool
@@ -149,17 +147,8 @@
         else if (parameter == "Content") {
           m_content = value;
         }
-        else if (parameter == "SignWithSha256") {
-          if (value == "0") {
-            m_signWithSha256 = false;
-          }
-          else if (value == "1") {
-            m_signWithSha256 = true;
-          }
-          else {
-            logger.log("Line " + to_string(lineNumber) +
-                       " \t- Invalid SignWithSha256 Value='" + value + "'", false, true);
-          }
+        else if (parameter == "SigningInfo") {
+          m_signingInfo = security::SigningInfo(value);
         }
         else {
           logger.log("Line " + to_string(lineNumber) +
@@ -189,7 +178,7 @@
     time::milliseconds m_contentDelay;
     std::string m_content;
     int m_nInterestsReceived;
-    bool m_signWithSha256;
+    security::SigningInfo m_signingInfo;
 
     friend class NdnTrafficServer;
   };
@@ -410,13 +399,7 @@
           content = pattern.m_content;
 
         data.setContent(reinterpret_cast<const uint8_t*>(content.c_str()), content.length());
-
-        if (pattern.m_signWithSha256) {
-          m_keyChain.sign(data, security::signingWithSha256());
-        }
-        else {
-          m_keyChain.sign(data);
-        }
+        m_keyChain.sign(data, pattern.m_signingInfo);
 
         m_nInterestsReceived++;
         pattern.m_nInterestsReceived++;
