NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
certificate-extension.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
27
#define NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
28
29
#include "../common.hpp"
30
#include "../encoding/buffer.hpp"
31
#include "../encoding/oid.hpp"
32
33
namespace
CryptoPP
{
34
class
BufferedTransformation;
35
}
36
37
namespace
ndn
{
38
42
class
CertificateExtension
43
{
44
public
:
45
class
Error
:
public
std::runtime_error
46
{
47
public
:
48
explicit
49
Error
(
const
std::string& what)
50
:
std
::runtime_error(what)
51
{
52
}
53
};
54
55
explicit
56
CertificateExtension
(CryptoPP::BufferedTransformation& in)
57
{
58
decode(in);
59
}
60
67
CertificateExtension
(
const
OID
& oid,
const
bool
isCritical,
const
Buffer
& value)
68
: m_extensionId(oid), m_isCritical(isCritical), m_extensionValue(value)
69
{
70
}
71
72
CertificateExtension
(
const
OID
& oid,
const
bool
isCritical,
73
const
uint8_t* value,
size_t
valueSize)
74
: m_extensionId(oid), m_isCritical(isCritical), m_extensionValue(value, valueSize)
75
{
76
}
77
81
virtual
82
~CertificateExtension
()
83
{
84
}
85
86
void
87
encode(CryptoPP::BufferedTransformation& out)
const
;
88
89
void
90
decode(CryptoPP::BufferedTransformation& in);
91
92
inline
const
OID
&
93
getOid
()
const
94
{
95
return
m_extensionId;
96
}
97
98
inline
bool
99
getIsCritical
()
const
100
{
101
return
m_isCritical;
102
}
103
104
inline
const
Buffer
&
105
getValue
()
const
106
{
107
return
m_extensionValue;
108
}
109
110
protected
:
111
OID
m_extensionId
;
112
bool
m_isCritical
;
113
Buffer
m_extensionValue
;
114
};
115
116
}
// namespace ndn
117
118
#endif //NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
CryptoPP
Copyright (c) 2013-2014 Regents of the University of California.
Definition:
oid.hpp:29
ndn::CertificateExtension::getIsCritical
bool getIsCritical() const
Definition:
certificate-extension.hpp:99
std
STL namespace.
ndn::CertificateExtension::m_extensionValue
Buffer m_extensionValue
Definition:
certificate-extension.hpp:113
ndn::CertificateExtension::CertificateExtension
CertificateExtension(CryptoPP::BufferedTransformation &in)
Definition:
certificate-extension.hpp:56
ndn::CertificateExtension::CertificateExtension
CertificateExtension(const OID &oid, const bool isCritical, const Buffer &value)
Create a new CertificateExtension.
Definition:
certificate-extension.hpp:67
ndn::CertificateExtension::CertificateExtension
CertificateExtension(const OID &oid, const bool isCritical, const uint8_t *value, size_t valueSize)
Definition:
certificate-extension.hpp:72
ndn::CertificateExtension::getValue
const Buffer & getValue() const
Definition:
certificate-extension.hpp:105
ndn::CertificateExtension::Error::Error
Error(const std::string &what)
Definition:
certificate-extension.hpp:49
ndn::CertificateExtension::m_isCritical
bool m_isCritical
Definition:
certificate-extension.hpp:112
ndn::OID
Definition:
oid.hpp:35
ndn::CertificateExtension::m_extensionId
OID m_extensionId
Definition:
certificate-extension.hpp:111
ndn::CertificateExtension::~CertificateExtension
virtual ~CertificateExtension()
The virtual destructor.
Definition:
certificate-extension.hpp:82
ndn::CertificateExtension
A CertificateExtension represents the Extension entry in a certificate.
Definition:
certificate-extension.hpp:42
ndn::CertificateExtension::Error
Definition:
certificate-extension.hpp:45
ndn::Buffer
Class representing a general-use automatically managed/resized buffer.
Definition:
buffer.hpp:44
ndn::CertificateExtension::getOid
const OID & getOid() const
Definition:
certificate-extension.hpp:93
ndnSIM
ndn-cxx
src
security
certificate-extension.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11