Index: nselib/http.lua =================================================================== --- nselib/http.lua (revision 29483) +++ nselib/http.lua (working copy) @@ -105,7 +105,6 @@ local comm = require "comm" local coroutine = require "coroutine" local nmap = require "nmap" -local openssl = require "openssl" local os = require "os" local stdnse = require "stdnse" local string = require "string" @@ -113,8 +112,12 @@ local url = require "url" _ENV = stdnse.module("http", stdnse.seeall) ----Use ssl if we have it -local have_ssl = (nmap.have_ssl() and pcall(require, "openssl")) +if(nmap.have_ssl()) then + openssl = pcall(require, "openssl") + if(openssl) then + have_ssl = true + end +end local USER_AGENT = stdnse.get_script_args('http.useragent') or "Mozilla/5.0 (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)" local MAX_REDIRECT_COUNT = 5