File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -589,9 +589,11 @@ def authenticate(username, password)
589589 # :tls_options => { :ca_file => "/etc/cafile.pem", :ssl_version => "TLSv1_1" }
590590 # }
591591 def encryption ( args )
592- case args
592+ return if args . nil?
593+
594+ case method = args . to_sym
593595 when :simple_tls , :start_tls
594- args = { :method => args , :tls_options => { } }
596+ args = { :method => method , :tls_options => { } }
595597 end
596598 @encryption = args
597599 end
Original file line number Diff line number Diff line change @@ -64,4 +64,10 @@ def test_obscure_auth
6464 @subject . auth "joe_user" , password
6565 assert_not_include ( @subject . inspect , password )
6666 end
67+
68+ def test_encryption
69+ enc = @subject . encryption ( 'start_tls' )
70+
71+ assert_equal enc [ :method ] , :start_tls
72+ end
6773end
You can’t perform that action at this time.
0 commit comments