security: Added headers for der encoding.  Added CertificateExtension and CertificateSubjectDescription.
diff --git a/ndn-cpp/security/certificate/certificate-extension.cpp b/ndn-cpp/security/certificate/certificate-extension.cpp
new file mode 100644
index 0000000..9f6c39a
--- /dev/null
+++ b/ndn-cpp/security/certificate/certificate-extension.cpp
@@ -0,0 +1,50 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "../../encoding/der/der.hpp"
+#include <ndn-cpp/security/certificate/certificate-extension.hpp>
+
+using namespace std;
+using namespace ndn::ptr_lib;
+
+namespace ndn {
+
+shared_ptr<der::DerNode> 
+CertificateExtension::toDer()
+{
+  shared_ptr<der::DerSequence> root(new der::DerSequence);
+    
+  shared_ptr<der::DerOid> extensionId(new der::DerOid(extensionId_));
+  shared_ptr<der::DerBool> isCritical(new der::DerBool(isCritical_));
+  shared_ptr<der::DerOctetString> extensionValue(new der::DerOctetString(*extensionValue_));
+
+  root->addChild(extensionId);
+  root->addChild(isCritical);
+  root->addChild(extensionValue);
+
+  root->getSize();
+
+  return root;
+}
+
+Blob
+CertificateExtension::toDerBlob()
+{
+#if 0 // Need to convert blob_stream.
+  blob_stream blobStream;
+  ostream& start = reinterpret_cast<ostream&>(blobStream);
+
+  toDer()->encode(start);
+
+  return blobStream.buf();
+#else
+  throw std::runtime_error("not implemented");
+#endif
+}
+
+
+}
diff --git a/ndn-cpp/security/certificate/certificate-subject-description.cpp b/ndn-cpp/security/certificate/certificate-subject-description.cpp
new file mode 100644
index 0000000..ee2310c
--- /dev/null
+++ b/ndn-cpp/security/certificate/certificate-subject-description.cpp
@@ -0,0 +1,31 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "../../encoding/der/der.hpp"
+#include <ndn-cpp/security/certificate/certificate-subject-description.hpp>
+
+using namespace std;
+using namespace ndn::ptr_lib;
+
+namespace ndn {
+
+shared_ptr<der::DerNode> 
+CertificateSubjectDescription::toDer()
+{
+  shared_ptr<der::DerSequence> root(new der::DerSequence());
+
+  shared_ptr<der::DerOid> oid(new der::DerOid(oid_));
+  shared_ptr<der::DerPrintableString> value(new der::DerPrintableString(value_));
+
+  root->addChild(oid);
+  root->addChild(value);
+
+  return root;
+}
+
+}