Expand Config to Configuration in method names
Commit f55c73ede28d4455f555a28e401407326ac9b954 added various backendConfig methods; API review for 5.11 pointed out that Config should not be abbreviated. Change-Id: I3b294b44a030b2a6e4cdd034fa27583c228dfe42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
f9131b0e17
commit
c0272f98df
@ -876,12 +876,12 @@ void QSslConfiguration::setDiffieHellmanParameters(const QSslDiffieHellmanParame
|
||||
|
||||
Returns the backend-specific configuration.
|
||||
|
||||
Only options set by addBackendConfig() or setBackendConfig() will be
|
||||
Only options set by addBackendConfiguration() or setBackendConfiguration() will be
|
||||
returned. The internal standard configuration of the backend is not reported.
|
||||
|
||||
\sa setBackendConfigOption(), setBackendConfig()
|
||||
\sa setBackendConfigurationOption(), setBackendConfiguration()
|
||||
*/
|
||||
QMap<QByteArray, QVariant> QSslConfiguration::backendConfig() const
|
||||
QMap<QByteArray, QVariant> QSslConfiguration::backendConfiguration() const
|
||||
{
|
||||
return d->backendConfig;
|
||||
}
|
||||
@ -902,9 +902,9 @@ QMap<QByteArray, QVariant> QSslConfiguration::backendConfig() const
|
||||
configuration. Using the backend-specific configuration to set a general
|
||||
configuration option again will overwrite the general configuration option.
|
||||
|
||||
\sa backendConfig(), setBackendConfig()
|
||||
\sa backendConfiguration(), setBackendConfiguration()
|
||||
*/
|
||||
void QSslConfiguration::setBackendConfigOption(const QByteArray &name, const QVariant &value)
|
||||
void QSslConfiguration::setBackendConfigurationOption(const QByteArray &name, const QVariant &value)
|
||||
{
|
||||
d->backendConfig[name] = value;
|
||||
}
|
||||
@ -914,13 +914,13 @@ void QSslConfiguration::setBackendConfigOption(const QByteArray &name, const QVa
|
||||
|
||||
Sets or clears the backend-specific configuration.
|
||||
|
||||
Without a \a backendConfig parameter this function will clear the
|
||||
Without a \a backendConfiguration parameter this function will clear the
|
||||
backend-specific configuration. More information about the supported
|
||||
options is available in the documentation of addBackendConfig().
|
||||
options is available in the documentation of addBackendConfiguration().
|
||||
|
||||
\sa backendConfig(), setBackendConfigOption()
|
||||
\sa backendConfiguration(), setBackendConfigurationOption()
|
||||
*/
|
||||
void QSslConfiguration::setBackendConfig(const QMap<QByteArray, QVariant> &backendConfig)
|
||||
void QSslConfiguration::setBackendConfiguration(const QMap<QByteArray, QVariant> &backendConfig)
|
||||
{
|
||||
d->backendConfig = backendConfig;
|
||||
}
|
||||
|
@ -150,9 +150,9 @@ public:
|
||||
QSslDiffieHellmanParameters diffieHellmanParameters() const;
|
||||
void setDiffieHellmanParameters(const QSslDiffieHellmanParameters &dhparams);
|
||||
|
||||
QMap<QByteArray, QVariant> backendConfig() const;
|
||||
void setBackendConfigOption(const QByteArray &name, const QVariant &value);
|
||||
void setBackendConfig(const QMap<QByteArray, QVariant> &backendConfig = QMap<QByteArray, QVariant>());
|
||||
QMap<QByteArray, QVariant> backendConfiguration() const;
|
||||
void setBackendConfigurationOption(const QByteArray &name, const QVariant &value);
|
||||
void setBackendConfiguration(const QMap<QByteArray, QVariant> &backendConfig = QMap<QByteArray, QVariant>());
|
||||
|
||||
static QSslConfiguration defaultConfiguration();
|
||||
static void setDefaultConfiguration(const QSslConfiguration &configuration);
|
||||
|
@ -245,7 +245,7 @@ QString QSslContext::errorString() const
|
||||
// static
|
||||
void QSslContext::applyBackendConfig(QSslContext *sslContext)
|
||||
{
|
||||
if (sslContext->sslConfiguration.backendConfig().isEmpty())
|
||||
if (sslContext->sslConfiguration.backendConfiguration().isEmpty())
|
||||
return;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
@ -255,7 +255,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
|
||||
q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
|
||||
q_SSL_CONF_CTX_set_flags(cctx.data(), SSL_CONF_FLAG_FILE);
|
||||
|
||||
const auto &backendConfig = sslContext->sslConfiguration.backendConfig();
|
||||
const auto &backendConfig = sslContext->sslConfiguration.backendConfiguration();
|
||||
for (auto i = backendConfig.constBegin(); i != backendConfig.constEnd(); ++i) {
|
||||
if (!i.value().canConvert(QMetaType::QByteArray)) {
|
||||
sslContext->errorCode = QSslError::UnspecifiedError;
|
||||
|
@ -922,7 +922,7 @@ void QSslSocket::setSslConfiguration(const QSslConfiguration &configuration)
|
||||
d->configuration.peerVerifyDepth = configuration.peerVerifyDepth();
|
||||
d->configuration.peerVerifyMode = configuration.peerVerifyMode();
|
||||
d->configuration.protocol = configuration.protocol();
|
||||
d->configuration.backendConfig = configuration.backendConfig();
|
||||
d->configuration.backendConfig = configuration.backendConfiguration();
|
||||
d->configuration.sslOptions = configuration.d->sslOptions;
|
||||
d->configuration.sslSession = configuration.sessionTicket();
|
||||
d->configuration.sslSessionTicketLifeTimeHint = configuration.sessionTicketLifeTimeHint();
|
||||
|
@ -4016,12 +4016,12 @@ void tst_QSslSocket::signatureAlgorithm()
|
||||
SslServer server;
|
||||
server.protocol = serverProtocol;
|
||||
server.config.setCiphers({QSslCipher("ECDHE-RSA-AES256-SHA")});
|
||||
server.config.setBackendConfigOption(QByteArrayLiteral("SignatureAlgorithms"), serverSigAlgPairs.join(':'));
|
||||
server.config.setBackendConfigurationOption(QByteArrayLiteral("SignatureAlgorithms"), serverSigAlgPairs.join(':'));
|
||||
QVERIFY(server.listen());
|
||||
|
||||
QSslConfiguration clientConfig = QSslConfiguration::defaultConfiguration();
|
||||
clientConfig.setProtocol(clientProtocol);
|
||||
clientConfig.setBackendConfigOption(QByteArrayLiteral("SignatureAlgorithms"), clientSigAlgPairs.join(':'));
|
||||
clientConfig.setBackendConfigurationOption(QByteArrayLiteral("SignatureAlgorithms"), clientSigAlgPairs.join(':'));
|
||||
QSslSocket client;
|
||||
client.setSslConfiguration(clientConfig);
|
||||
socket = &client;
|
||||
|
Loading…
x
Reference in New Issue
Block a user