[Dovecot] v2.1 memory usage

Timo Sirainen tss at iki.fi
Mon Nov 12 21:44:01 EET 2012


On 12.11.2012, at 6.13, Daniel L. Miller wrote:

>> where is the problem with openssl?
> 
> I don't know what the problem is - I just know that I've
> heard from a number of developers (including the Postfix & Dovecot
> developers) that they don't like OpenSSL - but while GnuTLS looks
> interesting they aren't interested in working on the interface - though
> they're willing to accept patches. (My full apologies right now if Timo
> or Wietse are offended by my speaking out of turn).

OpenSSL documentation is very bad. Its API has some annoying missing features. For example you can load certificates from a directory or a file but not from anything else like from a string in memory. I had to copy&paste a few functions from OpenSSL code just to be able to do them.

> The tiny bit of Googling I've done tells me GnuTLS
> seems to be a more standards-compliant implementation, and MAY be
> "safer" than OpenSSL. However, as OpenSSL is the de-facto standard used
> by most Linux programs, acceptance of GnuTLS is quite limited. I've been
> intrigued by what I've read about it, and took a quick look at enabling
> support in Dovecot for GnuTLS directly - but while it didn't seem overly
> heavy at first glance the fact that Timo doesn't want to do it tells me
> I'm underestimating the complexity.

I already once wrote GnuTLS support for Dovecot, but GnuTLS changed its APIs since then and it was probably originally already buggy. I think the only somewhat "special" APIs that Dovecot needs nowadays are related to reading cert/keys from memory instead of from files. If GnuTLS can do that, I don't think there's anything special in supporting it. Although it might be a bit complex to make it work properly asynchronously. istream-openssl was a bit annoying in that way (all the data read from the fd must be parsed and decoded all the way through to the SSL istream, regardless of any max buffer limits).



More information about the dovecot mailing list