1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 19:38:00 +01:00

Use more standards compliant way to determine if secret key is encrypted

This commit is contained in:
Paul Schaub 2021-04-07 21:14:07 +02:00
parent ed43d3c6a9
commit d082f126b3

View file

@ -307,7 +307,7 @@ public class KeyRingInfo {
public boolean isFullyDecrypted() { public boolean isFullyDecrypted() {
if (isSecretKey()) { if (isSecretKey()) {
for (PGPSecretKey secretKey : getSecretKeys()) { for (PGPSecretKey secretKey : getSecretKeys()) {
if (secretKey.getKeyEncryptionAlgorithm() != SymmetricKeyAlgorithm.NULL.getAlgorithmId()) { if (secretKey.getS2KUsage() != 0) {
return false; return false;
} }
} }