Skip to content

Commit 982b88f

Browse files
committed
Add comments
Signed-off-by: Arthur Chan <[email protected]>
1 parent 249e551 commit 982b88f

File tree

1 file changed

+2
-0
lines changed
  • sigstore-java/src/main/java/dev/sigstore/encryption

1 file changed

+2
-0
lines changed

sigstore-java/src/main/java/dev/sigstore/encryption/Keys.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public static PublicKey parsePublicKey(byte[] keyBytes)
7474
throw new InvalidKeySpecException("Invalid key, could not parse PEM section");
7575
}
7676
// special handling for PKCS1 (rsa) public key
77+
// TODO: The length checking is not necessary after https://github.com/bcgit/bc-java/issues/1370
78+
// has been merged. Remove it when bc-java is updated with the merge.
7779
if ((section == null) || (section.getContent() == null) || (section.getContent().length == 0)) {
7880
throw new InvalidKeySpecException("Invalid key, empty PEM section");
7981
}

0 commit comments

Comments
 (0)