Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 1 | /* -*- 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 | |
Jeff Thompson | 84cfe1d | 2013-10-15 17:59:01 -0700 | [diff] [blame] | 9 | #if 1 // TODO: Remove this when we don't throw "not implemented". |
| 10 | #include <stdexcept> |
| 11 | #endif |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 12 | #include "../../encoding/der/der.hpp" |
| 13 | #include <ndn-cpp/security/certificate/certificate-subject-description.hpp> |
| 14 | |
| 15 | using namespace std; |
| 16 | using namespace ndn::ptr_lib; |
| 17 | |
| 18 | namespace ndn { |
| 19 | |
| 20 | shared_ptr<der::DerNode> |
| 21 | CertificateSubjectDescription::toDer() |
| 22 | { |
Jeff Thompson | 84cfe1d | 2013-10-15 17:59:01 -0700 | [diff] [blame] | 23 | #if 0 // Include again when der is defined. |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 24 | shared_ptr<der::DerSequence> root(new der::DerSequence()); |
| 25 | |
| 26 | shared_ptr<der::DerOid> oid(new der::DerOid(oid_)); |
| 27 | shared_ptr<der::DerPrintableString> value(new der::DerPrintableString(value_)); |
| 28 | |
| 29 | root->addChild(oid); |
| 30 | root->addChild(value); |
| 31 | |
| 32 | return root; |
Jeff Thompson | 84cfe1d | 2013-10-15 17:59:01 -0700 | [diff] [blame] | 33 | #else |
| 34 | throw std::runtime_error("not implemented"); |
| 35 | #endif |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | } |