Coverage Report

Created: 2026-04-01 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/resiprocate/resip/stack/SecurityAttributes.cxx
Line
Count
Source
1
#include "resip/stack/SecurityAttributes.hxx"
2
3
using namespace resip;
4
5
static const char* strengthText[] =
6
{
7
   "From", "IdentityFailed", "Identity"
8
};
9
10
static const char* sigstatusText[] =
11
{
12
   "None", "Bad", "Trusted", "CA Trusted", "Untrusted", "Self-signed"
13
};
14
15
static const char* encryptionLevelText[] =
16
{
17
   "None", "Sign", "Encrypt", "SignAndEncrypt"
18
};
19
20
SecurityAttributes::SecurityAttributes() :
21
0
   mStrength(From),
22
0
   mIsEncrypted(false),
23
0
   mSigStatus(SignatureNone),
24
0
   mLevel(None),
25
0
   mEncryptionPerformed(false)
26
0
{
27
0
}
28
29
SecurityAttributes::SecurityAttributes(const SecurityAttributes& rhs) :
30
0
   mIdentity(rhs.mIdentity),
31
0
   mStrength(rhs.mStrength),
32
0
   mIsEncrypted(rhs.mIsEncrypted),
33
0
   mSigStatus(rhs.mSigStatus),
34
0
   mSigner(rhs.mSigner),
35
0
   mLevel(rhs.mLevel),
36
0
   mEncryptionPerformed(rhs.mEncryptionPerformed)
37
0
{
38
0
}
39
40
SecurityAttributes::~SecurityAttributes() 
41
0
{
42
0
}
43
44
EncodeStream& 
45
resip::operator<<(EncodeStream& strm, const SecurityAttributes& sa)
46
0
{
47
0
   strm << "SecurityAttributes: identity=" << sa.mIdentity
48
0
        << " strength=" << strengthText[sa.mStrength]
49
0
        << " encrypted=" << Data(sa.mIsEncrypted)
50
0
        << " status=" << sigstatusText[sa.mSigStatus]
51
0
        << " signer=" << sa.mSigner
52
0
        << " encryption level for outgoing message=" << encryptionLevelText[sa.mLevel]
53
0
        << " encryption performed=" << Data(sa.mEncryptionPerformed);
54
55
0
   return strm;
56
0
}
57
58
59
/* ====================================================================
60
 * The Vovida Software License, Version 1.0 
61
 * 
62
 * Copyright (c) 2026 SIP Spectrum, Inc. https://www.sipspectrum.com
63
 * Copyright (c) 2000-2005 Vovida Networks, Inc.  All rights reserved.
64
 * 
65
 * Redistribution and use in source and binary forms, with or without
66
 * modification, are permitted provided that the following conditions
67
 * are met:
68
 * 
69
 * 1. Redistributions of source code must retain the above copyright
70
 *    notice, this list of conditions and the following disclaimer.
71
 * 
72
 * 2. Redistributions in binary form must reproduce the above copyright
73
 *    notice, this list of conditions and the following disclaimer in
74
 *    the documentation and/or other materials provided with the
75
 *    distribution.
76
 * 
77
 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
78
 *    and "Vovida Open Communication Application Library (VOCAL)" must
79
 *    not be used to endorse or promote products derived from this
80
 *    software without prior written permission. For written
81
 *    permission, please contact vocal@vovida.org.
82
 *
83
 * 4. Products derived from this software may not be called "VOCAL", nor
84
 *    may "VOCAL" appear in their name, without prior written
85
 *    permission of Vovida Networks, Inc.
86
 * 
87
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
88
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
90
 * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
91
 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
92
 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
93
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
94
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
95
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
96
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
97
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
98
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
99
 * DAMAGE.
100
 * 
101
 * ====================================================================
102
 * 
103
 * This software consists of voluntary contributions made by Vovida
104
 * Networks, Inc. and many individuals on behalf of Vovida Networks,
105
 * Inc.  For more information on Vovida Networks, Inc., please see
106
 * <http://www.vovida.org/>.
107
 *
108
 */