SSH Agent: Show MD5 fingerprint of keys

Fixes #2050
This commit is contained in:
Toni Spets 2018-07-14 15:42:28 +03:00 committed by Jonathan White
parent 470a74ee24
commit 07efabed03
4 changed files with 27 additions and 6 deletions

View file

@ -412,7 +412,11 @@ void EditEntryWidget::updateSSHAgentKeyInfo()
}
if (!key.fingerprint().isEmpty()) {
m_sshAgentUi->fingerprintTextLabel->setText(key.fingerprint());
m_sshAgentUi->fingerprintTextLabel->setText(
key.fingerprint(QCryptographicHash::Md5) +
"\n" +
key.fingerprint(QCryptographicHash::Sha256)
);
} else {
m_sshAgentUi->fingerprintTextLabel->setText(tr("(encrypted)"));
}
@ -596,7 +600,11 @@ void EditEntryWidget::decryptPrivateKey()
m_sshAgentUi->commentTextLabel->setText(tr("n/a"));
}
m_sshAgentUi->fingerprintTextLabel->setText(key.fingerprint());
m_sshAgentUi->fingerprintTextLabel->setText(
key.fingerprint(QCryptographicHash::Md5) +
"\n" +
key.fingerprint(QCryptographicHash::Sha256)
);
m_sshAgentUi->publicKeyEdit->document()->setPlainText(key.publicKey());
m_sshAgentUi->copyToClipboardButton->setEnabled(true);
}