diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index c2d7f2fd0..99efc4111 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -367,7 +367,7 @@ void LanLinkProvider::encrypted() LanDeviceLink::ConnectionStarted connectionOrigin = (socket->mode() == QSslSocket::SslClientMode)? LanDeviceLink::Locally : LanDeviceLink::Remotely; NetworkPacket* receivedPacket = m_receivedIdentityPackets[socket].np; - const QString& deviceId = receivedPacket->get(QStringLiteral("deviceId")); + const QString& deviceId = socket->peerCertificate().subjectDisplayName(); if (m_links.contains(deviceId) && m_links[deviceId]->certificate() != socket->peerCertificate()) { socket->disconnectFromHost();