Add SSH Key support in Bitwarden Importer#13107
Open
chmod222 wants to merge 6 commits into
Open
Conversation
varjolintu
reviewed
Mar 8, 2026
| if (!publicKey.isEmpty() && !privateKey.isEmpty()) { | ||
| auto baseName = QString("id"); | ||
|
|
||
| if (publicKey.startsWith("ssh-ed25519 ")) { |
Member
There was a problem hiding this comment.
It should be enough to check the strings like this? And without the spaces.
if (publicKey.startsWith("ssh-ed25519") ...
if (publicKey.startsWith("ssh-rsa") || publicKey.startsWith("ssh-sha2") ...
if (publickey.startsWith("ecdsa-sha2") ...
if (publickey.startsWith("ssh-dss") ...
Member
There was a problem hiding this comment.
Why the space at the end of the string?
48fdc08 to
bceba82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12778 by adding support for SSH-Key attributes in Bitwarden JSON imports.
If an entry that contains an SSH-Key attribute is imported, the importer code turns it into two attachment files for the public and private key parts, with some light attempt at naming them somewhat sensibly being done. If no key type can be determined, fall back on the default names of "id" and "id.pub".
If KeePassXC is compiled with SSH-Agent support, such SSH-Key entries automatically have their private key attachments enabled as the coresponding private keys and are added to the agent.
(No generative AI was used in the creation of this code)
(It's been a while since I wrote Qt/C++ in anger, feel free to critique the heck out of my code style)
Testing strategy
Type of change