Documentations bugs?

Werner Koch wk at gnupg.org
Sat Jun 20 10:50:17 CEST 2009


On Fri, 19 Jun 2009 14:47, victor.stinner at haypocalc.com said:

> GCRYCTL_INIT_SECMEM, but that I load gcrypt twice using dlopen(), and that I 
> do initialize it twice. But at the second dlopen() call, i just get the same 

You may want to test whether gcrypt is already intialized; the manual
has this hint:

  It is important that these initialization steps are not done by a
  library but by the actual application.  A library using Libgcrypt might
  want to check for finished initialization using:
  
  @example
    if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P))
      @{
        fputs ("libgcrypt has not been initialized\n", stderr);
        abort ();
      @}       
  @end example
  
  Instead of terminating the process, the library may instead print a
  warning and try to initialize Libgcrypt itself.  See also the section on
  multi-threading below for more pitfalls.
  


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-users mailing list