NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
certificate-container.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_PIB_CERTIFICATE_CONTAINER_HPP
23
#define NDN_SECURITY_PIB_CERTIFICATE_CONTAINER_HPP
24
25
#include "../v2/certificate.hpp"
26
27
#include <set>
28
#include <unordered_map>
29
30
namespace
ndn
{
31
namespace
security {
32
namespace
pib {
33
34
class
PibImpl;
35
36
namespace
detail {
37
class
KeyImpl
;
38
}
// namespace detail
39
46
class
CertificateContainer
: noncopyable
47
{
48
public
:
49
class
const_iterator
:
public
std::iterator
<std::forward_iterator_tag, const v2::Certificate>
50
{
51
public
:
52
const_iterator
();
53
54
v2::Certificate
55
operator*
();
56
57
const_iterator
&
58
operator++
();
59
60
const_iterator
61
operator++
(
int
);
62
63
bool
64
operator==
(
const
const_iterator
& other)
const
;
65
66
bool
67
operator!=
(
const
const_iterator
& other)
const
;
68
69
private
:
70
const_iterator
(std::set<Name>::const_iterator it,
const
CertificateContainer
& container);
71
72
private
:
73
std::set<Name>::const_iterator m_it;
74
const
CertificateContainer
* m_container;
75
76
friend
class
CertificateContainer
;
77
};
78
79
typedef
const_iterator
iterator
;
80
81
public
:
82
const_iterator
83
begin
()
const
;
84
85
const_iterator
86
end
()
const
;
87
88
const_iterator
89
find
(
const
Name
& certName)
const
;
90
91
size_t
92
size
()
const
;
93
98
void
99
add
(
const
v2::Certificate
& certificate);
100
105
void
106
remove
(
const
Name
& certName);
107
113
v2::Certificate
114
get
(
const
Name
& certName)
const
;
115
120
bool
121
isConsistent
()
const
;
122
123
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
128
CertificateContainer
(
const
Name
& keyName, shared_ptr<PibImpl>
pibImpl
);
129
130
const
std::set<Name>&
131
getCertNames
()
const
132
{
133
return
m_certNames;
134
}
135
136
const
std::unordered_map<Name, v2::Certificate>&
137
getCache
()
const
138
{
139
return
m_certs;
140
}
141
142
private
:
143
Name
m_keyName;
144
std::set<Name> m_certNames;
146
mutable
std::unordered_map<Name, v2::Certificate> m_certs;
147
148
shared_ptr<PibImpl> m_pib;
149
150
friend
class
detail::KeyImpl
;
151
};
152
153
}
// namespace pib
154
155
using
pib::CertificateContainer
;
156
157
}
// namespace security
158
}
// namespace ndn
159
160
#endif // NDN_SECURITY_PIB_CERTIFICATE_CONTAINER_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::v2::Certificate
The certificate following the certificate format naming convention.
Definition:
certificate.hpp:81
ndn::security::pib::CertificateContainer::const_iterator::const_iterator
const_iterator()
Definition:
certificate-container.cpp:32
ndn::security::pib::CertificateContainer::pibImpl
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr< PibImpl > pibImpl
Definition:
certificate-container.hpp:128
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
ndn::security::pib::CertificateContainer::const_iterator
Definition:
certificate-container.hpp:49
ndn::security::pib::CertificateContainer::isConsistent
bool isConsistent() const
Check if the container is consistent with the backend storage.
Definition:
certificate-container.cpp:161
ndn::security::pib::CertificateContainer::getCertNames
const std::set< Name > & getCertNames() const
Definition:
certificate-container.hpp:131
ndn::security::pib::CertificateContainer::const_iterator::operator!=
bool operator!=(const const_iterator &other) const
Definition:
certificate-container.cpp:78
ndn::security::pib::CertificateContainer::getCache
const std::unordered_map< Name, v2::Certificate > & getCache() const
Definition:
certificate-container.hpp:137
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::security::pib::CertificateContainer::end
const_iterator end() const
Definition:
certificate-container.cpp:98
ndn::security::pib::CertificateContainer
Container of certificates of a key.
Definition:
certificate-container.hpp:46
ndn::security::pib::CertificateContainer::size
size_t size() const
Definition:
certificate-container.cpp:110
ndn::security::pib::CertificateContainer::iterator
const_iterator iterator
Definition:
certificate-container.hpp:79
ndn::security::pib::CertificateContainer::const_iterator::operator*
v2::Certificate operator*()
Definition:
certificate-container.cpp:45
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::pib::CertificateContainer::const_iterator::operator==
bool operator==(const const_iterator &other) const
Definition:
certificate-container.cpp:68
ndn::security::pib::CertificateContainer::add
void add(const v2::Certificate &certificate)
Add certificate into the container.
Definition:
certificate-container.cpp:116
ndn::security::pib::detail::KeyImpl
Backend instance of Key.
Definition:
key-impl.hpp:44
ndn::security::pib::CertificateContainer::const_iterator::operator++
const_iterator & operator++()
Definition:
certificate-container.cpp:52
ndn::security::pib::CertificateContainer::find
const_iterator find(const Name &certName) const
Definition:
certificate-container.cpp:104
ndn::security::pib::CertificateContainer::begin
const_iterator begin() const
Definition:
certificate-container.cpp:92
ndnSIM
ndn-cxx
src
security
pib
certificate-container.hpp
Generated on Sun Feb 25 2018 13:27:05 for ndnSIM by
1.8.14