From 2bbba36fbb9c4c19692a52db6dc2bd08fea1e6de Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 30 Nov 2017 19:31:56 +0000 Subject: [PATCH] Allow limited use of VNC lib without openssl --- nselib/vnc.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nselib/vnc.lua b/nselib/vnc.lua index 1df546809..929f82f45 100644 --- a/nselib/vnc.lua +++ b/nselib/vnc.lua @@ -157,9 +157,6 @@ VNC = { --- Connects the VNC socket connect = function(self) - if ( not(HAVE_SSL) ) then - return false, "The VNC module requires OpenSSL support" - end return self.socket:connect(self.host, self.port, "tcp") end, @@ -729,6 +726,14 @@ VNC = { end } +if not HAVE_SSL then + local login_unsupported = function() + return false, "Login type unsupported without OpenSSL" + end + VNC.login_vncauth = login_unsupported + VNC.login_tls = login_unsupported +end + local unittest = require "unittest" if not unittest.testing() then return _ENV