I'm accessing a SSL-protected web-service.
On the one hand, if I access this web-service with openssl s_client
, copying the relevant http POST request from a file html-request
, I get a HTTP/1.1 200 OK
response.
On the other hand, if I set up the SSL-Layer with stunnel
(listening on local port 1443 and forwarding the encrypted traffic to the server) and then use
cat html-request | nc localhost 1443
the server responds with HTTP/1.1 400 Bad Request
.
I assumed that both tools to not pre-process the content from the html-request
-file. But this assumption seems to be wrong - otherwise I would get the same response in both cases.
Two questions:
1) how do openssl s_tunnel
and nc
differ in processing the input data from html-request
?
2) is there a way to get a hexdump of the unencrypted traffic from openssl s_client
, considering that I use Elliptic Curve private keys (so wireshark is unable to decrypt the traffic)? The -debug option seems to dump the encrypted traffic.