开发者

Openssl s_client and HERE documents

All, I'm attempting to create a bash shell script that uses openssl to do an https query for me (/dev/tcp and wget are unavailable) along the lines of:

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


EOF

If I do the command line by hand, typing in the request, it works as expected and I see t开发者_如何学Gohe correct HTML. However, if I run it from inside of a shell script I am not getting an HTTP document back from the server. Any thoughts?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜