NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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_V1_CERTIFICATE_EXTENSION_HPP
27
#define NDN_SECURITY_V1_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
}
// namespace CryptoPP
36
37
namespace
ndn
{
38
namespace
security
{
39
namespace
v1 {
40
44
class
CertificateExtension
45
{
46
public
:
47
class
Error
:
public
std::runtime_error
48
{
49
public
:
50
explicit
51
Error
(
const
std::string& what)
52
:
std
::runtime_error(what)
53
{
54
}
55
};
56
57
explicit
58
CertificateExtension
(CryptoPP::BufferedTransformation& in)
59
{
60
decode(in);
61
}
62
69
CertificateExtension
(
const
Oid
& oid,
const
bool
isCritical,
const
Buffer
& value)
70
: m_extensionId(oid), m_isCritical(isCritical), m_extensionValue(value)
71
{
72
}
73
74
CertificateExtension
(
const
Oid
& oid,
const
bool
isCritical,
75
const
uint8_t* value,
size_t
valueSize)
76
: m_extensionId(oid), m_isCritical(isCritical), m_extensionValue(value, valueSize)
77
{
78
}
79
83
virtual
84
~CertificateExtension
()
85
{
86
}
87
88
void
89
encode(CryptoPP::BufferedTransformation& out)
const
;
90
91
void
92
decode(CryptoPP::BufferedTransformation& in);
93
94
inline
const
Oid
&
95
getOid
()
const
96
{
97
return
m_extensionId;
98
}
99
100
inline
bool
101
getIsCritical
()
const
102
{
103
return
m_isCritical;
104
}
105
106
inline
const
Buffer
&
107
getValue
()
const
108
{
109
return
m_extensionValue;
110
}
111
112
protected
:
113
Oid
m_extensionId
;
114
bool
m_isCritical
;
115
Buffer
m_extensionValue
;
116
};
117
118
}
// namespace v1
119
}
// namespace security
120
121
#ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES
122
using
security::v1::CertificateExtension
;
124
#endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES
125
126
}
// namespace ndn
127
128
#endif // NDN_SECURITY_V1_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-2016 Regents of the University of California.
Definition:
oid.hpp:29
ndn::security::v1::CertificateExtension::m_extensionId
Oid m_extensionId
Definition:
certificate-extension.hpp:113
ndn::security::v1::CertificateExtension::Error
Definition:
certificate-extension.hpp:47
std
STL namespace.
ndn::security::v1::CertificateExtension::m_extensionValue
Buffer m_extensionValue
Definition:
certificate-extension.hpp:115
ndn::security::v1::CertificateExtension::getOid
const Oid & getOid() const
Definition:
certificate-extension.hpp:95
ndn::security::v1::CertificateExtension::CertificateExtension
CertificateExtension(const Oid &oid, const bool isCritical, const Buffer &value)
Create a new CertificateExtension.
Definition:
certificate-extension.hpp:69
ndn::security::v1::CertificateExtension::m_isCritical
bool m_isCritical
Definition:
certificate-extension.hpp:114
ndn::security::v1::CertificateExtension::CertificateExtension
CertificateExtension(const Oid &oid, const bool isCritical, const uint8_t *value, size_t valueSize)
Definition:
certificate-extension.hpp:74
ndn::Oid
Definition:
oid.hpp:35
ndn::security::v1::CertificateExtension::getValue
const Buffer & getValue() const
Definition:
certificate-extension.hpp:107
ndn::security::v1::CertificateExtension::Error::Error
Error(const std::string &what)
Definition:
certificate-extension.hpp:51
ndn::security::v1::CertificateExtension::CertificateExtension
CertificateExtension(CryptoPP::BufferedTransformation &in)
Definition:
certificate-extension.hpp:58
ndn::security::v1::CertificateExtension::getIsCritical
bool getIsCritical() const
Definition:
certificate-extension.hpp:101
ndn::security::v1::CertificateExtension
A CertificateExtension represents the Extension entry in a certificate.
Definition:
certificate-extension.hpp:44
ndn::security::v1::CertificateExtension::~CertificateExtension
virtual ~CertificateExtension()
The virtual destructor.
Definition:
certificate-extension.hpp:84
ndn::Buffer
Class representing a general-use automatically managed/resized buffer.
Definition:
buffer.hpp:44
security
ndnSIM
ndn-cxx
src
security
v1
certificate-extension.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13