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(); return getPublicKey().getUnorderedUserIds();
} }
public boolean isRevoked() throws PgpGeneralException { public boolean isRevoked() {
// Is the master key revoked? // Is the master key revoked?
return getRing().getPublicKey().isRevoked(); return getRing().getPublicKey().isRevoked();
} }
public boolean isExpired() throws PgpGeneralException { public boolean isExpired() {
// Is the master key expired? // Is the master key expired?
Date creationDate = getRing().getPublicKey().getCreationTime(); Date creationDate = getRing().getPublicKey().getCreationTime();
Date expiryDate = getRing().getPublicKey().getValidSeconds() > 0 Date expiryDate = getRing().getPublicKey().getValidSeconds() > 0

View File

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