summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslconfiguration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslconfiguration.cpp')
-rw-r--r--src/network/ssl/qsslconfiguration.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 75a880f115..cbbbac85fe 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -221,6 +221,7 @@ bool QSslConfiguration::operator==(const QSslConfiguration &other) const
d->peerVerifyMode == other.d->peerVerifyMode &&
d->peerVerifyDepth == other.d->peerVerifyDepth &&
d->allowRootCertOnDemandLoading == other.d->allowRootCertOnDemandLoading &&
+ d->backendConfig == other.d->backendConfig &&
d->sslOptions == other.d->sslOptions &&
d->sslSession == other.d->sslSession &&
d->sslSessionTicketLifeTimeHint == other.d->sslSessionTicketLifeTimeHint &&
@@ -263,6 +264,7 @@ bool QSslConfiguration::isNull() const
d->privateKey.isNull() &&
d->peerCertificate.isNull() &&
d->peerCertificateChain.count() == 0 &&
+ d->backendConfig.isEmpty() &&
d->sslOptions == QSslConfigurationPrivate::defaultSslOptions &&
d->sslSession.isNull() &&
d->sslSessionTicketLifeTimeHint == -1 &&
@@ -870,6 +872,60 @@ void QSslConfiguration::setDiffieHellmanParameters(const QSslDiffieHellmanParame
}
/*!
+ \since 5.11
+
+ Returns the backend-specific configuration.
+
+ Only options set by addBackendConfig() or setBackendConfig() will be
+ returned. The internal standard configuration of the backend is not reported.
+
+ \sa setBackendConfigOption(), setBackendConfig()
+ */
+QMap<QByteArray, QVariant> QSslConfiguration::backendConfig() const
+{
+ return d->backendConfig;
+}
+
+/*!
+ \since 5.11
+
+ Sets an option in the backend-specific configuration.
+
+ Options supported by the OpenSSL (>= 1.0.2) backend are available in the \l
+ {https://www.openssl.org/docs/manmaster/man3/SSL_CONF_cmd.html#SUPPORTED-CONFIGURATION-FILE-COMMANDS}
+ {supported configuration file commands} documentation. The expected type for
+ the \a value parameter is a QByteArray for all options. The \l
+ {https://www.openssl.org/docs/manmaster/man3/SSL_CONF_cmd.html#EXAMPLES}{examples}
+ show how to use some of the options.
+
+ \note The backend-specific configuration will be applied after the general
+ configuration. Using the backend-specific configuration to set a general
+ configuration option again will overwrite the general configuration option.
+
+ \sa backendConfig(), setBackendConfig()
+ */
+void QSslConfiguration::setBackendConfigOption(const QByteArray &name, const QVariant &value)
+{
+ d->backendConfig[name] = value;
+}
+
+/*!
+ \since 5.11
+
+ Sets or clears the backend-specific configuration.
+
+ Without a \a backendConfig parameter this function will clear the
+ backend-specific configuration. More information about the supported
+ options is available in the documentation of addBackendConfig().
+
+ \sa backendConfig(), setBackendConfigOption()
+ */
+void QSslConfiguration::setBackendConfig(const QMap<QByteArray, QVariant> &backendConfig)
+{
+ d->backendConfig = backendConfig;
+}
+
+/*!
\since 5.3
This function returns the protocol negotiated with the server