lib/rex/socket/parameters.rb in rex-socket-0.1.7 vs lib/rex/socket/parameters.rb in rex-socket-0.1.8
- old
+ new
@@ -146,10 +146,26 @@
rescue ::Exception => e
elog("Failed to read cert: #{e.class}: #{e}", LogSource)
end
end
+ if (hash['SSLClientCert'] and ::File.file?(hash['SSLClientCert']))
+ begin
+ self.ssl_client_cert = ::File.read(hash['SSLClientCert'])
+ rescue ::Exception => e
+ elog("Failed to read client cert: #{e.class}: #{e}", LogSource)
+ end
+ end
+
+ if (hash['SSLClientKey'] and ::File.file?(hash['SSLClientKey']))
+ begin
+ self.ssl_client_key = ::File.read(hash['SSLClientKey'])
+ rescue ::Exception => e
+ elog("Failed to read client key: #{e.class}: #{e}", LogSource)
+ end
+ end
+
if hash['Proxies']
self.proxies = hash['Proxies'].split(',').map{|a| a.strip}.map{|a| a.split(':').map{|b| b.strip}}
end
# The protocol this socket will be using
@@ -351,13 +367,19 @@
# Enables SSL/TLS-level compression
# @return [Bool]
attr_accessor :ssl_compression
#
- # The SSL context verification mechanism
+ # The client SSL certificate
#
+ attr_accessor :ssl_client_cert
+ #
+ # The client SSL key
+ #
+ attr_accessor :ssl_client_key
+ #
+ # SSL certificate verification mode for SSL context
attr_accessor :ssl_verify_mode
-
#
# Whether we should use IPv6
# @return [Bool]
attr_accessor :v6