mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-26 07:30:53 -04:00
SSH Agent: Fix handling of encrypted RSA keys
Also fix multiple UI issues caused by said keys. Fixes #1560
This commit is contained in:
parent
97a890e8a0
commit
b0a61f437a
4 changed files with 52 additions and 26 deletions
|
@ -94,6 +94,10 @@ int OpenSSHKey::keyLength() const
|
|||
|
||||
const QString OpenSSHKey::fingerprint() const
|
||||
{
|
||||
if (m_publicData.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
QByteArray publicKey;
|
||||
BinaryStream stream(&publicKey);
|
||||
|
||||
|
@ -115,6 +119,10 @@ const QString OpenSSHKey::comment() const
|
|||
|
||||
const QString OpenSSHKey::publicKey() const
|
||||
{
|
||||
if (m_publicData.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
QByteArray publicKey;
|
||||
BinaryStream stream(&publicKey);
|
||||
|
||||
|
@ -326,7 +334,7 @@ bool OpenSSHKey::openPrivateKey(const QString& passphrase)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (passphrase.length() == 0) {
|
||||
if (passphrase.isEmpty()) {
|
||||
m_error = tr("Passphrase is required to decrypt this key");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue