janhoy commented on a change in pull request #139:
URL: https://github.com/apache/solr/pull/139#discussion_r637278099



##########
File path: solr/core/src/java/org/apache/solr/security/JWTAuthPlugin.java
##########
@@ -199,6 +237,28 @@ public void init(Map<String, Object> pluginConfig) {
     lastInitTime = Instant.now();
   }
 
+  /**
+   * Tries for find X509 certificates in the input stream in DER or PEM format.
+   * Supports multiple certs in same stream if multiple PEM certs are 
concatenated.
+   * @param trustedCertsStream input stream with the contents of either PEM 
(plaintext) or DER (binary) certs
+   * @return collection of found certificates, else throws exception
+   */
+  static Collection<X509Certificate> parsePemToX509Certs(InputStream 
trustedCertsStream) {

Review comment:
       Good idea - moving to CryptoKeys and generalizing a bit




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to