Skip to content

Commit d3887ad

Browse files
author
Tom Maher
committed
add :default for tls_options
1 parent a4ffa7a commit d3887ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/net/ldap.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,11 @@ def normalize_encryption(args)
13521352
{ method: :simple_tls,
13531353
tls_options: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS }
13541354
elsif args.is_a? Hash
1355-
args
1355+
if args[:tls_options].to_sym == :default
1356+
args.merge(tls_options: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS)
1357+
else
1358+
args
1359+
end
13561360
else
13571361
case method = args.to_s.to_sym
13581362
when :simple_tls, :start_tls

0 commit comments

Comments
 (0)