Skip to content

Commit 4f26d4c

Browse files
committed
Merge branch 'pgpainless-fixClassCastExceptionMisplacedBindingSig'
2 parents ac1856d + 62b0d50 commit 4f26d4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pg/src/main/java/org/bouncycastle/openpgp/api/OpenPGPCertificate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ else if (signature.getSignatureType() == PGPSignature.PRIMARYKEY_BINDING)
19491949
throw new IncorrectOpenPGPSignatureException(this, "Key Signature is not correct.");
19501950
}
19511951
}
1952-
catch (PGPException e)
1952+
catch (PGPException | ClassCastException e)
19531953
{
19541954
this.isCorrect = false;
19551955
throw new PGPSignatureException("Key Signature could not be verified.", e);
@@ -1982,7 +1982,7 @@ protected void verifyUserIdSignature(OpenPGPComponentKey issuer,
19821982
throw new IncorrectOpenPGPSignatureException(this, "UserID Signature is not correct.");
19831983
}
19841984
}
1985-
catch (PGPException e)
1985+
catch (PGPException | ClassCastException e)
19861986
{
19871987
this.isCorrect = false;
19881988
throw new PGPSignatureException("UserID Signature could not be verified.", e);
@@ -2015,7 +2015,7 @@ protected void verifyUserAttributeSignature(OpenPGPComponentKey issuer,
20152015
throw new IncorrectOpenPGPSignatureException(this, "UserAttribute Signature is not correct.");
20162016
}
20172017
}
2018-
catch (PGPException e)
2018+
catch (PGPException | ClassCastException e)
20192019
{
20202020
this.isCorrect = false;
20212021
throw new PGPSignatureException("Could not verify UserAttribute Signature.", e);

0 commit comments

Comments
 (0)