Fix renewed SSL certificates being incorrectly reported as expired
authorShane Kearns <shane.kearns@accenture.com>
Fri, 6 Jan 2012 16:29:43 +0000 (16:29 +0000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 6 Jan 2012 18:24:23 +0000 (19:24 +0100)
commitca5072fb185a75e2c9ef25fd19a56cbe41128b0a
tree3daf03233746895266c77a48dab4bdbb7623180c
parentc87bf2e8e63bed112456e8c5a501728fd093a4e6
Fix renewed SSL certificates being incorrectly reported as expired

OpenSSL tries certificates in the order they are added to the store.
There was logic to add the expired certificates after the valid ones
to ensure the valid certificate is checked first if the OS cert store
contains both the expired and renewed version of the same cert (e.g.
the verisign class 3 cert on windows)

However due to a coding error, the ordering was reversed, ensuring the
problem is always encountered instead of always avoided.

Task-number: QTBUG-20012
Change-Id: I7c8dba8a09842540a22b44d33c7dcb22bbbc6a58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
src/network/ssl/qsslsocket_openssl.cpp