Index: scripts/ssl-enum-ciphers.nse =================================================================== --- scripts/ssl-enum-ciphers.nse (revision 33754) +++ scripts/ssl-enum-ciphers.nse (working copy) @@ -160,16 +160,17 @@ -- Create socket. local specialized = sslcert.getPrepareTLSWithoutReconnect(port) if specialized then - local status - status, sock = specialized(host, port) + local status, result = specialized(host, port) if not status then - ctx_log(1, t.protocol, "Can't connect: %s", err) + ctx_log(1, t.protocol, "Can't connect: %s", result) return nil + else + sock = result end else sock = nmap.new_socket() sock:set_timeout(timeout) - local status = sock:connect(host, port) + local status, err = sock:connect(host, port) if not status then ctx_log(1, t.protocol, "Can't connect: %s", err) sock:close() Index: scripts/ssl-poodle.nse =================================================================== --- scripts/ssl-poodle.nse (revision 33754) +++ scripts/ssl-poodle.nse (working copy) @@ -84,16 +84,17 @@ -- Create socket. local specialized = sslcert.getPrepareTLSWithoutReconnect(port) if specialized then - local status - status, sock = specialized(host, port) + local status, result = specialized(host, port) if not status then - ctx_log(1, t.protocol, "Can't connect: %s", err) + ctx_log(1, t.protocol, "Can't connect: %s", result) return nil + else + sock = result end else sock = nmap.new_socket() sock:set_timeout(timeout) - local status = sock:connect(host, port) + local status, err = sock:connect(host, port) if not status then ctx_log(1, t.protocol, "Can't connect: %s", err) sock:close()