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)
589
589
# :tls_options => { :ca_file => "/etc/cafile.pem", :ssl_version => "TLSv1_1" }
590
590
# }
591
591
def encryption ( args )
592
- case args
592
+ return if args . nil?
593
+
594
+ case method = args . to_sym
593
595
when :simple_tls , :start_tls
594
- args = { :method => args , :tls_options => { } }
596
+ args = { :method => method , :tls_options => { } }
595
597
end
596
598
@encryption = args
597
599
end
Original file line number Diff line number Diff line change @@ -64,4 +64,10 @@ def test_obscure_auth
64
64
@subject . auth "joe_user" , password
65
65
assert_not_include ( @subject . inspect , password )
66
66
end
67
+
68
+ def test_encryption
69
+ enc = @subject . encryption ( 'start_tls' )
70
+
71
+ assert_equal enc [ :method ] , :start_tls
72
+ end
67
73
end
You can’t perform that action at this time.
0 commit comments