mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-27 06:42:05 +01:00
Fix equality check in CallbackBasedKeyringProtector
This commit is contained in:
parent
e661908c5f
commit
8c041e6856
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ public class CallbackBasedKeyringProtector implements SecretKeyRingProtector2 {
|
||||||
@Override
|
@Override
|
||||||
public PBESecretKeyEncryptor getEncryptor(PGPSecretKey key) throws PGPException {
|
public PBESecretKeyEncryptor getEncryptor(PGPSecretKey key) throws PGPException {
|
||||||
Passphrase passphrase = lookupPassphraseInCache(key);
|
Passphrase passphrase = lookupPassphraseInCache(key);
|
||||||
if (passphrase != null) {
|
if (passphrase == null) {
|
||||||
passphrase = callback.getPassphraseFor(key);
|
passphrase = callback.getPassphraseFor(key);
|
||||||
passphraseCache.put(key.getKeyID(), passphrase);
|
passphraseCache.put(key.getKeyID(), passphrase);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue