Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PUX SSH PR to use SDK #12478

Draft
wants to merge 2 commits into
base: tools/PM-10938/1pux-ssh-key-import
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { LoginView } from "@bitwarden/common/vault/models/view/login.view";
import { PasswordHistoryView } from "@bitwarden/common/vault/models/view/password-history.view";
import { SecureNoteView } from "@bitwarden/common/vault/models/view/secure-note.view";
import { SshKeyView } from "@bitwarden/common/vault/models/view/ssh-key.view";
import { import_ssh_key } from "@bitwarden/sdk-internal";

import { ImportResult } from "../../models/import-result";
import { BaseImporter } from "../base-importer";
Expand Down Expand Up @@ -323,10 +324,11 @@ export class OnePassword1PuxImporter extends BaseImporter implements Importer {
}
} else if (cipher.type === CipherType.SshKey) {
if (valueKey === "sshKey") {
const { privateKey, metadata } = field.value.sshKey;
cipher.sshKey.privateKey = privateKey;
cipher.sshKey.publicKey = metadata.publicKey;
cipher.sshKey.keyFingerprint = metadata.fingerprint;
const { privateKey } = field.value.sshKey;
const sshKey = import_ssh_key(privateKey);
cipher.sshKey.privateKey = sshKey.private_key;
cipher.sshKey.publicKey = sshKey.public_key;
cipher.sshKey.keyFingerprint = sshKey.key_fingerprint;
return;
}
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"@angular/platform-browser": "17.3.12",
"@angular/platform-browser-dynamic": "17.3.12",
"@angular/router": "17.3.12",
"@bitwarden/sdk-internal": "0.2.0-main.38",
"@bitwarden/sdk-internal": "0.2.0-main.47",
"@electron/fuses": "1.8.0",
"@koa/multer": "3.0.2",
"@koa/router": "13.1.0",
Expand Down
Loading