<div dir="ltr"><div>Sure, working up Gambit's built-in OpenSSL API integration to work as a client for ordinary usecases, works.</div><div><br></div><div>The outcome will be something like ~5,000-10,000 lines of integration code, that requires some degree of continuous maintenance. For comparison, LibCurl's integration is in the range 3600 - 7000 lines, <a href="https://github.com/curl/curl/blob/master/lib/vtls/openssl.c" target="_blank">https://github.com/<wbr>curl/curl/blob/master/lib/<wbr>vtls/openssl.c</a> <a href="https://github.com/curl/curl/blob/master/lib/vtls/vtls.c" target="_blank">https://github.<wbr>com/curl/curl/blob/master/lib/<wbr>vtls/vtls.c</a> <a href="https://github.com/curl/curl/blob/master/lib/vtls/schannel.c" target="_blank">https://github.<wbr>com/curl/curl/blob/master/lib/<wbr>vtls/schannel.c</a> .</div><div><br></div><div><br></div><div>Please remember that SSL domain validation only is the tip of the iceberg though, in such a way that in particular for server usecases and also for more sophisticated client usecases, OpenSSL's unending quirks (and very low code quality) lead you to need an application-level solution anyhow.</div><div><br></div><div>(</div><div>I suggest SSL domain name validation is only the tip of the iceberg, you'll want to</div><div> * negotiate the right ciphers with the right settings,</div><div> * configure exact TLS/SSL versions supported,</div><div> * cap TSL renegotiation ability,</div><div> * in server mode deliver more TLS certificates on the same TLS server (IP),</div><div> * read certificates from binary blobs and generate local certificates,</div><div> * and then finally someone will like to do a non-TSL handshake/warmup before the TLS takes over, or do TLS over something else than a TCP port.</div><div>)</div><div><br></div><div><br></div><div>On my TODO is to implement a proof of concept application layer ports for Gambit. After reading _io.scm a couple of times and talking to Vyzo about it, I was struck with a sense of confidence that I could actually do it heh.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-16 1:09 GMT+08:00 Dimitris Vyzovitis <span dir="ltr"><<a href="mailto:vyzo@hackzen.org" target="_blank">vyzo@hackzen.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Seems that it's a matter of using SSL_CTX_set_verify on the tls context, with SSL_VERIFY_PEER.<br></div>See <a href="https://wiki.openssl.org/index.php/Manual:SSL_CTX_set_verify(3)" target="_blank">https://wiki.openssl.org/<wbr>index.php/Manual:SSL_CTX_set_<wbr>verify(3)</a><br><br></div>-- vyzo<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 15, 2017 at 2:33 PM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Clearly something has to be done! I didn’t write that code, so perhaps someone with more experience with OpenSSL should take a look at it.<br>
<span class="m_-7527684061106868616HOEnZb"><font color="#888888"><br>
Marc<br>
</font></span><div class="m_-7527684061106868616HOEnZb"><div class="m_-7527684061106868616h5"><br>
<br>
<br>
> On Nov 15, 2017, at 4:17 AM, Dimitris Vyzovitis <<a href="mailto:vyzo@hackzen.org" target="_blank">vyzo@hackzen.org</a>> wrote:<br>
><br>
> Marc,<br>
><br>
> It seems that the TLS stack is completely lacking client-side server<br>
> certificate validation. There are now two open issues on github (#200<br>
> and #312 which I just opened).<br>
><br>
> This is a real security problem, as not having certificate validation<br>
> defeats the whole purpose of TLS.<br>
><br>
> Can we do something about it?<br>
><br>
> -- vyzo<br>
><br>
<br>
</div></div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-<wbr>list</a><br>
<br></blockquote></div><br></div>