blob: a70c339960be7308cf4afd1207dd7c810895c384 [file] [log] [blame]
Jeff Thompson6c314bc2013-09-23 18:09:38 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
5 * See COPYING for copyright and distribution information.
6 */
7
8#include <stdexcept>
9#include "memory-identity-storage.hpp"
10
11using namespace std;
12using namespace ndn::ptr_lib;
13
14namespace ndn {
15
16MemoryIdentityStorage::~MemoryIdentityStorage()
17{
18}
19
20bool
21MemoryIdentityStorage::doesIdentityExist(const Name& identityName)
22{
23#if 1
24 throw std::runtime_error("MemoryIdentityStorage::doesIdentityExist not implemented");
25#endif
26}
27
28void
29MemoryIdentityStorage::addIdentity(const Name& identityName)
30{
31#if 1
32 throw std::runtime_error("MemoryIdentityStorage::addIdentity not implemented");
33#endif
34}
35
36bool
37MemoryIdentityStorage::revokeIdentity()
38{
39#if 1
40 throw std::runtime_error("MemoryIdentityStorage::revokeIdentity not implemented");
41#endif
42}
43
44Name
45MemoryIdentityStorage::getNewKeyName(const Name& identityName, bool useKsk)
46{
47#if 1
48 throw std::runtime_error("MemoryIdentityStorage::getNewKeyName not implemented");
49#endif
50}
51
52bool
53MemoryIdentityStorage::doesKeyExist(const Name& keyName)
54{
55#if 1
56 throw std::runtime_error("MemoryIdentityStorage::doesKeyExist not implemented");
57#endif
58}
59
60Name
61MemoryIdentityStorage::getKeyNameForCertificate(const Name& certificateName)
62{
63 int i = certificateName.getComponentCount() - 1;
64
65 for (; i >= 0; --i) {
66 if(certificateName.getComponent(i).toEscapedString() == string("ID-CERT"))
67 break;
68 }
69
70 return certificateName.getSubName(0, i);
71}
72
73void
74MemoryIdentityStorage::addKey(const Name& keyName, KeyType keyType, Blob& publicKeyDer)
75{
76#if 1
77 throw std::runtime_error("MemoryIdentityStorage::addKey not implemented");
78#endif
79}
80
81Blob
82MemoryIdentityStorage::getKey(const Name& keyName)
83{
84#if 1
85 throw std::runtime_error("MemoryIdentityStorage::getKey not implemented");
86#endif
87}
88
89void
90MemoryIdentityStorage::activateKey(const Name& keyName)
91{
92#if 1
93 throw std::runtime_error("MemoryIdentityStorage::activateKey not implemented");
94#endif
95}
96
97void
98MemoryIdentityStorage::deactivateKey(const Name& keyName)
99{
100#if 1
101 throw std::runtime_error("MemoryIdentityStorage::deactivateKey not implemented");
102#endif
103}
104
105bool
106MemoryIdentityStorage::doesCertificateExist(const Name& certificateName)
107{
108#if 1
109 throw std::runtime_error("MemoryIdentityStorage::doesCertificateExist not implemented");
110#endif
111}
112
113void
114MemoryIdentityStorage::addCertificate(const Certificate& certificate)
115{
116#if 1
117 throw std::runtime_error("MemoryIdentityStorage::addCertificate not implemented");
118#endif
119}
120
121ptr_lib::shared_ptr<Data>
122MemoryIdentityStorage::getCertificate(const Name &certificateName, bool allowAny)
123{
124#if 1
125 throw std::runtime_error("MemoryIdentityStorage::getCertificate not implemented");
126#endif
127}
128
129Name
130MemoryIdentityStorage::getDefaultIdentity()
131{
132#if 1
133 throw std::runtime_error("MemoryIdentityStorage::getDefaultIdentity not implemented");
134#endif
135}
136
137Name
138MemoryIdentityStorage::getDefaultKeyNameForIdentity(const Name& identityName)
139{
140#if 1
141 throw std::runtime_error("MemoryIdentityStorage::getDefaultKeyNameForIdentity not implemented");
142#endif
143}
144
145Name
146MemoryIdentityStorage::getDefaultCertificateNameForKey(const Name& keyName)
147{
148#if 1
149 throw std::runtime_error("MemoryIdentityStorage::getDefaultCertificateNameForKey not implemented");
150#endif
151}
152
153void
154MemoryIdentityStorage::setDefaultIdentity(const Name& identityName)
155{
156#if 1
157 throw std::runtime_error("MemoryIdentityStorage::setDefaultIdentity not implemented");
158#endif
159}
160
161void
162MemoryIdentityStorage::setDefaultKeyNameForIdentity(const Name& keyName, const Name& identityName)
163{
164#if 1
165 throw std::runtime_error("MemoryIdentityStorage::setDefaultKeyNameForIdentity not implemented");
166#endif
167}
168
169void
170MemoryIdentityStorage::setDefaultCertificateNameForKey(const Name& keyName, const Name& certificateName)
171{
172#if 1
173 throw std::runtime_error("MemoryIdentityStorage::setDefaultCertificateNameForKey not implemented");
174#endif
175}
176
177}