<div dir="ltr">Sorted; needed to call SSL_CTX_set_tmp_ecdh with my private EC_KEY.  Can someone express an opinion if using my private key is acceptable there, or if I should generate a new one from a named curve each time I create a context?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Cheers,<div>--B</div></div></div></div>
<br><div class="gmail_quote">On Fri, Nov 13, 2015 at 11:21 AM, Benn Bollay <span dir="ltr"><<a href="mailto:benn.bollay@gmail.com" target="_blank">benn.bollay@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi folks -<div><br></div><div>Tested against OpenSSL 1.0.1f and 1.0.1p (but with modifications).</div><div><br></div><div>I've got some code that creates an SSL_CTX (<a href="http://pastebin.com/XveDvvch" target="_blank">http://pastebin.com/XveDvvch</a>) that works fine for negotiating ECDHE-* ciphers as a client when talking to an s_server, but fails as a server both when accepting connections from itself or from s_client with a no shared cipher error.</div><div><br></div><div>You can download a full package to reproduce the issue at <a href="http://www.magitech.org/gambit/ecdhetest.tar.gz" target="_blank">http://www.magitech.org/gambit/ecdhetest.tar.gz</a></div><div><br></div><div>







<p><span>You can run the test by using make:</span></p>
<p><span>  $ make all</span></p>
<p><span>  $ make s_server &<span>       </span># Run’s OpenSSL s_server in the background</span></p>
<p><span>  $ make t_client<span>     </span><span>       </span># Runs the client - should be able to see the handshake complete on the server’s log window.</span></p>
<p><span>  $ make t_server &<span>       </span><span>       </span># After killing the s_server, start up the test server</span></p>
<p><span>  $ make s_client<span>     </span><span>       </span># Fails to negotiate.</span></p><p><span>Any suggestions?</span></p></div><div><div><div><div dir="ltr">Cheers,<div>--B</div></div></div></div>
</div></div>
</blockquote></div><br></div>