#!/bin/sh
set -eu
: "${TLS_HOST:?set the owned TLS peer hostname}"
: "${TLS_PORT:?set the peer port}"
: "${CA_FILE:?set the approved CA bundle}"
openssl version -a
openssl list -providers
openssl s_client -connect "$TLS_HOST:$TLS_PORT" -servername "$TLS_HOST"   -CAfile "$CA_FILE" -verify_return_error -verify_hostname "$TLS_HOST" </dev/null
# This tests the TLS peer; validate the exact CMVP module and environment too.
