0

I would like to store an HTTP request in a variable and then use it with OpenSSL

I now have

HTTP_REQUEST="HEAD / HTTP/1.1\\nHost: ${HOST_HEADER}\\nUser-Agent: check_ssl_cert/${VERSION}\\nConnection: close\\n\\n"

and then

echo -e '${HTTP_REQUEST}' | openssl s_client -connect ${HOST}:${PORT} ${SERVERNAME} -status 2> /dev/null | grep -A 17 'OCSP response:'

echo e is not POSIX. Is there an alternative?

Matteo
  • 9,796
  • 4
  • 51
  • 66

0 Answers0