Skip to content

TLS1.3 support for out_http #4859

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/fluent/plugin/out_http.rb
Original file line number Diff line number Diff line change
@@ -270,7 +270,8 @@ def setup_http_option
OpenSSL::SSL::VERIFY_PEER
end
opt[:ciphers] = @tls_ciphers
opt[:ssl_version] = @tls_version
opt[:min_version] = Fluent::TLS::METHODS_MAP[@tls_version]
opt[:max_version] = Fluent::TLS::METHODS_MAP[@tls_version]
end

opt
2 changes: 1 addition & 1 deletion lib/fluent/tls.rb
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ module TLS
MIN_MAX_AVAILABLE = false
map
end
private_constant :METHODS_MAP
# private_constant :METHODS_MAP

# Helper for old syntax/method support:
# ruby 2.4 uses ssl_version= but this method is now deprecated.
2 changes: 2 additions & 0 deletions test/plugin/test_out_http.rb
Original file line number Diff line number Diff line change
@@ -501,6 +501,7 @@ def server_config
# WEBrick supports self-generated self-signed certificate
config[:SSLEnable] = true
config[:SSLCertName] = [["CN", WEBrick::Utils::getservername]]
config[:SSLMaxVersion] = OpenSSL::SSL::TLS1_3_VERSION
config
end

@@ -512,6 +513,7 @@ def test_write_with_https
d = create_driver(%[
endpoint https://127.0.0.1:#{server_port}/test
tls_verify_mode none
tls_version TLSv1_3
ssl_timeout 2s
])
d.run(default_tag: 'test.http') do