IBR-DTN  1.0.0
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 
24 
25 namespace dtn
26 {
27  namespace security
28  {
30  : KeyExchangeProtocol(manager, 5)
31  {
32  }
33 
35  {
36  }
37 
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 
48  {
49  }
50  } /* namespace security */
51 } /* namespace dtn */
NFCProtocol(KeyExchangeManager &manager)
Definition: NFCProtocol.cpp:29
void putKey(const std::string &data, const dtn::security::SecurityKey::KeyType type, const dtn::security::SecurityKey::TrustLevel trust) const
virtual void step(KeyExchangeSession &session, KeyExchangeData &data)
Definition: NFCProtocol.cpp:47
virtual void finish(KeyExchangeSession &session)=0
virtual void begin(KeyExchangeSession &session, KeyExchangeData &data)
Definition: NFCProtocol.cpp:38