allow setting of egd socket path

Werner Koch wk at gnupg.org
Mon Apr 30 16:54:16 CEST 2007


On Fri, 27 Apr 2007 22:24, gcrypt-devel at mlists.thewrittenword.com said:

> We'd like the user to be able to set a different entropy source, for
> example using curl's --egd-file flag, and have libgcrypt respect that.
> I thought the new GCRYCTL_SET_RANDOM_DAEMON_SOCKET stuff in trunk
> would be what we wanted, but it's not.

That is experimental stuff not related to egd.

I have just ciommitted your suggested change to the SVN trunk.  It is a
little bit different than your patch, though:

  @item GCRYCTL_SET_RNDEGD_SOCKET; Arguments: const char *filename
  
  This command may be used to override the default name of the EGD socket
  to connect to.  It may be used only during initialization as it is not
  thread safe.  Changing the socket name again is not supported.  The
  function may return an error if the given filename is too long for a
  local socket name.
  
  EGD is an alternative random gatherer, used only on a few systems.
  
> I notice in the NEWS file of the svn version "Changed the way the RNG
> gets initialized." - does this mean that we will be able to run `curl
> --verion' and not have it die complaining about being unable to find a
> valid entropy source? I realize that this was discussed previously,

Yes.  This is a slow initialization which does only setup the mutex
stuff on init and does the rest of the initialization on demand.

> but I am not convinced that a library calling exit(2) on the
> appliction is a good idea. In the case above, curl inits everything at

We can't change that anymore and actually your patch although did this
too by using an xmalloc.



Salam-Shalom,

   Werner




More information about the Gcrypt-devel mailing list