blob: ee2310c9daf649eeb6237732b48f0de9c3b393a6 [file] [log] [blame]
Jeff Thompson958bf9b2013-10-12 17:20:51 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
6 * See COPYING for copyright and distribution information.
7 */
8
9#include "../../encoding/der/der.hpp"
10#include <ndn-cpp/security/certificate/certificate-subject-description.hpp>
11
12using namespace std;
13using namespace ndn::ptr_lib;
14
15namespace ndn {
16
17shared_ptr<der::DerNode>
18CertificateSubjectDescription::toDer()
19{
20 shared_ptr<der::DerSequence> root(new der::DerSequence());
21
22 shared_ptr<der::DerOid> oid(new der::DerOid(oid_));
23 shared_ptr<der::DerPrintableString> value(new der::DerPrintableString(value_));
24
25 root->addChild(oid);
26 root->addChild(value);
27
28 return root;
Jeff Thompson958bf9b2013-10-12 17:20:51 -070029}
30
31}