adutra commented on code in PR #1318:
URL: https://github.com/apache/polaris/pull/1318#discussion_r2031115724
##########
service/common/src/main/java/org/apache/polaris/service/auth/PemUtils.java:
##########
@@ -46,9 +45,38 @@ private static byte[] parsePEMFile(Path pemPath) throws
IOException {
throw new FileNotFoundException(
String.format("The file '%s' doesn't exist.",
pemPath.toAbsolutePath()));
}
- try (PemReader reader = new PemReader(Files.newBufferedReader(pemPath,
UTF_8))) {
- PemObject pemObject = reader.readPemObject();
Review Comment:
One general remark: the original `readPemObject()` method, in principle,
only reads the first object in the PEM file:
https://downloads.bouncycastle.org/java/docs/bcprov-jdk18on-javadoc/org/bouncycastle/util/io/pem/PemReader.html#readPemObject()
With your changes, what happens when the PEM file contains more than one
object? And what if it doesn't contain any? It might be good to add tests for
these cases as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]