Openssl s_client docs and HERE

That's it, I'm trying to create a bash script shell that uses openssl to execute an https request for me (/ dev / tcp and wget are not available) line by line:

openssl s_client -connect xxx.xxx.xxx.xxx:port <<EOF
GET / HTTP/1.1
Connection: close
...more http here...


EOF

If I execute the command line manually by typing a query, it works as expected and I see the correct HTML. However, if I run it from within the shell script, I do not receive the HTTP document from the server. Any thoughts?

+3
source share
1 answer

I wonder if that helps -ign_eof. The original problem is described at http://www.mail-archive.com/ openssl-users@openssl.org /msg02926.html (note that this is very old) and this switch seems to work.

+4
source

All Articles