NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
identity-certificate.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24 #ifndef NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
25 #define NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
26 
27 #include "../common.hpp"
28 #include "certificate.hpp"
29 
30 namespace ndn {
31 
33 {
34 public:
35  class Error : public Certificate::Error
36  {
37  public:
38  explicit
39  Error(const std::string& what)
40  : Certificate::Error(what)
41  {
42  }
43  };
44 
49 
54  explicit
55  IdentityCertificate(const Data& data);
56 
61  explicit
62  IdentityCertificate(const Block& block);
63 
64  void
65  wireDecode(const Block& wire);
66 
67  void
68  setName(const Name& name);
69 
70  const Name&
72  {
73  return m_publicKeyName;
74  }
75 
76  static bool
77  isIdentityCertificate(const Certificate& certificate);
78 
84  static Name
85  certificateNameToPublicKeyName(const Name& certificateName);
86 
87 private:
88  static bool
89  isCorrectName(const Name& name);
90 
91  void
92  setPublicKeyName();
93 
94 protected:
96 };
97 
98 } // namespace ndn
99 
100 #endif // NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
Copyright (c) 2011-2015 Regents of the University of California.
static Name certificateNameToPublicKeyName(const Name &certificateName)
Get the public key name from the full certificate name.
Class representing a wire element of NDN-TLV packet format.
Definition: block.hpp:43
void wireDecode(const Block &wire)
IdentityCertificate()
The default constructor.
void setName(const Name &name)
static bool isIdentityCertificate(const Certificate &certificate)
Name abstraction to represent an absolute name.
Definition: name.hpp:46
const Name & getPublicKeyName() const
represents a Data packet
Definition: data.hpp:39