mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Don't run openssl-requiring tests if openssl isn't present.
This commit is contained in:
@@ -465,6 +465,8 @@ end
|
|||||||
|
|
||||||
test_suite = unittest.TestSuite:new()
|
test_suite = unittest.TestSuite:new()
|
||||||
|
|
||||||
|
-- Crypto tests require OpenSSL
|
||||||
|
if HAVE_SSL then
|
||||||
local _ = "ignored"
|
local _ = "ignored"
|
||||||
|
|
||||||
local object = DigestMD5:new('Digest realm="test", domain="/HTTP/Digest",\z
|
local object = DigestMD5:new('Digest realm="test", domain="/HTTP/Digest",\z
|
||||||
@@ -503,5 +505,6 @@ test_suite:add_test(unittest.keys_equal(
|
|||||||
domain='/HTTP/Digest',
|
domain='/HTTP/Digest',
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
end
|
||||||
|
|
||||||
return _ENV;
|
return _ENV;
|
||||||
|
|||||||
@@ -792,6 +792,8 @@ if not unittest.testing() then
|
|||||||
end
|
end
|
||||||
|
|
||||||
test_suite = unittest.TestSuite:new()
|
test_suite = unittest.TestSuite:new()
|
||||||
|
-- Crypto tests require OpenSSL
|
||||||
|
if HAVE_SSL then
|
||||||
local test_vectors = {
|
local test_vectors = {
|
||||||
-- from John the Ripper's vnc_fmt_plug.c
|
-- from John the Ripper's vnc_fmt_plug.c
|
||||||
-- pass, challenge, response
|
-- pass, challenge, response
|
||||||
@@ -821,5 +823,6 @@ for _, v in ipairs(test_vectors) do
|
|||||||
test_suite:add_test(unittest.equal(
|
test_suite:add_test(unittest.equal(
|
||||||
VNC:encryptVNCDES(v[1], v[2]), v[3]), v[1])
|
VNC:encryptVNCDES(v[1], v[2]), v[3]), v[1])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return _ENV
|
return _ENV
|
||||||
|
|||||||
Reference in New Issue
Block a user