reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
TlsPeerIdentityStore.hxx
Go to the documentation of this file.
1#if !defined(REPRO_TLSPEERIDENTITYSTORE_HXX)
2#define REPRO_TLSPEERIDENTITYSTORE_HXX
3
4#include "rutil/Data.hxx"
5#include "rutil/Fifo.hxx"
7
9
10namespace resip
11{
12 class TransactionUser;
13}
14
15namespace repro
16{
17
19
21{
22 public:
24
26
27 virtual ~TlsPeerIdentityStore();
28
30
31 bool isAuthorized( const std::set<resip::Data>& peerNames,
32 const std::set<resip::Data>& identities ) const;
33
34 bool addTlsPeerIdentity( const resip::Data& peerName,
35 const resip::Data& authorizedIdentity);
36
37 void eraseTlsPeerIdentity( const Key& key );
38
40 const resip::Data& peerName,
41 const resip::Data& authorizedIdentity);
42
43 Key getFirstKey();// return empty if no more
44 Key getNextKey(); // return empty if no more
45
46 static Key buildKey(const resip::Data& peerName, const resip::Data& authorizedIdentity);
47 static void getTlsPeerIdentityFromKey(const AbstractDb::Key& key, resip::Data& peerName, resip::Data& authorizedIdentity);
48
49 private:
50
51 AbstractDb& mDb;
52 static const resip::Data SEPARATOR;
53};
54
55}
56#endif
57
58/* ====================================================================
59 *
60 * Copyright 2014 Daniel Pocock http://danielpocock.com All rights reserved.
61 *
62 * Redistribution and use in source and binary forms, with or without
63 * modification, are permitted provided that the following conditions
64 * are met:
65 *
66 * 1. Redistributions of source code must retain the above copyright
67 * notice, this list of conditions and the following disclaimer.
68 *
69 * 2. Redistributions in binary form must reproduce the above copyright
70 * notice, this list of conditions and the following disclaimer in
71 * the documentation and/or other materials provided with the
72 * distribution.
73 *
74 * 3. Neither the name of the author(s) nor the names of any contributors
75 * may be used to endorse or promote products derived from this software
76 * without specific prior written permission.
77 *
78 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
79 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
80 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
81 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
82 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
83 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
84 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
85 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
86 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
87 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
88 * SUCH DAMAGE.
89 *
90 * ====================================================================
91 *
92 *
93 */
94
bool updateTlsPeerIdentity(const Key &originalKey, const resip::Data &peerName, const resip::Data &authorizedIdentity)
bool addTlsPeerIdentity(const resip::Data &peerName, const resip::Data &authorizedIdentity)
static Key buildKey(const resip::Data &peerName, const resip::Data &authorizedIdentity)
bool isAuthorized(const std::set< resip::Data > &peerNames, const std::set< resip::Data > &identities) const
void eraseTlsPeerIdentity(const Key &key)
static void getTlsPeerIdentityFromKey(const AbstractDb::Key &key, resip::Data &peerName, resip::Data &authorizedIdentity)
AbstractDb::TlsPeerIdentityRecord getTlsPeerIdentityInfo(const Key &key) const
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
A templated, threadsafe message-queue class.
Definition Fifo.hxx:16
This Class is used to implement a primitive form of RPC using loose XML formatting.
resip::Fifo< resip::Message > MessageFifo
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66