prmoore77 commented on code in PR #38461:
URL: https://github.com/apache/arrow/pull/38461#discussion_r1381957485
##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/utils/ClientAuthenticationUtils.java:
##########
@@ -235,6 +235,57 @@ public static InputStream getCertificateStream(final
String keyStorePath,
return getSingleCertificateInputStream(keyStore);
}
+ /**
+ * Generates an {@link InputStream} that contains certificates for path-based
+ * TLS Root Certificates.
+ *
+ * @param tlsRootsCertificatesPath The path of the TLS Root Certificates.
+ * @return a new {code InputStream} containing the certificates.
+ * @throws GeneralSecurityException on error.
+ * @throws IOException on error.
+ */
+ public static InputStream getTlsRootCertificatesStream(final String
tlsRootsCertificatesPath)
+ throws GeneralSecurityException, IOException {
+ Preconditions.checkNotNull(tlsRootsCertificatesPath, "TLS Root
certificates path cannot be null!");
+
+ return Files
+
.newInputStream(Paths.get(Preconditions.checkNotNull(tlsRootsCertificatesPath)));
Review Comment:
Good point. I copied the approach from:
https://github.com/apache/arrow/blob/cd6e63570f81e96375a4c51ef5d925b5f32f5a57/java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/utils/ClientAuthenticationUtils.java#L225
- should we remove there also?
--
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]