Module ssllabs
Lua module for the Qualys SSL Labs Server Test
Info:
- Copyright: 2018
- License: MIT
- Author: imo
Functions
info () | Check availability of the SSL Labs servers and some other data like software version. |
analyze (opts) | Invoke assessment and check progress. |
get_endpoint_data (opts) | Retrieve detailed endpoint information. |
get_status_codes () | Retrieve known status codes. |
get_root_certs_raw () | Retrieve root certificates. |
Functions
- info ()
-
Check availability of the SSL Labs servers
and some other data like software version. Implements the info API call
Returns:
Usage:
local info = ssllabs.info()
- analyze (opts)
-
Invoke assessment and check progress.
This call is used to initiate an assessment, or to retrieve the status of an assessment in progress or in the cache. Implements the analyze API call
Parameters:
- opts options table with arguments
- host string hostname
- publish
string or boolean
if set to
'on'
ortrue
the result will be published ont he public result boards. (default 'off') - startNew
string or boolean
if set to
'on'
ortrue
a new assessment is started. However, if there's already an assessment in progress, its status is delivered instead. (default 'off') - fromCache
string or boolean
if set to
'on'
ortrue
cached assessment reports will be returned. (default 'on') - maxAge
number
maximum report age, in hours, if retrieving from cache (
fromCache
parameter set). (optional) - all
string
by default this call results only summaries of individual endpoints. If this parameter is set to
on
, full information will be returned. If set todone
, full information will be returned only if the assessment is complete (status isREADY
orERROR
). (default 'done') - ignoreMismatch
string or boolean
set to
on
to proceed with assessments even when the server certificate doesn't match the assessment hostname. Please note that this parameter is ignored if a cached report is returned. (default 'off')
Returns:
Usage:
local result = ssllabs.analyze({ host = 'example.com', fromCache = true, maxAge = 36 })
- opts options table with arguments
- get_endpoint_data (opts)
-
Retrieve detailed endpoint information.
This call is used to retrieve detailed endpoint information. Implements the getEndpointData API call
Parameters:
- opts options table with arguments
Returns:
Usage:
local ep_data = ssllabs.get_endpoint_data()
- get_status_codes ()
-
Retrieve known status codes.
Returns:
Usage:
local code = ssllabs.get_status_codes()
- get_root_certs_raw ()
-
Retrieve root certificates.
Returns:
-
string
This call returns the root certificates used for trust validation.
Usage:
local certs = ssllabs.get_root_certs_raw()