diff --git a/src/security/certificate.cpp b/src/security/certificate.cpp
index bc96b69..e25a92e 100644
--- a/src/security/certificate.cpp
+++ b/src/security/certificate.cpp
@@ -31,6 +31,7 @@
 #include "../encoding/cryptopp/asn_ext.hpp"
 #include "../encoding/buffer-stream.hpp"
 #include "../util/concepts.hpp"
+#include "../util/indented-stream.hpp"
 
 #include <boost/algorithm/string/split.hpp>
 
@@ -264,65 +265,10 @@
   }
 }
 
-/**
- * @brief Output to stream with specified indent
- *
- * Based on http://stackoverflow.com/a/2212940/2150331
- */
-class IndentedStream : public std::ostream
-{
-public:
-  IndentedStream(std::ostream& os, const std::string& indent = "")
-    : std::ostream(&m_buffer)
-    , m_buffer(os, indent)
-  {
-  }
-
-  ~IndentedStream()
-  {
-    flush();
-  }
-
-private:
-  // Write a stream buffer that prefixes each line with Plop
-  class StreamBuf : public std::stringbuf
-  {
-  public:
-    StreamBuf(std::ostream& os, const std::string& indent)
-      : m_output(os)
-      , m_indent(indent)
-    {
-    }
-
-    virtual int
-    sync()
-    {
-      typedef boost::iterator_range<std::string::const_iterator> StringView;
-
-      const std::string& output = str();
-      std::vector<StringView> splitOutput;
-      boost::split(splitOutput, output, [] (const char& ch) { return ch == '\n'; });
-
-      if (!splitOutput.empty() && splitOutput.back().empty()) {
-        splitOutput.pop_back();
-      }
-      for (const StringView& line : splitOutput) {
-        m_output << m_indent << line << "\n";
-      }
-      return 0; // success
-    }
-  private:
-    std::ostream& m_output;
-    std::string m_indent;
-  };
-
-  StreamBuf m_buffer;
-};
-
 void
 Certificate::printCertificate(std::ostream& oss, const std::string& indent) const
 {
-  IndentedStream os(oss, indent);
+  util::IndentedStream os(oss, indent);
 
   os << "Certificate name:\n";
   os << "  " << getName() << "\n";
@@ -351,7 +297,7 @@
   os << "\n";
 
   {
-    IndentedStream os2(os, "  ");
+    util::IndentedStream os2(os, "  ");
     CryptoPP::Base64Encoder encoder(new CryptoPP::FileSink(os2), true, 64);
     m_key.encode(encoder);
   }
diff --git a/src/util/indented-stream.cpp b/src/util/indented-stream.cpp
new file mode 100644
index 0000000..04c04cd
--- /dev/null
+++ b/src/util/indented-stream.cpp
@@ -0,0 +1,68 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "indented-stream.hpp"
+
+#include <vector>
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/algorithm/string/split.hpp>
+
+namespace ndn {
+namespace util {
+
+IndentedStream::IndentedStream(std::ostream& os, const std::string& indent)
+  : std::ostream(&m_buffer)
+  , m_buffer(os, indent)
+{
+}
+
+IndentedStream::~IndentedStream()
+{
+  flush();
+}
+
+IndentedStream::StreamBuf::StreamBuf(std::ostream& os, const std::string& indent)
+  : m_output(os)
+  , m_indent(indent)
+{
+}
+
+int
+IndentedStream::StreamBuf::sync()
+{
+  typedef boost::iterator_range<std::string::const_iterator> StringView;
+
+  const std::string& output = str();
+  std::vector<StringView> splitOutput;
+  boost::split(splitOutput, output, [] (char ch) { return ch == '\n'; });
+
+  if (!splitOutput.empty() && splitOutput.back().empty()) {
+    splitOutput.pop_back();
+  }
+  for (const StringView& line : splitOutput) {
+    m_output << m_indent << line << "\n";
+  }
+  return 0; // success
+}
+
+} // namespace util
+} // namespace ndn
diff --git a/src/util/indented-stream.hpp b/src/util/indented-stream.hpp
new file mode 100644
index 0000000..0ab76a2
--- /dev/null
+++ b/src/util/indented-stream.hpp
@@ -0,0 +1,82 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_UTIL_INDENTED_STREAM_HPP
+#define NDN_UTIL_INDENTED_STREAM_HPP
+
+#include <ostream>
+#include <sstream>
+#include <string>
+
+namespace ndn {
+namespace util {
+
+/**
+ * @brief Output to stream with specified indent or prefix
+ *
+ * For example, the following code:
+ *
+ *     std::cout << "Hello" << std::endl;
+ *     IndentedStream os1(std::cout, " [prefix] ");
+ *     os1 << "," << "\n";
+ *     {
+ *       IndentedStream os2(os1, " [another prefix] ");
+ *       os2 << "World!" << "\n";
+ *     }
+ *     // either os1 needs to go out of scope or call os1.flush()
+ *
+ * Will produce the following output:
+ *
+ *     Hello
+ *      [prefix] ,
+ *      [prefix] [another prefix] World!
+ *
+ * Based on http://stackoverflow.com/a/2212940/2150331
+ */
+class IndentedStream : public std::ostream
+{
+public:
+  IndentedStream(std::ostream& os, const std::string& indent);
+
+  ~IndentedStream();
+
+private:
+  // Write a stream buffer that prefixes each line
+  class StreamBuf : public std::stringbuf
+  {
+  public:
+    StreamBuf(std::ostream& os, const std::string& indent);
+
+    virtual int
+    sync();
+
+  private:
+    std::ostream& m_output;
+    std::string m_indent;
+  };
+
+  StreamBuf m_buffer;
+};
+
+} // namespace util
+} // namespace ndn
+
+#endif // NDN_UTIL_INDENTED_STREAM_HPP
