Skip to content

Backport hostname verification to 4.x.x #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

acogoluegnes
Copy link
Contributor

This PR is a backport of #398 to 4.x.x. It also adds support for TLS hostname verification with HostnameVerifier (for Java 6).

Hostname verification isn't performed by default in the TLS handshake,
this commit makes it easier to enable server hostname verification for
both blocking and non-blocking IO modes.

References #394

(cherry picked from commit fcc3dbb)

Conflicts:
	src/main/java/com/rabbitmq/client/ConnectionFactory.java
	src/test/java/com/rabbitmq/client/test/ChannelRpcTimeoutIntegrationTest.java
This is a solution for Java 6. For Java 7 and more, setting the server
validation algorithm on the SSLParameters is more appropriate.

This commit tries to make the activation of hostname verification as
simpler as possible for the developer. The client detects it's running
on Java 6 and sets up the hostname verifier from the Commons
HttpClient project (it's still possible to provide a customer
HostnameVerifier). The client uses the SSLParameters solution if
possible.

References #394
@michaelklishin michaelklishin merged commit f16cf1f into 4.x.x-stable Aug 24, 2018
@acogoluegnes acogoluegnes deleted the rabbitmq-java-client-394-tls-hostname-verification-4.x.x branch March 21, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants