diff options
Diffstat (limited to 'src/Connection.cpp')
-rw-r--r-- | src/Connection.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Connection.cpp b/src/Connection.cpp index 88e0bcd00..e3a8c1d3b 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -228,11 +228,13 @@ quint16 Connection::localPort() const { } QList< QSslCertificate > Connection::peerCertificateChain() const { - const QSslCertificate cert = qtsSocket->peerCertificate(); - if (cert.isNull()) - return QList< QSslCertificate >(); - else - return qtsSocket->peerCertificateChain() << cert; + // The documentation of QSslSocket::peerCertificateChain() actually says nothing + // about the order of the certificates in the chain. The sentence in this functions + // documentation is taken from QSslConfiguration::peerCertificateChain(). + // Through tests and by looking into Qt's source code it was validated, + // that these two functions do the same thing. + // See mumble-voip/mumble#5280 for more information. + return qtsSocket->peerCertificateChain(); } QSslCipher Connection::sessionCipher() const { |