diff --git a/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts b/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts index 7db33d4cb16..4f0bc1e5c8a 100644 --- a/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts +++ b/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts @@ -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"; @@ -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; } } diff --git a/package-lock.json b/package-lock.json index 0d743316bd4..2be4178254c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,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", @@ -4298,9 +4298,9 @@ "link": true }, "node_modules/@bitwarden/sdk-internal": { - "version": "0.2.0-main.38", - "resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.38.tgz", - "integrity": "sha512-bkN+BZC0YA4k0To8QiT33UTZX8peKDXud8Gzq3UHNPlU/vMSkP3Wn8q0GezzmYN3UNNIWXfreNCS0mJ+S51j/Q==", + "version": "0.2.0-main.47", + "resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.47.tgz", + "integrity": "sha512-alISSoMpAEJD/4+vwjv8kwK4/skd+yqA8pXjZJqMlkVSnp1rtT0ZN+6TC91WmHsJTjjjDwt7DrT8YOkCuwmdnQ==", "license": "GPL-3.0" }, "node_modules/@bitwarden/vault": { diff --git a/package.json b/package.json index 10799b9e451..7c1af569387 100644 --- a/package.json +++ b/package.json @@ -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",