Correctly add customize_hostname_check to ssl options (backport #15184)#15185
Merged
michaelklishin merged 2 commits intov4.2.xfrom Dec 24, 2025
Merged
Correctly add customize_hostname_check to ssl options (backport #15184)#15185michaelklishin merged 2 commits intov4.2.xfrom
customize_hostname_check to ssl options (backport #15184)#15185michaelklishin merged 2 commits intov4.2.xfrom
Conversation
Follow-up to #11344 Prior to this fix, the `customize_hostname_check` option was incorrectly added to the general options passed to `httpc:request`, which results in the following error when the request is made: ``` [debug] <0.1.0> Enabling wildcard-aware hostname verification for HTTP client connections [notice] <0.1.0> Invalid option {customize_hostname_check, [notice] <0.1.0> [{match_fun,#Fun<public_key.6.112534691>}]} ignored [notice] <0.1.0> ``` With this fix, you can see that `customize_hostname_check` is added to the `ssl` section of the options: ``` 1> redbug:start("rabbit_auth_backend_http:ssl_options->return"). ... ... ... % rabbit_auth_backend_http:ssl_options/0 -> [{ssl, [{customize_hostname_check, [{match_fun, #Fun<public_key.6.112534691>}]}, {versions, ['tlsv1.3','tlsv1.2', 'tlsv1.1',tlsv1]}, {hibernate_after,6000}, {keyfile, "key.pem"}, {depth,10}, {crl_check,false}, {certfile, "certificate.pem"}, {cacertfile, "ca_certificate.pem"}, {fail_if_no_peer_cert,false}, {verify,verify_peer}]}] ``` (cherry picked from commit 4360e05) # Conflicts: # deps/rabbitmq_auth_backend_http/src/rabbit_auth_backend_http.erl
Author
|
Cherry-pick of 4360e05 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Follow-up to #11344 Prior to this fix, the `customize_hostname_check` option was incorrectly added to the general options passed to `httpc:request`, which results in the following error when the request is made: ``` [debug] <0.1.0> Enabling wildcard-aware hostname verification for HTTP client connections [notice] <0.1.0> Invalid option {customize_hostname_check, [notice] <0.1.0> [{match_fun,#Fun<public_key.6.112534691>}]} ignored [notice] <0.1.0> ``` With this fix, you can see that `customize_hostname_check` is added to the `ssl` section of the options: ``` 1> redbug:start("rabbit_auth_backend_http:ssl_options->return"). ... ... ... % rabbit_auth_backend_http:ssl_options/0 -> [{ssl, [{customize_hostname_check, [{match_fun, #Fun<public_key.6.112534691>}]}, {versions, ['tlsv1.3','tlsv1.2', 'tlsv1.1',tlsv1]}, {hibernate_after,6000}, {keyfile, "key.pem"}, {depth,10}, {crl_check,false}, {certfile, "certificate.pem"}, {cacertfile, "ca_certificate.pem"}, {fail_if_no_peer_cert,false}, {verify,verify_peer}]}] ``` (cherry picked from commit 4360e05)
Collaborator
|
Backported manually to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #11344
Prior to this fix, the
customize_hostname_checkoption was incorrectly added to the general options passed tohttpc:request, which results in the following error when the request is made:With this fix, you can see that
customize_hostname_checkis added to thesslsection of the options: