mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-12 05:58:07 -05:00
Remove unnecessary exception
This commit is contained in:
parent
0d6d4653b4
commit
3165f3ffa8
@ -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
|
||||||
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user