From c4e3e2782144f87032e1c374c0c30bcad84e6b70 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 13 Dec 2021 13:28:34 +0100 Subject: [PATCH] Fix replacePassphrase(secretKeys, passphrase) --- .../key/protection/CachingSecretKeyRingProtector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/protection/CachingSecretKeyRingProtector.java b/pgpainless-core/src/main/java/org/pgpainless/key/protection/CachingSecretKeyRingProtector.java index a939c8af..d5b05613 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/protection/CachingSecretKeyRingProtector.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/protection/CachingSecretKeyRingProtector.java @@ -128,7 +128,7 @@ public class CachingSecretKeyRingProtector implements SecretKeyRingProtector, Se Iterator keys = keyRing.getPublicKeys(); while (keys.hasNext()) { PGPPublicKey publicKey = keys.next(); - addPassphrase(publicKey, passphrase); + replacePassphrase(publicKey.getKeyID(), passphrase); } }