gnodet-bot commented on code in PR #31066:
URL: https://github.com/apache/camel/pull/31066#discussion_r4726319384
##########
core/camel-api/src/main/java/org/apache/camel/support/jsse/SSLContextClientParameters.java:
##########
@@ -54,6 +60,37 @@ public void setSniHostName(String sniHostName) {
this.sniHostNames.add(sniHostName);
}
+ /**
+ * Returns the endpoint identification algorithm that client sockets use
to check that the certificate of the server
+ * matches the host they connect to, or {@code null} if it is not set.
+ */
+ public @Nullable String getEndpointIdentificationAlgorithm() {
+ return endpointIdentificationAlgorithm;
+ }
+
+ /**
+ * Sets the endpoint identification algorithm, such as {@code HTTPS} or
{@code LDAPS}, that the client uses to check
+ * that the certificate of the server matches the host it connects to
(host name verification). It is applied to the
+ * {@code SSLSocket} instances that the {@code SSLSocketFactory} of the
context creates, which are client sockets.
+ * Unset by default, which keeps the behavior of the JDK: no host name
verification.
+ * <p>
+ * The JDK checks the host that the socket was created with, so a socket
that is created without one, and connected
+ * afterwards, fails the handshake. An {@code SSLEngine} starts in server
mode and is switched to client mode by the
+ * component, so this setting is not applied to engines: a component that
uses an {@code SSLEngine} applies it to
+ * the {@code SSLParameters} of the engine once it is in client mode, as
for its own host name verification option.
+ *
+ * @param endpointIdentificationAlgorithm the algorithm, or {@code null}
to not verify the host name
Review Comment:
⚠️ **Missing `@since` tag** — same as the getter above. Add `@since 4.24` as
the last tag in this Javadoc block.
```suggestion
* @param endpointIdentificationAlgorithm the algorithm, or {@code null}
to not verify the host name
* @since 4.24
*/
public void setEndpointIdentificationAlgorithm(@Nullable String
endpointIdentificationAlgorithm) {
```
##########
core/camel-api/src/main/java/org/apache/camel/support/jsse/SSLContextClientParameters.java:
##########
@@ -54,6 +60,37 @@ public void setSniHostName(String sniHostName) {
this.sniHostNames.add(sniHostName);
}
+ /**
+ * Returns the endpoint identification algorithm that client sockets use
to check that the certificate of the server
+ * matches the host they connect to, or {@code null} if it is not set.
+ */
+ public @Nullable String getEndpointIdentificationAlgorithm() {
+ return endpointIdentificationAlgorithm;
Review Comment:
⚠️ **Missing `@since` tag** — per the project conventions in `AGENTS.md`,
new public methods added to existing types in `core/camel-api` must carry a
`@since X.Y` tag documenting the Camel version they were introduced in. The
current snapshot is 4.24.0-SNAPSHOT, so the tag should be `@since 4.24`.
```suggestion
* Returns the endpoint identification algorithm that client sockets use
to check that the certificate of the server
* matches the host they connect to, or {@code null} if it is not set.
*
* @since 4.24
*/
public @Nullable String getEndpointIdentificationAlgorithm() {
```
--
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]