Skip to content

Commit

Permalink
Fix exception description
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan committed Mar 22, 2023
1 parent 59433f7 commit d89d07c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static PublicKey parsePublicKey(byte[] keyBytes)
}
// special handling for PKCS1 (rsa) public key
if ((section == null) || (section.getContent() == null)) {
throw new InvalidKeySpecException("Invalid key");
throw new InvalidKeySpecException("Invalid key, empty section");
}
if (section.getType().equals("RSA PUBLIC KEY")) {
ASN1Sequence sequence = ASN1Sequence.getInstance(section.getContent());
Expand Down

0 comments on commit d89d07c

Please sign in to comment.