<div dir="ltr"><div><div><div>Looking at the, er, documentation:<br><br><div style="margin-left:40px">/* constant table enumerating all implemented SSL 2 and 3 cipher suites. */<br>SSL_IMPORT const PRUint16 SSL_ImplementedCiphers[];<br><br>/* the same as the above, but is a function */<br>SSL_IMPORT const PRUint16 *SSL_GetImplementedCiphers(void);<br><br>/* number of entries in the above table. */<br>SSL_IMPORT const PRUint16 SSL_NumImplementedCiphers;<br><br>/* the same as the above, but is a function */<br>SSL_IMPORT PRUint16 SSL_GetNumImplementedCiphers(void);<br></div><br></div> I suspect that will return something like:<br><br>    TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256<br><br></div>Otoh, if there is something we can call we'll be able to clean up our crypto a bit by dropping the #ifdefs and instead probing everything at runtime.  If nothing else, only enable algorithms if their test passes.<br><br></div>Andrew<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 March 2016 at 11:38, Paul Wouters <span dir="ltr"><<a href="mailto:paul@nohats.ca" target="_blank">paul@nohats.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The function to check for cryptographic algorithms in NSS appararently<br>
is the function SSL_GetImplementedCiphers()<br>
<br>
Eg, we need to use that so see if we have CHACHA20/POLY1305 support in<br>
the future. Probably we also need it to test for various CCM algos<br>
needed to support IoT devices that we know aren't all in NSS yet.<br>
<br>
Paul<br>
<br>
_______________________________________________<br>
Swan-dev mailing list<br>
<a href="mailto:Swan-dev@lists.libreswan.org" target="_blank">Swan-dev@lists.libreswan.org</a><br>
<a href="https://lists.libreswan.org/mailman/listinfo/swan-dev" rel="noreferrer" target="_blank">https://lists.libreswan.org/mailman/listinfo/swan-dev</a><br>
</blockquote></div><br></div>