168bool QSslConfiguration::operator==(
const QSslConfiguration &other)
const
172 return d->peerCertificate == other.d->peerCertificate &&
173 d->peerCertificateChain == other.d->peerCertificateChain &&
174 d->localCertificateChain == other.d->localCertificateChain &&
175 d->privateKey == other.d->privateKey &&
176 d->sessionCipher == other.d->sessionCipher &&
177 d->sessionProtocol == other.d->sessionProtocol &&
178 d->preSharedKeyIdentityHint == other.d->preSharedKeyIdentityHint &&
179 d->ciphers == other.d->ciphers &&
180 d->ellipticCurves == other.d->ellipticCurves &&
181 d->ephemeralServerKey == other.d->ephemeralServerKey &&
182 d->dhParams == other.d->dhParams &&
183 d->caCertificates == other.d->caCertificates &&
184 d->protocol == other.d->protocol &&
185 d->peerVerifyMode == other.d->peerVerifyMode &&
186 d->peerVerifyDepth == other.d->peerVerifyDepth &&
187 d->allowRootCertOnDemandLoading == other.d->allowRootCertOnDemandLoading &&
188 d->backendConfig == other.d->backendConfig &&
189 d->sslOptions == other.d->sslOptions &&
190 d->sslSession == other.d->sslSession &&
191 d->sslSessionTicketLifeTimeHint == other.d->sslSessionTicketLifeTimeHint &&
192 d->nextAllowedProtocols == other.d->nextAllowedProtocols &&
193 d->nextNegotiatedProtocol == other.d->nextNegotiatedProtocol &&
194 d->nextProtocolNegotiationStatus == other.d->nextProtocolNegotiationStatus &&
195 d->dtlsCookieEnabled == other.d->dtlsCookieEnabled &&
196 d->ocspStaplingEnabled == other.d->ocspStaplingEnabled &&
197 d->reportFromCallback == other.d->reportFromCallback &&
198 d->missingCertIsFatal == other.d->missingCertIsFatal;
220bool QSslConfiguration::isNull()
const
222 return (d->protocol == QSsl::SecureProtocols &&
223 d->peerVerifyMode == QSslSocket::AutoVerifyPeer &&
224 d->peerVerifyDepth == 0 &&
225 d->allowRootCertOnDemandLoading ==
true &&
226 d->caCertificates.size() == 0 &&
227 d->ciphers.size() == 0 &&
228 d->ellipticCurves.isEmpty() &&
229 d->ephemeralServerKey.isNull() &&
230 d->dhParams == QSslDiffieHellmanParameters::defaultParameters() &&
231 d->localCertificateChain.isEmpty() &&
232 d->privateKey.isNull() &&
233 d->peerCertificate.isNull() &&
234 d->peerCertificateChain.size() == 0 &&
235 d->backendConfig.isEmpty() &&
236 d->sslOptions == QSslConfigurationPrivate::defaultSslOptions &&
237 d->sslSession.isNull() &&
238 d->sslSessionTicketLifeTimeHint == -1 &&
239 d->preSharedKeyIdentityHint.isNull() &&
240 d->nextAllowedProtocols.isEmpty() &&
241 d->nextNegotiatedProtocol.isNull() &&
242 d->nextProtocolNegotiationStatus == QSslConfiguration::NextProtocolNegotiationNone &&
243 d->ocspStaplingEnabled ==
false &&
244 d->reportFromCallback ==
false &&
245 d->missingCertIsFatal ==
false);
596void QSslConfiguration::setCiphers(
const QString &ciphers)
600 const auto cipherNames = ciphers.split(u':', Qt::SkipEmptyParts);
601 for (
const QString &cipherName : cipherNames) {
602 QSslCipher cipher(cipherName);
603 if (!cipher.isNull())
604 p->ciphers << cipher;
671bool QSslConfiguration::addCaCertificates(
const QString &path, QSsl::EncodingFormat format,
672 QSslCertificate::PatternSyntax syntax)
674 QList<QSslCertificate> certs = QSslCertificate::fromPath(path, format, syntax);
678 d->caCertificates += certs;