Ayush0612005 commented on code in PR #31066:
URL: https://github.com/apache/camel/pull/31066#discussion_r4726576055
##########
core/camel-api/src/main/java/org/apache/camel/support/jsse/SSLContextClientParameters.java:
##########
@@ -54,6 +60,42 @@ 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.
+ *
+ * @since 4.24
+ */
+ 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 name that the socket connects to: the host
given to {@code createSocket}, or the host of
+ * the {@code InetSocketAddress} given to {@code connect}. Connecting to
an IP address, or to an {@code InetAddress}
+ * without a host name, fails the handshake unless the certificate lists
that address. 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
+ * @since 4.24
Review Comment:
The alignment comes from the formatter: after a `@param` tag it aligns
`@since` with the parameter description, as in `CamelContext.java:905` and
`Exchange.java:421`, so a single space would be reformatted by the build.
`SignatureSchemesParameters` and `NamedGroupsParameters` have no `@param`
before `@since`.
_Claude Code on behalf of Ayush0612005_
--
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]