<div dir="ltr">You are right of course. I handle HTTP myself. A TLS connection example will suffice.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 30, 2019 at 7:53 PM Viktor Dukhovni <<a href="mailto:openssl-users@dukhovni.org">openssl-users@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Mar 30, 2019 at 04:02:55PM +0100, Ivan Medoedov wrote:<br>
<br>
> I've only managed to find this, but it seems to do too much for what I need:<br>
> <br>
> <a href="https://wiki.openssl.org/index.php/SSL/TLS_Client" rel="noreferrer" target="_blank">https://wiki.openssl.org/index.php/SSL/TLS_Client</a><br>
> <br>
> Basically I need something like Go's http.Get("<a href="https://mysite.com/version" rel="noreferrer" target="_blank">https://mysite.com/version</a>")<br>
> to just get a one line of text from the server.<br>
> <br>
> I can't use libcurl, I have to use pure openssl.<br>
<br>
OpenSSL is NOT an HTTPS (client or server) library.  OpenSSL can<br>
establish a TLS connection, but does not implement anything like<br>
"http.Get".  That's what libcurl and the like are for.<br>
<br>
If you're willing to roll your own HTTP client code, then you<br>
can use OpenSSL for the TLS part of the HTTPS transaction.<br>
<br>
HTTP clients handle all sorts of complications over and above TLS:<br>
<br>
    * Proxies<br>
    * Redirects<br>
    * Client requests with bodies<br>
    * Authentication<br>
    * Chunked transfer encoding<br>
    * Content encoding (e.g. gzip)<br>
    * Cookies<br>
    ...<br>
<br>
None of these are in scope for OpenSSL.<br>
<br>
-- <br>
        Viktor.<br>
</blockquote></div>