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