gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#448775: Uses too much entropy (Debian Bug #343085)


From: Ian Goldberg
Subject: Re: Bug#448775: Uses too much entropy (Debian Bug #343085)
Date: Fri, 4 Jan 2008 10:33:43 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Jan 04, 2008 at 03:16:57PM +0100, Simon Josefsson wrote:
> There is also the problem if something other than gnutls has already
> initialized libgcrypt.  This could happen if exim links to some other
> library that uses libgcrypt, for example, a LDAP or database library,
> which gets initialized before.  I'm not sure what we can do about this
> situation.  I also dislike global functions like this.

This is a nontrivial problem.  If there are multiple clients of
libgcrypt, and they use the globals in different ways, Bad Things
happen.  I've run into this with the Off-the-Record Messaging (OTR)
plugin for pidgin: if another plugin (say, Jabber) uses gnutls, which
initializes libgcrypt, and OTR also initializes libgcrypt (perhaps with
custom allocation functions), you can easily cause a crash.

It would be very nice to have all of the libgcrypt global state
encapsulated into a dynamically allocated region that's returned by the
libgcrypt initialization, and passed into all other functions.  [Macros
could be provided that automatically reference the most recent
allocation for backwards compatibility purposes.]

   - Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]