ssl/qsslconfiguration.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4const QSsl::SslOptions QSslConfigurationPrivate::defaultSslOptions = QSsl::SslOptionDisableEmptyFragments -
5 |QSsl::SslOptionDisableLegacyRenegotiation -
6 |QSsl::SslOptionDisableCompression; -
7QSslConfiguration::QSslConfiguration() -
8 : d(new QSslConfigurationPrivate) -
9{ -
10}
executed: }
Execution Count:4164
4164
11 -
12 -
13 -
14 -
15 -
16QSslConfiguration::QSslConfiguration(const QSslConfiguration &other) -
17 : d(other.d) -
18{ -
19}
executed: }
Execution Count:978
978
20 -
21 -
22 -
23 -
24QSslConfiguration::~QSslConfiguration() -
25{ -
26 -
27} -
28 -
29 -
30 -
31 -
32 -
33QSslConfiguration &QSslConfiguration::operator=(const QSslConfiguration &other) -
34{ -
35 d = other.d; -
36 return *this;
executed: return *this;
Execution Count:880
880
37} -
38bool QSslConfiguration::operator==(const QSslConfiguration &other) const -
39{ -
40 if (d == other.d)
evaluated: d == other.d
TRUEFALSE
yes
Evaluation Count:29
yes
Evaluation Count:4
4-29
41 return true;
executed: return true;
Execution Count:29
29
42 return d->peerCertificate == other.d->peerCertificate && 4
43 d->peerCertificateChain == other.d->peerCertificateChain && 4
44 d->localCertificate == other.d->localCertificate && 4
45 d->privateKey == other.d->privateKey && 4
46 d->sessionCipher == other.d->sessionCipher && 4
47 d->ciphers == other.d->ciphers && 4
48 d->caCertificates == other.d->caCertificates && 4
49 d->protocol == other.d->protocol && 4
50 d->peerVerifyMode == other.d->peerVerifyMode && 4
51 d->peerVerifyDepth == other.d->peerVerifyDepth && 4
52 d->sslOptions == other.d->sslOptions;
executed: return d->peerCertificate == other.d->peerCertificate && d->peerCertificateChain == other.d->peerCertificateChain && d->localCertificate == other.d->localCertificate && d->privateKey == other.d->privateKey && d->sessionCipher == other.d->sessionCipher && d->ciphers == other.d->ciphers && d->caCertificates == other.d->caCertificates && d->protocol == other.d->protocol && d->peerVerifyMode == other.d->peerVerifyMode && d->peerVerifyDepth == other.d->peerVerifyDepth && d->sslOptions == other.d->sslOptions;
Execution Count:4
4
53} -
54bool QSslConfiguration::isNull() const -
55{ -
56 return (d->protocol == QSsl::SecureProtocols && 139
57 d->peerVerifyMode == QSslSocket::AutoVerifyPeer && 139
58 d->peerVerifyDepth == 0 && 139
59 d->caCertificates.count() == 0 && 139
60 d->ciphers.count() == 0 && 139
61 d->localCertificate.isNull() && 139
62 d->privateKey.isNull() && 139
63 d->peerCertificate.isNull() && 139
64 d->peerCertificateChain.count() == 0 && 139
65 d->sslOptions == QSslConfigurationPrivate::defaultSslOptions);
executed: return (d->protocol == QSsl::SecureProtocols && d->peerVerifyMode == QSslSocket::AutoVerifyPeer && d->peerVerifyDepth == 0 && d->caCertificates.count() == 0 && d->ciphers.count() == 0 && d->localCertificate.isNull() && d->privateKey.isNull() && d->peerCertificate.isNull() && d->peerCertificateChain.count() == 0 && d->sslOptions == QSslConfigurationPrivate::defaultSslOptions);
Execution Count:139
139
66} -
67 -
68 -
69 -
70 -
71 -
72 -
73QSsl::SslProtocol QSslConfiguration::protocol() const -
74{ -
75 return d->protocol;
executed: return d->protocol;
Execution Count:3
3
76} -
77void QSslConfiguration::setProtocol(QSsl::SslProtocol protocol) -
78{ -
79 d->protocol = protocol; -
80}
executed: }
Execution Count:1
1
81QSslSocket::PeerVerifyMode QSslConfiguration::peerVerifyMode() const -
82{ -
83 return d->peerVerifyMode;
executed: return d->peerVerifyMode;
Execution Count:3
3
84} -
85void QSslConfiguration::setPeerVerifyMode(QSslSocket::PeerVerifyMode mode) -
86{ -
87 d->peerVerifyMode = mode; -
88}
never executed: }
0
89int QSslConfiguration::peerVerifyDepth() const -
90{ -
91 return d->peerVerifyDepth;
executed: return d->peerVerifyDepth;
Execution Count:3
3
92} -
93void QSslConfiguration::setPeerVerifyDepth(int depth) -
94{ -
95 if (depth < 0) {
never evaluated: depth < 0
0
96 QMessageLogger("ssl/qsslconfiguration.cpp", 307, __PRETTY_FUNCTION__).warning("QSslConfiguration::setPeerVerifyDepth: cannot set negative depth of %d", depth); -
97 return;
never executed: return;
0
98 } -
99 d->peerVerifyDepth = depth; -
100}
never executed: }
0
101 -
102 -
103 -
104 -
105 -
106 -
107 -
108QSslCertificate QSslConfiguration::localCertificate() const -
109{ -
110 return d->localCertificate;
executed: return d->localCertificate;
Execution Count:3
3
111} -
112void QSslConfiguration::setLocalCertificate(const QSslCertificate &certificate) -
113{ -
114 d->localCertificate = certificate; -
115}
never executed: }
0
116QSslCertificate QSslConfiguration::peerCertificate() const -
117{ -
118 return d->peerCertificate;
never executed: return d->peerCertificate;
0
119} -
120QList<QSslCertificate> QSslConfiguration::peerCertificateChain() const -
121{ -
122 return d->peerCertificateChain;
never executed: return d->peerCertificateChain;
0
123} -
124QSslCipher QSslConfiguration::sessionCipher() const -
125{ -
126 return d->sessionCipher;
never executed: return d->sessionCipher;
0
127} -
128 -
129 -
130 -
131 -
132 -
133 -
134 -
135QSslKey QSslConfiguration::privateKey() const -
136{ -
137 return d->privateKey;
executed: return d->privateKey;
Execution Count:3
3
138} -
139void QSslConfiguration::setPrivateKey(const QSslKey &key) -
140{ -
141 d->privateKey = key; -
142}
never executed: }
0
143QList<QSslCipher> QSslConfiguration::ciphers() const -
144{ -
145 return d->ciphers;
executed: return d->ciphers;
Execution Count:3
3
146} -
147void QSslConfiguration::setCiphers(const QList<QSslCipher> &ciphers) -
148{ -
149 d->ciphers = ciphers; -
150}
never executed: }
0
151QList<QSslCertificate> QSslConfiguration::caCertificates() const -
152{ -
153 return d->caCertificates;
executed: return d->caCertificates;
Execution Count:3
3
154} -
155void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates) -
156{ -
157 d->caCertificates = certificates; -
158}
executed: }
Execution Count:2
2
159void QSslConfiguration::setSslOption(QSsl::SslOption option, bool on) -
160{ -
161 if (on)
never evaluated: on
0
162 d->sslOptions |= option;
never executed: d->sslOptions |= option;
0
163 else -
164 d->sslOptions &= ~option;
never executed: d->sslOptions &= ~option;
0
165} -
166bool QSslConfiguration::testSslOption(QSsl::SslOption option) const -
167{ -
168 return d->sslOptions & option;
never executed: return d->sslOptions & option;
0
169} -
170QSslConfiguration QSslConfiguration::defaultConfiguration() -
171{ -
172 return QSslConfigurationPrivate::defaultConfiguration();
executed: return QSslConfigurationPrivate::defaultConfiguration();
Execution Count:679
679
173} -
174void QSslConfiguration::setDefaultConfiguration(const QSslConfiguration &configuration) -
175{ -
176 QSslConfigurationPrivate::setDefaultConfiguration(configuration); -
177}
never executed: }
0
178 -
179 -
180 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial