lib/ronin/network/ssl.rb in ronin-support-0.4.0.rc1 vs lib/ronin/network/ssl.rb in ronin-support-0.4.0.rc2

- old
+ new

@@ -1,7 +1,7 @@ # -# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com) +# Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com) # # This file is part of Ronin Support. # # Ronin Support is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published @@ -171,14 +171,11 @@ # sock.each_line { |line| puts line } # end # # @api public # - def ssl_session(host,port) - ssl_socket = ssl_connect(host,port) - - yield ssl_socket if block_given? - + def ssl_session(host,port,options={},&block) + ssl_socket = ssl_connect(host,port,options,&block) ssl_socket.close return nil end end end