IBR-DTN
1.0.0
Main Page
Namespaces
Classes
Files
File List
File Members
NFCProtocol.cpp
Go to the documentation of this file.
1
/*
2
* NFCProtocol.cpp
3
*
4
* Copyright (C) 2014 IBR, TU Braunschweig
5
*
6
* Written-by: Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
7
* Thomas Schrader <schrader.thomas@gmail.com>
8
*
9
* Licensed under the Apache License, Version 2.0 (the "License");
10
* you may not use this file except in compliance with the License.
11
* You may obtain a copy of the License at
12
*
13
* http://www.apache.org/licenses/LICENSE-2.0
14
*
15
* Unless required by applicable law or agreed to in writing, software
16
* distributed under the License is distributed on an "AS IS" BASIS,
17
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
* See the License for the specific language governing permissions and
19
* limitations under the License.
20
*
21
*/
22
23
#include "
security/exchange/NFCProtocol.h
"
24
25
namespace
dtn
26
{
27
namespace
security
28
{
29
NFCProtocol::NFCProtocol
(
KeyExchangeManager
&manager)
30
:
KeyExchangeProtocol
(manager, 5)
31
{
32
}
33
34
NFCProtocol::~NFCProtocol
()
35
{
36
}
37
38
void
NFCProtocol::begin
(
KeyExchangeSession
&session,
KeyExchangeData
&data)
39
{
40
// store received key in the session
41
session.
putKey
(data.str(),
SecurityKey::KEY_PUBLIC
,
SecurityKey::HIGH
);
42
43
// finish the key-exchange
44
manager
.
finish
(session);
45
}
46
47
void
NFCProtocol::step
(
KeyExchangeSession
&session,
KeyExchangeData
&data)
48
{
49
}
50
}
/* namespace security */
51
}
/* namespace dtn */
NFCProtocol.h
dtn::security::KeyExchangeSession
Definition:
KeyExchangeSession.h:37
dtn::security::KeyExchangeManager
Definition:
KeyExchangeProtocol.h:34
dtn::security::KeyExchangeData
Definition:
KeyExchangeData.h:37
dtn::security::NFCProtocol::NFCProtocol
NFCProtocol(KeyExchangeManager &manager)
Definition:
NFCProtocol.cpp:29
dtn::security::KeyExchangeProtocol
Definition:
KeyExchangeProtocol.h:42
dtn::security::KeyExchangeSession::putKey
void putKey(const std::string &data, const dtn::security::SecurityKey::KeyType type, const dtn::security::SecurityKey::TrustLevel trust) const
Definition:
KeyExchangeSession.cpp:105
dtn::security::SecurityKey::HIGH
Definition:
SecurityKey.h:55
dtn::security::NFCProtocol::step
virtual void step(KeyExchangeSession &session, KeyExchangeData &data)
Definition:
NFCProtocol.cpp:47
dtn::security::KeyExchangeManager::finish
virtual void finish(KeyExchangeSession &session)=0
dtn::security::NFCProtocol::begin
virtual void begin(KeyExchangeSession &session, KeyExchangeData &data)
Definition:
NFCProtocol.cpp:38
dtn::security::KeyExchangeProtocol::manager
KeyExchangeManager & manager
Definition:
KeyExchangeProtocol.h:69
dtn::security::SecurityKey::KEY_PUBLIC
Definition:
SecurityKey.h:47
dtn::security::NFCProtocol::~NFCProtocol
virtual ~NFCProtocol()
Definition:
NFCProtocol.cpp:34
daemon
src
security
exchange
NFCProtocol.cpp
Generated on Sun Jan 4 2015 15:27:33 for IBR-DTN by
1.8.6