1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-23 03:54:49 +02: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() {
if (isSecretKey()) {
for (PGPSecretKey secretKey : getSecretKeys()) {
if (secretKey.getKeyEncryptionAlgorithm() != SymmetricKeyAlgorithm.NULL.getAlgorithmId()) {
if (secretKey.getS2KUsage() != 0) {
return false;
}
}