Skip to content

Commit df7c172

Browse files
committed
PGP ops no longer require a key to be in date
1 parent 403296c commit df7c172

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/core/operations/PGP.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,16 @@ const PGP = {
9090
try {
9191
const key = await promisify(kbpgp.KeyManager.import_from_armored_pgp)({
9292
armored: privateKey,
93+
opts: {
94+
"no_check_keys": true
95+
}
9396
});
94-
if (key.is_pgp_locked() && passphrase) {
97+
if (key.is_pgp_locked()) {
9598
if (passphrase) {
9699
await promisify(key.unlock_pgp.bind(key))({
97100
passphrase
98101
});
99-
} else if (!passphrase) {
102+
} else {
100103
throw "Did not provide passphrase with locked private key.";
101104
}
102105
}
@@ -118,6 +121,9 @@ const PGP = {
118121
try {
119122
const key = await promisify(kbpgp.KeyManager.import_from_armored_pgp)({
120123
armored: publicKey,
124+
opts: {
125+
"no_check_keys": true
126+
}
121127
});
122128
return key;
123129
} catch (err) {

0 commit comments

Comments
 (0)