We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeed68e commit 249e551Copy full SHA for 249e551
sigstore-java/src/test/java/dev/sigstore/encryption/KeysTest.java
@@ -186,8 +186,11 @@ void parseTufPublicKey_rsa()
186
}
187
188
@Test
189
- void parsePublicKeyBad()
+ void parsePublicKey_failOnNullSection()
190
throws IOException, NoSuchAlgorithmException, NoSuchProviderException {
191
+ // This unit test is used to test the fix for a bug discovered by oss-fuzz
192
+ // The bug happens when a malformed byte array is passed to the method
193
+ // https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=57247
194
byte[] byteArray = "-----BEGIN A-----\nBBBBB-----END A".getBytes(StandardCharsets.UTF_8);
195
Assertions.assertThrows(InvalidKeySpecException.class, () -> Keys.parsePublicKey(byteArray));
196
0 commit comments