Remove unnecessary exception

This commit is contained in:
Dominik Schürmann 2014-10-08 18:33:01 +02:00
parent 0d6d4653b4
commit 3165f3ffa8
2 changed files with 4 additions and 9 deletions

View File

@ -72,12 +72,12 @@ public abstract class CanonicalizedKeyRing extends KeyRing {
return getPublicKey().getUnorderedUserIds();
}
public boolean isRevoked() throws PgpGeneralException {
public boolean isRevoked() {
// Is the master key revoked?
return getRing().getPublicKey().isRevoked();
}
public boolean isExpired() throws PgpGeneralException {
public boolean isExpired() {
// Is the master key expired?
Date creationDate = getRing().getPublicKey().getCreationTime();
Date expiryDate = getRing().getPublicKey().getValidSeconds() > 0

View File

@ -104,13 +104,8 @@ public class OpenPgpSignatureResultBuilder {
setUserIds(signingRing.getUnorderedUserIds());
// either master key is expired/revoked or this specific subkey is expired/revoked
try {
setKeyExpired(signingRing.isExpired() || signingKey.isExpired());
setKeyRevoked(signingRing.isRevoked() || signingKey.isRevoked());
} catch (PgpGeneralException e) {
Log.e(Constants.TAG, "shouldn't happen!");
setKeyRevoked(true);
}
}
public OpenPgpSignatureResult build() {