Don't use revoked keys

Check if keys are revoked when getting usable encryption keys. Only use keys which are not expired and not revoked.
This commit is contained in:
ogasser 2013-09-17 23:01:28 +02:00
parent 7f46c40eb8
commit f6d525da82

View File

@ -137,7 +137,7 @@ public class PgpKeyHelper {
PGPPublicKey masterKey = null;
for (int i = 0; i < encryptKeys.size(); ++i) {
PGPPublicKey key = encryptKeys.get(i);
if (!isExpired(key)) {
if (!isExpired(key) && !key.isRevoked()) {
if (key.isMasterKey()) {
masterKey = key;
} else {