The smallest minimal example of an HTTPS GET request with openssl
Porter, Andrew
Andrew_Porter at bmc.com
Sun Mar 31 15:43:03 UTC 2019
You would have to ignore some initial certificate info output but some variation on
echo "GET /version" | openssl s_client -connect test.example.com -crlf -ign_eof -quiet
would be as pure OpenSSL as you can get…
Andrew
From: openssl-users [mailto:openssl-users-bounces at openssl.org] On Behalf Of Ivan Medoedov
Sent: Saturday, March 30, 2019 08:03
To: openssl-users at openssl.org
Subject: [EXTERNAL] The smallest minimal example of an HTTPS GET request with openssl
Hello,
I've only managed to find this, but it seems to do too much for what I need:
https://wiki.openssl.org/index.php/SSL/TLS_Client<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.openssl.org_index.php_SSL_TLS-5FClient&d=DwMFaQ&c=UrUhmHsiTVT5qkaA4d_oSzcamb9hmamiCDMzBAEwC7E&r=rM-xapYCunnmjke6suxLaVU8krc3wfCZvRQxfT87RRc&m=n8RqUrz6Ov5TrW2POn-Srsvd_sQFaz4rbCfMwfYOShM&s=dV4FDjsLprTO1x56rJ6EycpvjEe2Q6WiTDsX35rNkjk&e=>
Basically I need something like Go's http.Get("https://mysite.com/version<https://urldefense.proofpoint.com/v2/url?u=https-3A__mysite.com_version&d=DwMFaQ&c=UrUhmHsiTVT5qkaA4d_oSzcamb9hmamiCDMzBAEwC7E&r=rM-xapYCunnmjke6suxLaVU8krc3wfCZvRQxfT87RRc&m=n8RqUrz6Ov5TrW2POn-Srsvd_sQFaz4rbCfMwfYOShM&s=C23QKTnwylYwT5PT_ziC5NcbdioKu1wSXQWiE0B-nHE&e=>") to just get a one line of text from the server.
I can't use libcurl, I have to use pure openssl.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190331/1d9e51c7/attachment-0001.html>
More information about the openssl-users
mailing list