#!/usr/bin/env bash

# shellcheck shell=bash

# ``````````````````````````````````````````````````````````````````````````````
# Function name: DomainScanTestssl()
#
# Description:
#   Test SSL protocols and ciphers with testssl.sh.
#
# Usage:
#   DomainScanTestssl domain
#
# Examples:
#   DomainScanTestssl example.com
#

function DomainScanTestssl() {

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

  local _host="$1"

  # shellcheck disable=SC2034
  _scan_type="active"

  # shellcheck disable=SC2034
  _destination_host="$_host"

  local _testssl_desc="Test ssl protocols and ciphers:"
        _testssl_desc+="https://testssl.sh/"

  local _testssl_cmd="eval testssl.sh $TESTSSL_OPT \"$_host\""

  _msg_args+=(\
              "$_testssl_desc")

  _cmd_args+=(\
              "$_testssl_cmd")

  return $_STATE

}
