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-subject-description.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "common.hpp"
27
28
#include "
certificate-subject-description.hpp
"
29
30
#include "
cryptopp.hpp
"
31
32
namespace
ndn
{
33
34
void
35
CertificateSubjectDescription::encode
(CryptoPP::BufferedTransformation& out)
const
36
{
37
using namespace
CryptoPP
;
38
// RelativeDistinguishedName ::=
39
// SET OF AttributeTypeAndValue
40
//
41
// AttributeTypeAndValue ::= SEQUENCE {
42
// type AttributeType,
43
// value AttributeValue }
44
//
45
// AttributeType ::= OBJECT IDENTIFIER
46
//
47
// AttributeValue ::= ANY DEFINED BY AttributeType
48
DERSequenceEncoder attributeTypeAndValue(out);
49
{
50
m_oid.encode(attributeTypeAndValue);
51
DEREncodeTextString(attributeTypeAndValue, m_value, PRINTABLE_STRING);
52
}
53
attributeTypeAndValue.MessageEnd();
54
}
55
56
void
57
CertificateSubjectDescription::decode
(CryptoPP::BufferedTransformation& in)
58
{
59
using namespace
CryptoPP
;
60
// RelativeDistinguishedName ::=
61
// SET OF AttributeTypeAndValue
62
//
63
// AttributeTypeAndValue ::= SEQUENCE {
64
// type AttributeType,
65
// value AttributeValue }
66
//
67
// AttributeType ::= OBJECT IDENTIFIER
68
//
69
// AttributeValue ::= ANY DEFINED BY AttributeType
70
71
BERSequenceDecoder attributeTypeAndValue(in);
72
{
73
m_oid.decode(attributeTypeAndValue);
74
77
BERDecodeTextString(attributeTypeAndValue, m_value, PRINTABLE_STRING);
78
}
79
attributeTypeAndValue.MessageEnd();
80
}
81
82
}
// namespace ndn
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::CertificateSubjectDescription::encode
void encode(CryptoPP::BufferedTransformation &out) const
Definition:
certificate-subject-description.cpp:35
certificate-subject-description.hpp
cryptopp.hpp
ndn::CertificateSubjectDescription::decode
void decode(CryptoPP::BufferedTransformation &in)
Definition:
certificate-subject-description.cpp:57
ndnSIM
ndn-cxx
src
security
certificate-subject-description.cpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11