On Fri, Feb 01, 2013 at 03:22:11PM +0000, Viktor Dukhovni wrote: > On Fri, Feb 01, 2013 at 01:46:46PM +0000, Nathan Smyth wrote: > > > Is it possible to have null, untrusted, or shared certificates, > > to simplify deployment for apps that don't care about SSL? > > Absolutely. On all servers that don't require client certificates > (can't ask for client certs when using an anonymous ciphersuite) > enable anonymous ciphers, using an appropriate configuration > parameter that invokes SSL_CTX_set_cipher_list(). A sensible cipher > list for OpenSSL 1.x is: > > aNULL:-aNULL:ALL:!EXPORT:!LOW:!SSLv2:@STRENGTH >
One more thing, since anonymous ciphers do ephemeral Diffie-Hellman ephemeral Elliptic Curve DH key exchange, you must provide ECDHE and EDH callbacks in the server code to select a prime/generator (g = 2 as a rule) pair for DH, or a named curve for EC. This also gives you forward secrecy even with certificates, so you should have these in either case. DH: See documentation for SSL_CTX_set_tmp_dh_callback() EC: if ((nid = OBJ_sn2nid(curve)) == NID_undef) /* error unsupported curve */ if ((ecdh = EC_KEY_new_by_curve_name(nid)) == 0 || SSL_CTX_set_tmp_ecdh(server_ctx, ecdh) == 0) /* some other error */ -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org