pike.git / src / post_modules / Nettle / nettle.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/nettle.cmod:1:   /* nettle.cmod -*- c -*- */ - /* $Id: nettle.cmod,v 1.54 2009/07/05 14:35:03 grubba Exp $ */ + /* $Id: nettle.cmod,v 1.55 2009/07/05 19:41:58 grubba Exp $ */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   /* For this_object() */   #include "object.h"   #include "operators.h"   #include "module_support.h"   #include "threads.h"   
pike.git/src/post_modules/Nettle/nettle.cmod:50:    /* NOTE: Nettle 2.0 does not have the automatic seed_file maintenance    * that Nettle 1.x had. This stuff is needed since it affected    * the state emitted by random_string(). When Nettle 2.0 is the    * default, consider implementing this via overloading of the    * various seeding functions instead, since it does have a bit    * of overhead.    *    * /grubba 2009-07-05    */    PIKEVAR string seed_file flags ID_PRIVATE|ID_STATIC; + #endif    -  +  DECLARE_STORAGE; +  + #ifndef HAVE_STRUCT_YARROW256_CTX_SEED_FILE    static void pike_generate_seed_file(void)    {    struct pike_string *seed_file =    begin_shared_string(YARROW256_SEED_FILE_SIZE);    yarrow256_random(&THIS->ctx, YARROW256_SEED_FILE_SIZE, STR0(seed_file));    if (THIS->seed_file) {    free_string(THIS->seed_file);    }    THIS->seed_file = end_shared_string(seed_file);    }