NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
certificate.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25
#ifndef NDN_SECURITY_V2_CERTIFICATE_HPP
26
#define NDN_SECURITY_V2_CERTIFICATE_HPP
27
28
#include "../../data.hpp"
29
30
namespace
ndn
{
31
namespace
security
{
32
namespace
v2 {
33
81
class
Certificate
:
public
Data
82
{
83
public
:
84
Certificate
();
85
90
explicit
91
Certificate
(
Data
&& data);
92
97
explicit
98
Certificate
(
const
Data
& data);
99
104
explicit
105
Certificate
(
const
Block
& block);
106
110
Name
111
getKeyName
()
const
;
112
116
Name
117
getIdentity
()
const
;
118
122
name::Component
123
getKeyId
()
const
;
124
128
name::Component
129
getIssuerId
()
const
;
130
135
Buffer
136
getPublicKey
()
const
;
137
141
ValidityPeriod
142
getValidityPeriod
()
const
;
143
147
bool
148
isValid
(
const
time::system_clock::TimePoint
& ts =
time::system_clock::now
())
const
;
149
154
const
Block
&
155
getExtension
(uint32_t type)
const
;
156
157
// @TODO Implement extension enumeration (Issue #3907)
158
public
:
162
static
bool
163
isValidName
(
const
Name
& certName);
164
165
public
:
166
static
const
ssize_t
VERSION_OFFSET
;
167
static
const
ssize_t
ISSUER_ID_OFFSET
;
168
static
const
ssize_t
KEY_COMPONENT_OFFSET
;
169
static
const
ssize_t
KEY_ID_OFFSET
;
170
static
const
size_t
MIN_CERT_NAME_LENGTH
;
171
static
const
size_t
MIN_KEY_NAME_LENGTH
;
172
static
const
name::Component
KEY_COMPONENT
;
173
};
174
175
std::ostream&
176
operator<<
(std::ostream& os,
const
Certificate
& cert);
177
181
Name
182
extractIdentityFromCertName
(
const
Name
& certName);
183
187
Name
188
extractKeyNameFromCertName
(
const
Name
& certName);
189
190
}
// namespace v2
191
}
// namespace security
192
}
// namespace ndn
193
194
#endif // NDN_SECURITY_V2_CERTIFICATE_HPP
ndn::security::v2::Certificate::isValid
bool isValid(const time::system_clock::TimePoint &ts=time::system_clock::now()) const
Check if the certificate is valid at ts.
Definition:
certificate.cpp:119
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::v2::Certificate::KEY_ID_OFFSET
static const ssize_t KEY_ID_OFFSET
Definition:
certificate.hpp:169
ndn::security::v2::Certificate
The certificate following the certificate format naming convention.
Definition:
certificate.hpp:81
ndn::security::v2::Certificate::getKeyName
Name getKeyName() const
Get key name.
Definition:
certificate.cpp:81
ndn::security::v2::Certificate::MIN_KEY_NAME_LENGTH
static const size_t MIN_KEY_NAME_LENGTH
Definition:
certificate.hpp:171
ndn::security::v2::extractKeyNameFromCertName
Name extractKeyNameFromCertName(const Name &certName)
Extract key name from the certificate name certName.
Definition:
certificate.cpp:196
ndn::security::v2::Certificate::getValidityPeriod
ValidityPeriod getValidityPeriod() const
Get validity period of the certificate.
Definition:
certificate.cpp:113
ndn::Block
Represents a TLV element of NDN packet format.
Definition:
block.hpp:42
ndn::time::system_clock::now
static time_point now() noexcept
Definition:
time.cpp:46
ndn::security::v2::Certificate::MIN_CERT_NAME_LENGTH
static const size_t MIN_CERT_NAME_LENGTH
Definition:
certificate.hpp:170
ndn::security::v2::Certificate::Certificate
Certificate()
Definition:
certificate.cpp:48
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
ndn::security::v2::Certificate::getKeyId
name::Component getKeyId() const
Get key ID.
Definition:
certificate.cpp:93
ndn::security::ValidityPeriod
Abstraction of validity period.
Definition:
validity-period.hpp:37
ndn::security::v2::Certificate::KEY_COMPONENT_OFFSET
static const ssize_t KEY_COMPONENT_OFFSET
Definition:
certificate.hpp:168
ndn::security::v2::Certificate::VERSION_OFFSET
static const ssize_t VERSION_OFFSET
Definition:
certificate.hpp:166
ndn::security::v2::Certificate::getIssuerId
name::Component getIssuerId() const
Get issuer ID.
Definition:
certificate.cpp:99
ndn::security::v2::Certificate::getExtension
const Block & getExtension(uint32_t type) const
Get extension with TLV type.
Definition:
certificate.cpp:125
ndn::security::v2::Certificate::getIdentity
Name getIdentity() const
Get identity name.
Definition:
certificate.cpp:87
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::v2::Certificate::getPublicKey
Buffer getPublicKey() const
Get public key bits (in PKCS#8 format)
Definition:
certificate.cpp:105
ndn::time::system_clock::TimePoint
time_point TimePoint
Definition:
time.hpp:90
ndn::security::v2::operator<<
std::ostream & operator<<(std::ostream &os, const AdditionalDescription &other)
Definition:
additional-description.cpp:178
ndn::name::Component
Component holds a read-only name component value.
Definition:
name-component.hpp:47
ndn::security::v2::Certificate::isValidName
static bool isValidName(const Name &certName)
Check if the specified name follows the naming convention for the certificate.
Definition:
certificate.cpp:131
ndn::security::v2::Certificate::KEY_COMPONENT
static const name::Component KEY_COMPONENT
Definition:
certificate.hpp:172
ndn::security::v2::Certificate::ISSUER_ID_OFFSET
static const ssize_t ISSUER_ID_OFFSET
Definition:
certificate.hpp:167
ndn::Data
Represents a Data packet.
Definition:
data.hpp:35
ndn::Buffer
General-purpose automatically managed/resized buffer.
Definition:
buffer.hpp:40
ndn::security::v2::extractIdentityFromCertName
Name extractIdentityFromCertName(const Name &certName)
Extract identity namespace from the certificate name certName.
Definition:
certificate.cpp:185
ndnSIM
ndn-cxx
src
security
v2
certificate.hpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11