Skip to content

Commit 13ca7c9

Browse files
author
Jerry Cheung
committed
encryption defaults empty :tls_options
1 parent e59543b commit 13ca7c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/net/ldap/connection.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ def self.wrap_with_ssl(io, tls_options = {})
8989
# generously contributing the :start_tls path.
9090
#++
9191
def setup_encryption(args)
92+
args[:tls_options] ||= {}
9293
case args[:method]
9394
when :simple_tls
94-
@conn = self.class.wrap_with_ssl(@conn, args.fetch(:tls_options, {}))
95+
@conn = self.class.wrap_with_ssl(@conn, args[:tls_options])
9596
# additional branches requiring server validation and peer certs, etc.
9697
# go here.
9798
when :start_tls

0 commit comments

Comments
 (0)