Skip to content

Commit

Permalink
FIX(server): Validate the correct certifiacte from a clients chain
Browse files Browse the repository at this point in the history
While validating a clients certifiacte, the last certifiacte in the clients chain was used. The last certifiacte is the certifiacte of the CA. Since in this place, the clients own certifiacte should be validated, the first certifiacte in the chain needs to be used instead.

Fixes mumble-voip#3523 (partially)
  • Loading branch information
EPNW-Eric committed Jun 20, 2021
1 parent 31d0e8e commit cda34be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/murmur/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ void Server::encrypted() {

QList< QSslCertificate > certs = uSource->peerCertificateChain();
if (!certs.isEmpty()) {
const QSslCertificate &cert = certs.last();
const QSslCertificate &cert = certs.first();
uSource->qslEmail = cert.subjectAlternativeNames().values(QSsl::EmailEntry);
uSource->qsHash = QString::fromLatin1(cert.digest(QCryptographicHash::Sha1).toHex());
if (!uSource->qslEmail.isEmpty() && uSource->bVerified) {
Expand Down

0 comments on commit cda34be

Please sign in to comment.