lib/ronin/network/ssl.rb in ronin-support-0.4.1 vs lib/ronin/network/ssl.rb in ronin-support-0.5.0.rc1
- old
+ new
@@ -20,11 +20,10 @@
require 'ronin/network/tcp'
begin
require 'openssl'
rescue ::LoadError
- $stderr.puts "WARNING: Ruby was not compiled with OpenSSL support"
end
module Ronin
module Network
#
@@ -98,12 +97,10 @@
# the new SSL Socket.
#
# @example
# socket = ssl_connect('twitter.com',443)
#
- # @see http://rubydoc.info/stdlib/openssl/OpenSSL/SSL/SSLSocket
- #
# @api public
#
def ssl_connect(host,port,options={})
local_host = options[:local_host]
local_port = options[:local_port]
@@ -166,15 +163,13 @@
#
# @return [nil]
#
# @example
# ssl_session('twitter.com',443) do |sock|
- # sock.write("GET / HTTP/1.1\n\r\n\r")
+ # sock.write("GET /\n\n")
#
# sock.each_line { |line| puts line }
# end
- #
- # @see http://rubydoc.info/stdlib/openssl/OpenSSL/SSL/SSLSocket
#
# @api public
#
def ssl_session(host,port,options={},&block)
ssl_socket = ssl_connect(host,port,options,&block)