#!/usr/bin/env bash

# shellcheck shell=bash

# ``````````````````````````````````````````````````````````````````````````````
# Function name: DomainScanSsllabs()
#
# Description:
#   Scan domain with ssllabs tool.
#
# Usage:
#   DomainScanSsllabs domain
#
# Examples:
#   DomainScanSsllabs example.com
#

function DomainScanSsllabs() {

  # shellcheck disable=SC2034
  local _FUNCTION_ID="DomainScanSsllabs"
  local _STATE=0

  local _host="$1"

  # shellcheck disable=SC2034
  _scan_type="passive"

  # shellcheck disable=SC2034
  _destination_host="$_host"

  local _ssllabs_desc="Deep analysis of the ssl configuration:"
        _ssllabs_desc+="https://www.ssllabs.com/ssltest/"

  local _ssllabs_cmd="eval ssllabs-scan $SSLLABS_OPT \"$_host\""

  _msg_args+=(\
              "$_ssllabs_desc")

  _cmd_args+=(\
              "$_ssllabs_cmd")

  return $_STATE

}
