Cerr:

> Hi There,
> 
> I would like to open a session to an open ssl http server on port 443
> without any manual keyboard entry.
> 
> I've tried the following:
> cat ./logininfo | openssl s_client -connect 192.168.167.166:443
> where logininfo contains
> GET / HTTP/1.1
> host: hostname.com
> Authorization: BASIC YWRtaW46YWRtaW4=
> if entered manually, this is logging me in succesfully but how can i
> automate this procedure?

You are claiming HTTP/1.1 compliance when, obviously, you don't support
HTTP/1.1. To the extent that this ever works, it's entirely by luck. What
happens if the server replies using chunked encoding?

That said, most likely your specific problem is that your line endings are
not HTTP/1.1 compliant (you need a \r\n on the end of each line and an extra
\r\n to mark the end of the request headers). However, there are many other
things that could go wrong and if they aren't, it's purely by luck.

Another thing that works by pure luck -- if the 'Authorization' header were
'Quthorization', you would quickly discover that s_client is not intended
for real work but purely as a testing tool.

DS



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to