1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 00:49:01 +00:00

Add an example of testing for the availability of the openssl module in

nselib/openssl.luadoc.
This commit is contained in:
david
2008-10-16 17:04:06 +00:00
parent 1f726dd386
commit 16052f05e5

View File

@@ -2,6 +2,19 @@
-- \n\n
-- This module is a wrapper for OpenSSL functions that provide encryption and
-- decryption, hashing, and multiprecision integers.
-- \n\n
-- The openssl module may not always be available--it depends on whether
-- OpenSSL support was enabled at compile time. Scripts using the module should
-- be made to fail gracefully using code like the following:
-- \n\n
-- if not pcall(require, "openssl") then
-- action = function(host, port)
-- stdnse.print_debug(2, "Skipping \"%s\" because OpenSSL is missing.", id)
-- end
-- end
-- action = action or function(host, port)
-- ...
-- end
-- @author Sven Klemm <sven@c3d2.de>
-- @copyright See nmaps COPYING for licence