summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorRichard J. Moore <rich@kde.org>2015-02-08 11:38:18 +0000
committerDaniel Molkentin <daniel@molkentin.de>2015-02-08 20:47:52 +0000
commit31e85dc2a1ca6d79f758093bef8b47d6627c208b (patch)
tree4bb6e49f5f589b0e350432938c88d3b52446c8f7 /src/network
parent9f59341d070c62e6dbf8d1d06593ca72beaf9811 (diff)
Remove unnecessary direct access to SSL_CIPHER struct.
The cipher is always valid here, so this check was never needed anyway. Change-Id: I22be273d166702926b98f0c9443657a1dde65f6e Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 42befc64fa..7cadf3e0a6 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -646,15 +646,13 @@ void QSslSocketPrivate::resetDefaultCiphers()
STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
- if (cipher->valid) {
- QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
- if (!ciph.isNull()) {
- // Unconditionally exclude ADH ciphers since they offer no MITM protection
- if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
- ciphers << ciph;
- if (ciph.usedBits() >= 128)
- defaultCiphers << ciph;
- }
+ QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
+ if (!ciph.isNull()) {
+ // Unconditionally exclude ADH ciphers since they offer no MITM protection
+ if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
+ ciphers << ciph;
+ if (ciph.usedBits() >= 128)
+ defaultCiphers << ciph;
}
}
}