mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-05 03:41:07 +01:00
Fix exception when changing passphrase of key with stripped component key
Fixes https://github.com/pgpainless/pgpainless/discussions/489\#discussioncomment-14796176
This commit is contained in:
parent
3f7b4920f4
commit
a9cee6f45c
1 changed files with 6 additions and 0 deletions
|
|
@ -65,6 +65,12 @@ class S2KUsageFix {
|
||||||
"Missing passphrase for key with ID " + java.lang.Long.toHexString(keyId))
|
"Missing passphrase for key with ID " + java.lang.Long.toHexString(keyId))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// skip stripped secret keys
|
||||||
|
if (key.isPrivateKeyEmpty) {
|
||||||
|
keyList.add(key)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
val privateKey = key.unlock(protector)
|
val privateKey = key.unlock(protector)
|
||||||
// This constructor makes use of USAGE_SHA1 by default
|
// This constructor makes use of USAGE_SHA1 by default
|
||||||
val fixedKey =
|
val fixedKey =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue