Hi Reyk

On 11.07.2014, at 17:29, Reyk Floeter <[email protected]> wrote:

> On Wed, Jul 02, 2014 at 01:34:51PM +0200, Markus Gebert wrote:
>> I hope this is the right mailing list to publish a patch. If not,
>> please let me know where to place it or how I should get in contact
>> with the relayd maintainer(s).
>> 
>> I've added some new SSL features and config options to relayd that we
>> needed at work:
>> 
>> - ssl edh params "value"
>>  -> allows to control the use of OpenSSL built-in DH params. With
>>     them, relayd is now able to use EDH/DHE ciphers. They are the
>>     only option to provide forward secrecy for older clients.
>> 
>> - ssl [no] cipher-server-preference
>>  -> allows the admin to control SSL_OP_CIPHER_SERVER_PREFERENCE to be
>>     able to force some cipher preferences on clients (i.e. to prefer
>>     ciphers that provide forward secrecy).
>> 
>> - ssl [no] client-renegotiation
>>  -> allows the interception of ("secure") client initiated
>>     renegotioations, which are considered a risk in DDoS scenarios
>>     because many CPU cycles can be burned this way on a single TCP
>>     connection without an obvious way for the administrator to 
>>     immediately know what's happening.
>> 
>> 
>> The patch was originally written against the FreeBSD port of relayd, but
>> since all the changes should be easily portable to OpenBSD and it makes
>> sense to add the features upstream, I recreated the patch so that it
>> applies to OpenBSD (5.5 and CURRENT). It's only compile-tested, but the
>> changed code parts do not really differ between the platforms, so I
>> think the patch should be safe to use.
>> 
>> Patch for OpenBSD 5.5:
>> http://gebert.net/share/relayd-ssl-5.5.diff
>> 
>> Patch for OpenBSD CURRENT as of 2014-07-01:
>> http://gebert.net/share/relayd-ssl-current-20140701.diff
>> 
>> 
>> Please feel free to change any defaults I’ve chosen for the new config
>> options. They were chosen for the environmet I run relayd in and might
>> not fit your policies about introducing new features.
>> 
>> Any feedback is welcome!
>> 
> 
> Thank you for the diff, I updated the diff and changed a few defaults
> after discussing them with jsing@.  I also adjusted the grammar a
> little bit to the following style (also for ecdh):
> 
> ssl edh                       - enable edh with the default maximum of 1024 
> bits
> ssl no edh            - disable edh (the default, provided for consistency)
> ssl edh params 8192   - set a non-default maximum
> 
> I removed the "auto" option because providing 8192 will effectively be
> the same.  I also adjusted the ecdh option accordingly:
> 
> ssl ecdh              - enable ecdh (the default, using prime256v1)
> ssl no ecdh           - disable ecdh
> ssl ecdh curve prime256v1     - set a specific curve
> 
> The other options cipher-server-preference and client-renegotiation
> make sense, but I changed it to allow "client-renegotiation" by
> default - I want to avoid too many differences to the standard SSL
> library.  Please note that relayd is now developed for LibreSSL where
> more defaults might be different to OpenSSL in the future.

Thanks, the new diff looks good to me. I actually like the new grammar
style much more, I was just trying to stick close to the one ecdh used,
but if you change both, the new style makes much more sense. I expected
that you would change the default for client initiated renegotiations,
so I'm good with that too.

I have another diff, which improves the SSL error handling code in
relayd, but I want to discuss that off-list first, if that's ok with
you.


Markus



Reply via email to