certificate-subject-description.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
23 #ifndef NDN_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
24 #define NDN_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
25 
26 #include "../../common.hpp"
27 #include "../../encoding/oid.hpp"
28 
29 namespace ndn {
30 
31 class DerNode;
32 
37 public:
43  CertificateSubjectDescription(std::string oid, std::string value)
44  : oid_(oid), value_(value)
45  {
46  }
47 
53  CertificateSubjectDescription(OID oid, std::string value)
54  : oid_(oid), value_(value)
55  {
56  }
57 
62  ptr_lib::shared_ptr<DerNode>
63  toDer() const;
64 
65  std::string
66  getOidString() const
67  {
68  return oid_.toString();
69  }
70 
71  const std::string &
72  getValue() const
73  {
74  return value_;
75  }
76 
77 private:
78  OID oid_;
79  std::string value_;
80 };
81 
82 }
83 
84 #endif
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
A CertificateSubjectDescription represents the SubjectDescription entry in a Certificate.
Definition: certificate-subject-description.hpp:36
CertificateSubjectDescription(OID oid, std::string value)
Create a new CertificateSubjectDescription.
Definition: certificate-subject-description.hpp:53
Definition: oid.hpp:31
ptr_lib::shared_ptr< DerNode > toDer() const
Encode the object into a DER syntax tree.
Definition: certificate-subject-description.cpp:31
CertificateSubjectDescription(std::string oid, std::string value)
Create a new CertificateSubjectDescription.
Definition: certificate-subject-description.hpp:43