Check this way:
HOST="example.org"; \
PORT="443"; \
openssl s_client \
-connect ${HOST}:${PORT} \
-verify_hostname ${HOST} \
-verify_return_error \
< /dev/null 2> /dev/null
See also:
openssl-s_client.1ossl: SSL/TLS client program | openssl Commands | Man Pages | ManKier