Remove &~ bit-clearing method in favor of defaults.

For some reason the OP_ALL & ~OP_NO_COMPRESSION method doesnt work,
but it is late and the default is false anyways.
bug/bundler_fix
Joe Vennix 2013-11-19 23:42:58 -06:00
parent 109fc5a834
commit a8c55f23a7
2 changed files with 4 additions and 9 deletions

View File

@ -89,10 +89,8 @@ begin
self.sslctx.ciphers = params.ssl_cipher
end
if params.ssl_compression
self.sslctx.options = self.sslctx.options & ~OpenSSL::SSL::OP_NO_COMPRESSION
else
self.sslctx.options = self.sslctx.options | OpenSSL::SSL::OP_NO_COMPRESSION
if not params.ssl_compression
self.sslctx.options |= OpenSSL::SSL::OP_NO_COMPRESSION
end
# Set the verification callback

View File

@ -136,13 +136,10 @@ module Rex::Socket::SslTcpServer
ctx = OpenSSL::SSL::SSLContext.new()
ctx.key = key
ctx.cert = cert
ctx.options = 0
# enable/disable the SSL/TLS-level compression
if params.ssl_compression
# ctx.options &= ~OpenSSL::SSL::OP_NO_COMPRESSION
else
ctx.options = OpenSSL::SSL::OP_ALL
if not params.ssl_compression
ctx.options |= OpenSSL::SSL::OP_NO_COMPRESSION
end