reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
MacSecurity.hxx
Go to the documentation of this file.
1#if !defined(RESIP_MACSECURITY_HXX)
2#define RESIP_MACSECURITY_HXX
3
4#if defined(HAVE_CONFIG_H)
5 #include "config.h"
6#endif
7
9
10namespace resip
11{
12
13// Instead of using Mac specific data types
14// we pass around handles. This keeps us from
15// having to include Mac OS headers.
16typedef void * KeychainHandle;
17
18/*
19 * Manages certificates in the Mac Keychain.
20 */
21class MacSecurity : public Security
22{
23 public:
24
26
27 // load root certificates into memory
28 virtual void preload();
29
30 // we need to stub out these functions since we don't
31 // dynamically add or remove certificates on the mac
32 virtual void onReadPEM(const Data&, PEMType, Data&) const
33 { }
34 virtual void onWritePEM(const Data&, PEMType, const Data&) const
35 { }
36 virtual void onRemovePEM(const Data&, PEMType) const
37 { }
38
39 protected:
40
41 // Opens a search handle to certificates store in
42 // the X509Anchors keychain
44
45 // loads root certificates into memory
46 void getCerts();
47
48 void closeCertifStore(KeychainHandle searchReference);
49};
50
51} // namespace resip
52
53#endif // ndef RESIP_MACSECURITY_HXX
54
55/* ====================================================================
56 * The Vovida Software License, Version 1.0
57 *
58 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
59 *
60 * Redistribution and use in source and binary forms, with or without
61 * modification, are permitted provided that the following conditions
62 * are met:
63 *
64 * 1. Redistributions of source code must retain the above copyright
65 * notice, this list of conditions and the following disclaimer.
66 *
67 * 2. Redistributions in binary form must reproduce the above copyright
68 * notice, this list of conditions and the following disclaimer in
69 * the documentation and/or other materials provided with the
70 * distribution.
71 *
72 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
73 * and "Vovida Open Communication Application Library (VOCAL)" must
74 * not be used to endorse or promote products derived from this
75 * software without prior written permission. For written
76 * permission, please contact vocal@vovida.org.
77 *
78 * 4. Products derived from this software may not be called "VOCAL", nor
79 * may "VOCAL" appear in their name, without prior written
80 * permission of Vovida Networks, Inc.
81 *
82 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
83 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
84 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
85 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
86 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
87 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
88 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
89 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
90 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
91 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
92 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
93 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
94 * DAMAGE.
95 *
96 * ====================================================================
97 *
98 * This software consists of voluntary contributions made by Vovida
99 * Networks, Inc. and many individuals on behalf of Vovida Networks,
100 * Inc. For more information on Vovida Networks, Inc., please see
101 * <http://www.vovida.org/>.
102 *
103 */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
KeychainHandle openSystemCertStore()
void closeCertifStore(KeychainHandle searchReference)
virtual void onReadPEM(const Data &, PEMType, Data &) const
virtual void onRemovePEM(const Data &, PEMType) const
virtual void preload()
virtual void onWritePEM(const Data &, PEMType, const Data &) const
dcm! – add UnusedChecking(_enum) below;
void * KeychainHandle