reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SecurityAttributes.hxx
Go to the documentation of this file.
1#ifndef RESIP_SecurityAttributes_hxx
2#define RESIP_SecurityAttributes_hxx
3
4#include <iostream>
5
6#include "rutil/Data.hxx"
7
8namespace resip
9{
10
12{
13 SignatureNone, // there is no signature
15 SignatureTrusted, // It is signed with trusted signature
16 SignatureCATrusted, // signature is new and is signed by a root we trust
17 SignatureNotTrusted, // signature is new and is not signed by a CA we
19};
20
22{
23public:
27
29
31
32 void setIdentity(const Data& identity) { mIdentity = identity; }
33 const Data& getIdentity() const { return mIdentity; }
34
35 void setIdentityStrength(IdentityStrength strength) { mStrength = strength; }
36 IdentityStrength getIdentityStrength() const { return mStrength; }
37
38 void setEncrypted() { mIsEncrypted = true; }
39 bool isEncrypted() const { return mIsEncrypted; }
40
41 void setSignatureStatus(SignatureStatus status) { mSigStatus = status; }
42 SignatureStatus getSignatureStatus() const { return mSigStatus; }
43
44 void setSigner(const Data& signer) { mSigner = signer; }
45 const Data& getSigner() const { return mSigner; }
46
49
50 void setEncryptionPerformed(bool performed) { mEncryptionPerformed = performed; }
51 bool encryptionPerformed() const { return mEncryptionPerformed; }
52
54
55private:
56 // Indentity Header Info
57 Data mIdentity;
58 IdentityStrength mStrength;
59
60 // Body Encryption Info
61 bool mIsEncrypted;
62 SignatureStatus mSigStatus;
63 Data mSigner;
64 // for outgoing messages.
66 bool mEncryptionPerformed;
67};
68
70}
71
72#endif
73
74/* ====================================================================
75 * The Vovida Software License, Version 1.0
76 *
77 * Copyright (c) 2026 SIP Spectrum, Inc. https://www.sipspectrum.com
78 * Copyright (c) 2000-2005 Vovida Networks, Inc. All rights reserved.
79 *
80 * Redistribution and use in source and binary forms, with or without
81 * modification, are permitted provided that the following conditions
82 * are met:
83 *
84 * 1. Redistributions of source code must retain the above copyright
85 * notice, this list of conditions and the following disclaimer.
86 *
87 * 2. Redistributions in binary form must reproduce the above copyright
88 * notice, this list of conditions and the following disclaimer in
89 * the documentation and/or other materials provided with the
90 * distribution.
91 *
92 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
93 * and "Vovida Open Communication Application Library (VOCAL)" must
94 * not be used to endorse or promote products derived from this
95 * software without prior written permission. For written
96 * permission, please contact vocal@vovida.org.
97 *
98 * 4. Products derived from this software may not be called "VOCAL", nor
99 * may "VOCAL" appear in their name, without prior written
100 * permission of Vovida Networks, Inc.
101 *
102 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
103 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
104 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
105 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
106 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
107 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
108 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
109 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
110 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
111 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
112 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
113 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
114 * DAMAGE.
115 *
116 * ====================================================================
117 *
118 * This software consists of voluntary contributions made by Vovida
119 * Networks, Inc. and many individuals on behalf of Vovida Networks,
120 * Inc. For more information on Vovida Networks, Inc., please see
121 * <http://www.vovida.org/>.
122 *
123 */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
const Data & getSigner() const
SignatureStatus getSignatureStatus() const
friend EncodeStream & operator<<(EncodeStream &strm, const SecurityAttributes &sa)
IdentityStrength getIdentityStrength() const
void setEncryptionPerformed(bool performed)
OutgoingEncryptionLevel getOutgoingEncryptionLevel() const
void setIdentityStrength(IdentityStrength strength)
void setIdentity(const Data &identity)
const Data & getIdentity() const
void setSignatureStatus(SignatureStatus status)
void setSigner(const Data &signer)
void setOutgoingEncryptionLevel(OutgoingEncryptionLevel level)
dcm! – add UnusedChecking(_enum) below;
EncodeStream & operator<<(EncodeStream &strm, const BaseException &e)
#define EncodeStream