gnodet-bot commented on code in PR #30315:
URL: https://github.com/apache/camel/pull/30315#discussion_r4609500796


##########
components/camel-cyberark-vault/src/main/java/org/apache/camel/component/cyberark/vault/client/ConjurClientFactory.java:
##########
@@ -133,16 +135,17 @@ public static ConjurClient createWithToken(String url, 
String account, String au
     /**
      * Create the SSL context for the HTTPS connections to Conjur, from the 
verifySsl and certificatePath options.
      *
+     * @param  camelContext             the Camel context, to load a 
classpath: resource
      * @param  verifySsl                whether to verify the certificate and 
the host name of the server. When false,
      *                                  any server is trusted and the 
certificate path is not used.
-     * @param  certificatePath          the path of a file with the 
certificates (PEM or DER) to trust instead of the
-     *                                  default trust store of the JVM, for 
example the certificate of a private CA, or
-     *                                  null
+     * @param  certificatePath          the file with the certificates (PEM or 
DER) to trust instead of the default
+     *                                  trust store of the JVM, for example 
the certificate of a private CA, or null. A
+     *                                  path of the file system, or a resource 
with the file: or classpath: prefix.
      * @return                          the SSL context, or null to use the 
default SSL context of the JVM
      * @throws IOException              if the certificate file cannot be read
      * @throws GeneralSecurityException if the file has no certificate, or the 
SSL context cannot be created
      */
-    public static SSLContext createSslContext(boolean verifySsl, String 
certificatePath)
+    public static SSLContext createSslContext(CamelContext camelContext, 
boolean verifySsl, String certificatePath)

Review Comment:
   ⚠️ **Public API break — upgrade guide needed**
   
   `createSslContext` was `public static` before this PR (external code could 
call `ConjurClientFactory.createSslContext(verifySsl, path)`). Adding 
`CamelContext` as the first parameter is a source-incompatible change.
   
   While external callers of this internal-ish factory are unlikely, Camel's 
convention is to document such breaks in the upgrade guide 
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc`). 
Consider adding a brief entry like:
   
   ```
   === camel-cyberark-vault
   The `ConjurClientFactory.createSslContext` method now takes a `CamelContext` 
as its first parameter, to support `classpath:` and `file:` prefixes for 
`certificatePath`.
   ```
   
   Alternatively, if this method is not intended for external use, consider 
making it package-private.



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

Reply via email to