Commit 063ad1c8 authored by Antonio Larrosa's avatar Antonio Larrosa Committed by Richard J. Moore
Browse files

Don't include by default ciphers that are not supported


There could be cases (mostly when compiled on old systems, since modern
openssl versions don't include such insecure ciphers) in which
defaultCiphers included a cipher that wasn't in the supported ciphers
list. With this patch we make sure that defaultCiphers is a subset of
supportedCiphers

Change-Id: I545ea21f5fd3a6ed13b366cdd56a1393233f9fc9
Reviewed-by: default avatarRichard J. Moore <rich@kde.org>
parent 5fe0e41e
Branches
Tags
No related merge requests found
Showing with 5 additions and 3 deletions
...@@ -643,10 +643,12 @@ void QSslSocketPrivate::resetDefaultCiphers() ...@@ -643,10 +643,12 @@ void QSslSocketPrivate::resetDefaultCiphers()
// Unconditionally exclude ADH and AECDH ciphers since they offer no MITM protection // Unconditionally exclude ADH and AECDH ciphers since they offer no MITM protection
if (!ciph.name().toLower().startsWith(QLatin1String("adh")) && if (!ciph.name().toLower().startsWith(QLatin1String("adh")) &&
!ciph.name().toLower().startsWith(QLatin1String("exp-adh")) && !ciph.name().toLower().startsWith(QLatin1String("exp-adh")) &&
!ciph.name().toLower().startsWith(QLatin1String("aecdh"))) !ciph.name().toLower().startsWith(QLatin1String("aecdh"))) {
ciphers << ciph; ciphers << ciph;
if (ciph.usedBits() >= 128)
defaultCiphers << ciph; if (ciph.usedBits() >= 128)
defaultCiphers << ciph;
}
} }
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment