Rev 50 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_smartlink_rpath.dpatch
##
## DP: Changes from CVS to make the Nettle module compile with Nettle 2.0
## DP: Unfortunately Pike 7.8 doesn't support precompilation of C modules
## DP: without an already installed Pike.
@DPATCH@
diff -urad Pike-v7.8.316/src/post_modules/Nettle/cipher.cmod pike-cvs/7.8/src/post_modules/Nettle/cipher.cmod
--- Pike-v7.8.316/src/post_modules/Nettle/cipher.cmod 2008-07-31 16:52:27.000000000 +0200
+++ pike-cvs/7.8/src/post_modules/Nettle/cipher.cmod 2009-07-02 18:35:38.000000000 +0200
@@ -79,8 +86,8 @@
pike_nettle_set_key_func set_encrypt_key;
pike_nettle_set_key_func set_decrypt_key;
- nettle_crypt_func encrypt;
- nettle_crypt_func decrypt;
+ nettle_crypt_func *encrypt;
+ nettle_crypt_func *decrypt;
};
#define _PIKE_CIPHER(name, NAME) { \
@@ -90,8 +97,8 @@
NAME##_KEY_SIZE, \
pike_##name##_set_encrypt_key, \
pike_##name##_set_decrypt_key, \
- (nettle_crypt_func) name##_encrypt, \
- (nettle_crypt_func) name##_decrypt, \
+ (nettle_crypt_func*) name##_encrypt, \
+ (nettle_crypt_func*) name##_decrypt, \
}
/*! @class CipherInfo
@@ -175,7 +182,7 @@
PIKECLASS CipherState
{
INHERIT CipherInfo;
- CVAR nettle_crypt_func crypt;
+ CVAR nettle_crypt_func *crypt;
CVAR void *ctx;
CVAR int key_size;
diff -urad Pike-v7.8.316/src/post_modules/Nettle/nettle.cmod pike-cvs/7.8/src/post_modules/Nettle/nettle.cmod
--- Pike-v7.8.316/src/post_modules/Nettle/nettle.cmod 2008-06-29 00:57:14.000000000 +0200
+++ pike-cvs/7.8/src/post_modules/Nettle/nettle.cmod 2009-07-05 21:41:58.000000000 +0200
@@ -46,6 +46,21 @@
CVAR struct yarrow256_ctx ctx;
CVAR struct yarrow_source *sources;
+ PIKEVAR string seed_file flags ID_PRIVATE|ID_STATIC;
+
+ DECLARE_STORAGE;
+
+ 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);
+ }
+
/*! @decl void create(void|int sources)
*! The number of entropy sources that will feed entropy to the
*! random number generator is given as an argument to Yarrow
@@ -90,10 +120,12 @@
optflags OPT_SIDE_EFFECT;
{
if(data->len < YARROW256_SEED_FILE_SIZE)
- Pike_error( "Seed must be at least 32 characters.\n" );
+ Pike_error("Seed must be at least %d characters.\n",
+ YARROW256_SEED_FILE_SIZE);
NO_WIDE_STRING(data);
- yarrow256_seed(&THIS->ctx, data->len, (const uint8_t *)data->str);
+ yarrow256_seed(&THIS->ctx, data->len, STR0(data));
+ pike_generate_seed_file();
RETURN this_object();
}
@@ -109,19 +141,26 @@
RETURN YARROW256_SEED_FILE_SIZE;
}
- /*! @decl string get_seed()
- *! Returns part of the internal state so that it can
- *! be saved for later seeding.
+ /*! @decl string(0..255) get_seed()
+ *! Returns part of the internal state so that it can
+ *! be saved for later seeding.
+ *!
*! @seealso
- *! @[seed]
+ *! @[seed()], @[random_string()]
*/
PIKEFUN string get_seed()
optflags OPT_EXTERNAL_DEPEND;
+ rawtype tDeprecated(tFunc(tNone, tStr8));
{
if( !yarrow256_is_seeded(&THIS->ctx) )
Pike_error("Random generator not seeded.\n");
- RETURN make_shared_binary_string((const char *)THIS->ctx.seed_file,
- YARROW256_SEED_FILE_SIZE);
+
+ if (THIS->seed_file) {
+ REF_RETURN THIS->seed_file;
+ } else {
+ struct pike_string *s = begin_shared_string(YARROW256_SEED_FILE_SIZE);
+ RETURN end_shared_string(s);
+ }
}
/*! @decl int(0..1) is_seeded()
@@ -144,7 +188,8 @@
PIKEFUN void force_reseed()
optflags OPT_SIDE_EFFECT;
{
- yarrow256_force_reseed(&THIS->ctx);
+ yarrow256_slow_reseed(&THIS->ctx);
+ pike_generate_seed_file();
}
/*! @decl int(0..1) update(string data, int source, int entropy)
@@ -156,6 +212,7 @@
PIKEFUN int(0..1) update(string data, int source, int entropy)
optflags OPT_SIDE_EFFECT;
{
+ int ret;
/* FIXME: Wide strings could actually be supported here */
NO_WIDE_STRING(data);
if( !THIS->sources )
@@ -166,8 +223,11 @@
Pike_error("Entropy must be positive.\n");
if( entropy>(data->len*8) )
Pike_error("Impossibly large entropy value.\n");
- RETURN yarrow256_update(&THIS->ctx, source, entropy, data->len,
- (const uint8_t *)data->str);
+ ret = yarrow256_update(&THIS->ctx, source, entropy, data->len,
+ (const uint8_t *)data->str);
+ if (ret)
+ pike_generate_seed_file();
+ RETURN ret;
}
/*! @decl int(0..) needed_sources()
diff -urad Pike-v7.8.316/src/post_modules/Nettle/testsuite.in pike-cvs/7.8/src/post_modules/Nettle/testsuite.in
--- Pike-v7.8.316/src/post_modules/Nettle/testsuite.in 2007-06-18 02:43:51.000000000 +0200
+++ pike-cvs/7.8/src/post_modules/Nettle/testsuite.in 2009-08-05 12:01:45.000000000 +0200
@@ -193,4 +193,14 @@
}
)
]])
+
+cond_resolv( Nettle.Yarrow, [[
+ test_any_equal([[
+ object y = Nettle.Yarrow()->seed("What happen? Somebody set up us the bomb.");
+ return ({ y->get_seed(), y->random_string(20), y->get_seed(), y->random_string(20) });
+ ]], [[({String.hex2string("73a35b2f896a8061be0ad434a592a43a82b81b9ed6c018f1c5a51300bbc8d53d"),
+ String.hex2string("7847458e32fb789ff6b6cd6e1c8cc3712ba532a8"),
+ String.hex2string("73a35b2f896a8061be0ad434a592a43a82b81b9ed6c018f1c5a51300bbc8d53d"),
+ String.hex2string("49a090656a6d93782e169994f41005a3616d3cd7")})]])
+]])
END_MARKER
--- Pike-v7.8.316/src/post_modules/Nettle/nettle.c 2009-05-17 00:54:13.000000000 +0200
+++ pike-cvs/7.8/src/post_modules/Nettle/nettle.c 2009-08-22 21:24:50.000000000 +0200
@@ -64,6 +64,9 @@
#undef var_sources_Yarrow_defined
#define var_sources_Yarrow_defined
+#undef var_seed_file_Yarrow_defined
+#define var_seed_file_Yarrow_defined
+
#undef THIS
#define THIS ((struct Yarrow_struct *)(Pike_interpreter.frame_pointer->current_storage))
@@ -79,12 +82,31 @@
#line 47 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct yarrow_source *sources;
#endif /* var_sources_Yarrow_defined */
+
+#ifdef var_seed_file_Yarrow_defined
+ struct pike_string * seed_file;
+
+#endif /* var_seed_file_Yarrow_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Yarrow_struct *Yarrow_gdb_dummy_ptr;
#endif
-/*! @decl void create(void|int sources)
+#line 51 "src/post_modules/Nettle/nettle.cmod"
+;
+
+ 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);
+ }
+
+ /*! @decl void create(void|int sources)
*! The number of entropy sources that will feed entropy to the
*! random number generator is given as an argument to Yarrow
*! during instantiation.
@@ -102,19 +124,19 @@
#define f_Yarrow_create_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_create_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_create(INT32 args) {
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct svalue * arg;
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args > 1) wrong_number_of_args_error("create",args,1);
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if (args > 0) {
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-args].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"void|int");
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
arg=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
} else arg = NULL;
-#line 58 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 73 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
INT32 num = 0;
@@ -150,23 +172,25 @@
#define f_Yarrow_seed_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_seed_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_seed(INT32 args) {
-#line 89 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 104 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * data;
-#line 89 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 104 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("seed",args,1);
-#line 89 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 104 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("seed",1,"string");
-#line 89 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 104 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(data=Pike_sp[0-1].u.string);
-#line 91 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 106 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
if(data->len < YARROW256_SEED_FILE_SIZE)
- Pike_error( "Seed must be at least 32 characters.\n" );
+ Pike_error("Seed must be at least %d characters.\n",
+ YARROW256_SEED_FILE_SIZE);
NO_WIDE_STRING(data);
- yarrow256_seed(&THIS->ctx, data->len, (const uint8_t *)data->str);
+ yarrow256_seed(&THIS->ctx, data->len, STR0(data));
+ pike_generate_seed_file();
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 98 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 115 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -179,34 +203,41 @@
#define f_Yarrow_min_seed_size_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_min_seed_size_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_min_seed_size(INT32 args) {
-#line 106 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 123 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("min_seed_size",args,0);
-#line 108 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 125 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(YARROW256_SEED_FILE_SIZE); push_int(ret_); return; }while(0);
-#line 110 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 127 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
-/*! @decl string get_seed()
- *! Returns part of the internal state so that it can
- *! be saved for later seeding.
+/*! @decl string(0..255) get_seed()
+ *! Returns part of the internal state so that it can
+ *! be saved for later seeding.
+ *!
*! @seealso
- *! @[seed]
+ *! @[seed()], @[random_string()]
*/
#define f_Yarrow_get_seed_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_get_seed_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_get_seed(INT32 args) {
-#line 118 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 136 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("get_seed",args,0);
-#line 120 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 139 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
if( !yarrow256_is_seeded(&THIS->ctx) )
Pike_error("Random generator not seeded.\n");
- do { struct pike_string * ret_=(make_shared_binary_string((const char *)THIS->ctx.seed_file,
- YARROW256_SEED_FILE_SIZE)); push_string(ret_); return; }while(0);
-#line 125 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+
+ if (THIS->seed_file) {
+ do { struct pike_string * ret_=(THIS->seed_file); add_ref(ret_); push_string(ret_); return; }while(0);
+#line 145 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+} else {
+ struct pike_string *s = begin_shared_string(YARROW256_SEED_FILE_SIZE);
+ do { struct pike_string * ret_=(end_shared_string(s)); push_string(ret_); return; }while(0);
+#line 148 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
+ }
}
/*! @decl int(0..1) is_seeded()
@@ -218,12 +249,12 @@
#define f_Yarrow_is_seeded_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_is_seeded_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_is_seeded(INT32 args) {
-#line 133 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 157 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("is_seeded",args,0);
-#line 135 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 159 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(yarrow256_is_seeded(&THIS->ctx)); push_int(ret_); return; }while(0);
-#line 137 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 161 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -235,11 +266,12 @@
#define f_Yarrow_force_reseed_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_force_reseed_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_force_reseed(INT32 args) {
-#line 144 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 168 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("force_reseed",args,0);
-#line 146 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 170 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
- yarrow256_force_reseed(&THIS->ctx);
+ yarrow256_slow_reseed(&THIS->ctx);
+ pike_generate_seed_file();
}
}
@@ -252,28 +284,29 @@
#define f_Yarrow_update_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_update_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_update(INT32 args) {
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * data;
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE source;
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE entropy;
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 3) wrong_number_of_args_error("update",args,3);
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-3].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("update",1,"string");
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(data=Pike_sp[0-3].u.string);
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[1-3].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("update",2,"int");
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
source=Pike_sp[1-3].u.integer;
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[2-3].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("update",3,"int");
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
entropy=Pike_sp[2-3].u.integer;
-#line 158 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 183 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
+ int ret;
/* FIXME: Wide strings could actually be supported here */
NO_WIDE_STRING(data);
if( !THIS->sources )
@@ -284,9 +317,12 @@
Pike_error("Entropy must be positive.\n");
if( entropy>(data->len*8) )
Pike_error("Impossibly large entropy value.\n");
- do { INT_TYPE ret_=(yarrow256_update(&THIS->ctx, source, entropy, data->len,
- (const uint8_t *)data->str)); pop_n_elems(3); push_int(ret_); return; }while(0);
-#line 171 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+ ret = yarrow256_update(&THIS->ctx, source, entropy, data->len,
+ (const uint8_t *)data->str);
+ if (ret)
+ pike_generate_seed_file();
+ do { INT_TYPE ret_=(ret); pop_n_elems(3); push_int(ret_); return; }while(0);
+#line 200 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -297,12 +333,12 @@
#define f_Yarrow_needed_sources_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_needed_sources_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_needed_sources(INT32 args) {
-#line 177 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 206 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("needed_sources",args,0);
-#line 179 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 208 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(yarrow256_needed_sources(&THIS->ctx)); push_int(ret_); return; }while(0);
-#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 210 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -312,15 +348,15 @@
#define f_Yarrow_random_string_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Yarrow_random_string_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Yarrow_random_string(INT32 args) {
-#line 186 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 215 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE length;
-#line 186 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 215 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("random_string",args,1);
-#line 186 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 215 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("random_string",1,"int");
-#line 186 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 215 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
length=Pike_sp[0-1].u.integer;
-#line 188 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 217 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
struct pike_string *rnd;
if(length < 0)
@@ -330,7 +366,7 @@
rnd = begin_shared_string(length);
yarrow256_random(&THIS->ctx, length, (uint8_t *)rnd->str);
do { struct pike_string * ret_=(end_shared_string(rnd)); pop_stack(); push_string(ret_); return; }while(0);
-#line 197 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 226 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -341,7 +377,7 @@
#undef Yarrow_event_handler_defined
#define Yarrow_event_handler_defined
static void init_Yarrow_struct(void)
-#line 200 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 229 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
THIS->sources = NULL;
yarrow256_init(&THIS->ctx, 0, NULL);
@@ -354,7 +390,7 @@
#undef Yarrow_event_handler_defined
#define Yarrow_event_handler_defined
static void exit_Yarrow_struct(void)
-#line 207 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 236 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
if( THIS->sources )
{
@@ -390,21 +426,21 @@
#define f_crypt_md5_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_crypt_md5_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_crypt_md5(INT32 args) {
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * pw;
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * salt;
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 2) wrong_number_of_args_error("crypt_md5",args,2);
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-2].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt_md5",1,"string");
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(pw=Pike_sp[0-2].u.string);
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[1-2].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt_md5",2,"string");
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(salt=Pike_sp[1-2].u.string);
-#line 224 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 253 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
char *hash;
NO_WIDE_STRING(pw);
@@ -417,7 +453,7 @@
}
-#line 235 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 264 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
static const char *crypto_functions[] = {
"block_size",
"key_size",
@@ -529,22 +565,22 @@
struct CBC_struct {
#ifdef var_object_CBC_defined
-#line 315 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 344 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct object *object;
#endif /* var_object_CBC_defined */
#ifdef var_iv_CBC_defined
-#line 316 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 345 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
unsigned INT8 *iv;
#endif /* var_iv_CBC_defined */
#ifdef var_block_size_CBC_defined
-#line 317 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 346 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT32 block_size;
#endif /* var_block_size_CBC_defined */
#ifdef var_mode_CBC_defined
-#line 318 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 347 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT32 mode;
#endif /* var_mode_CBC_defined */
};
@@ -559,7 +595,7 @@
#undef CBC_event_handler_defined
#define CBC_event_handler_defined
static void init_CBC_struct(void)
-#line 321 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 350 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
THIS->object = NULL;
THIS->iv = NULL;
@@ -574,7 +610,7 @@
#undef CBC_event_handler_defined
#define CBC_event_handler_defined
static void exit_CBC_struct(void)
-#line 330 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 359 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
if(THIS->object) {
free_object(THIS->object);
@@ -643,24 +679,24 @@
#define f_CBC_create_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_create_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_create(INT32 args) {
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct svalue * cipher;
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct svalue * more;
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args < 1) wrong_number_of_args_error("create",args,1);
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
cipher=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if (args > 1) {
INT32 argcnt = 0;
do {
dmalloc_touch_svalue(Pike_sp+1+argcnt-args);
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
} while (++argcnt < args-1);
more=Pike_sp+1-args;
} else more=0;
-#line 397 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 426 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
int old_block_size = THIS->block_size;
THIS->object = make_cipher_object(args);
@@ -694,9 +730,9 @@
#define f_CBC_name_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_name_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_name(INT32 args) {
-#line 426 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 455 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("name",args,0);
-#line 428 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
push_constant_text("CBC(");
safe_apply(THIS->object, "name", 0);
@@ -711,12 +747,12 @@
#define f_CBC_block_size_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_block_size_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_block_size(INT32 args) {
-#line 438 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 467 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("block_size",args,0);
-#line 440 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 469 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(THIS->block_size); push_int(ret_); return; }while(0);
-#line 442 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -726,9 +762,9 @@
#define f_CBC_key_size_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_key_size_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_key_size(INT32 args) {
-#line 447 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 476 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("key_size",args,0);
-#line 449 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 478 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
safe_apply(THIS->object, "key_size", args);
}
@@ -741,22 +777,22 @@
#define f_CBC_set_encrypt_key_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_set_encrypt_key_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_set_encrypt_key(INT32 args) {
-#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * key;
-#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("set_encrypt_key",args,1);
-#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("set_encrypt_key",1,"string");
-#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(key=Pike_sp[0-1].u.string);
-#line 459 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 488 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
assert(THIS->block_size);
THIS->mode = 0;
safe_apply(THIS->object, "set_encrypt_key", args);
pop_stack();
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 465 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 494 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -767,22 +803,22 @@
#define f_CBC_set_decrypt_key_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_set_decrypt_key_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_set_decrypt_key(INT32 args) {
-#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 500 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * key;
-#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 500 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("set_decrypt_key",args,1);
-#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 500 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("set_decrypt_key",1,"string");
-#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 500 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(key=Pike_sp[0-1].u.string);
-#line 473 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 502 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
assert(THIS->block_size);
THIS->mode = 1;
safe_apply(THIS->object, "set_decrypt_key", args);
pop_stack();
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 479 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 508 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -792,15 +828,15 @@
#define f_CBC_set_iv_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_set_iv_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_set_iv(INT32 args) {
-#line 484 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 513 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * iv;
-#line 484 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 513 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("set_iv",args,1);
-#line 484 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 513 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("set_iv",1,"string");
-#line 484 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 513 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(iv=Pike_sp[0-1].u.string);
-#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 515 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
assert(THIS->iv);
NO_WIDE_STRING(iv);
@@ -808,7 +844,7 @@
Pike_error("Argument incompatible with cipher block size.\n");
MEMCPY(THIS->iv, iv->str, THIS->block_size);
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 493 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 522 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -819,15 +855,15 @@
#define f_CBC_crypt_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_CBC_crypt_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_CBC_crypt(INT32 args) {
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * data;
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("crypt",args,1);
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt",1,"string");
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(data=Pike_sp[0-1].u.string);
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
unsigned INT8 *result;
INT32 offset = 0;
@@ -919,22 +955,22 @@
struct Proxy_struct {
#ifdef var_object_Proxy_defined
-#line 540 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 569 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct object *object;
#endif /* var_object_Proxy_defined */
#ifdef var_block_size_Proxy_defined
-#line 541 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 570 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
int block_size;
#endif /* var_block_size_Proxy_defined */
#ifdef var_backlog_Proxy_defined
-#line 542 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
unsigned char *backlog;
#endif /* var_backlog_Proxy_defined */
#ifdef var_backlog_len_Proxy_defined
-#line 543 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 572 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
int backlog_len;
#endif /* var_backlog_len_Proxy_defined */
};
@@ -949,7 +985,7 @@
#undef Proxy_event_handler_defined
#define Proxy_event_handler_defined
static void init_Proxy_struct(void)
-#line 545 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 574 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
THIS->object = NULL;
THIS->block_size = 0;
@@ -964,7 +1000,7 @@
#undef Proxy_event_handler_defined
#define Proxy_event_handler_defined
static void exit_Proxy_struct(void)
-#line 554 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 583 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
if(THIS->backlog) {
MEMSET(THIS->backlog, 0, THIS->block_size);
@@ -985,24 +1021,24 @@
#define f_Proxy_create_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_create_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_create(INT32 args) {
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct svalue * cipher;
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct svalue * more;
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args < 1) wrong_number_of_args_error("create",args,1);
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
cipher=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if (args > 1) {
INT32 argcnt = 0;
do {
dmalloc_touch_svalue(Pike_sp+1+argcnt-args);
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
} while (++argcnt < args-1);
more=Pike_sp+1-args;
} else more=0;
-#line 573 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 602 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
THIS->object = make_cipher_object(args);
@@ -1030,9 +1066,9 @@
#define f_Proxy_name_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_name_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_name(INT32 args) {
-#line 596 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 625 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("name",args,0);
-#line 598 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 627 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
push_constant_text("Proxy(");
safe_apply(THIS->object, "name", 0);
@@ -1048,12 +1084,12 @@
#define f_Proxy_block_size_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_block_size_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_block_size(INT32 args) {
-#line 609 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 638 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("block_size",args,0);
-#line 611 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 640 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(THIS->block_size); push_int(ret_); return; }while(0);
-#line 613 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 642 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -1064,9 +1100,9 @@
#define f_Proxy_key_size_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_key_size_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_key_size(INT32 args) {
-#line 619 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 648 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("key_size",args,0);
-#line 621 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 650 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
safe_apply(THIS->object, "key_size", args);
}
@@ -1082,22 +1118,22 @@
#define f_Proxy_set_encrypt_key_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_set_encrypt_key_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_set_encrypt_key(INT32 args) {
-#line 632 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 661 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * key;
-#line 632 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 661 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("set_encrypt_key",args,1);
-#line 632 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 661 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("set_encrypt_key",1,"string");
-#line 632 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 661 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(key=Pike_sp[0-1].u.string);
-#line 634 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 663 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
MEMSET(THIS->backlog, 0, THIS->block_size);
THIS->backlog_len = 0;
safe_apply(THIS->object, "set_encrypt_key", args);
pop_stack();
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 640 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 669 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -1111,22 +1147,22 @@
#define f_Proxy_set_decrypt_key_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_set_decrypt_key_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_set_decrypt_key(INT32 args) {
-#line 649 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 678 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * key;
-#line 649 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 678 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("set_decrypt_key",args,1);
-#line 649 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 678 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("set_decrypt_key",1,"string");
-#line 649 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 678 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(key=Pike_sp[0-1].u.string);
-#line 651 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 680 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
MEMSET(THIS->backlog, 0, THIS->block_size);
THIS->backlog_len = 0;
safe_apply(THIS->object, "set_decrypt_key", args);
pop_stack();
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 657 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 686 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
@@ -1141,15 +1177,15 @@
#define f_Proxy_crypt_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_crypt_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_crypt(INT32 args) {
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * data;
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("crypt",args,1);
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt",1,"string");
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(data=Pike_sp[0-1].u.string);
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
unsigned char *result;
ptrdiff_t roffset = 0;
@@ -1232,9 +1268,9 @@
#define f_Proxy_pad_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_pad_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_pad(INT32 args) {
-#line 745 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 774 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("pad",args,0);
-#line 745 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 774 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
ptrdiff_t i;
@@ -1266,15 +1302,15 @@
#define f_Proxy_unpad_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_Proxy_unpad_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_Proxy_unpad(INT32 args) {
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct pike_string * str;
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("unpad",args,1);
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("unpad",1,"string");
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
debug_malloc_pass(str=Pike_sp[0-1].u.string);
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
ptrdiff_t len;
@@ -1327,7 +1363,7 @@
/*! @endclass
*/
-#line 806 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 835 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
#if 0
/* @class LFib
@@ -1359,7 +1395,7 @@
struct LFib_struct {
#ifdef var_ctx_LFib_defined
-#line 815 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 844 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
struct knuth_lfib_ctx *ctx;
#endif /* var_ctx_LFib_defined */
};
@@ -1374,7 +1410,7 @@
#undef LFib_event_handler_defined
#define LFib_event_handler_defined
static void init_LFib_struct(void)
-#line 817 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 846 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
THIS->ctx = xalloc(sizeof(struct knuth_lfib_ctx));
}
@@ -1386,7 +1422,7 @@
#undef LFib_event_handler_defined
#define LFib_event_handler_defined
static void exit_LFib_struct(void)
-#line 823 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 852 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
free(THIS->ctx);
}
@@ -1397,21 +1433,21 @@
#define f_LFib_create_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_LFib_create_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_LFib_create(INT32 args) {
-#line 830 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 859 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE seed;
-#line 830 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 859 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("create",args,1);
-#line 830 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 859 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int");
-#line 830 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 859 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
seed=Pike_sp[0-1].u.integer;
-#line 832 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 861 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
knuth_lfib_init(THIS->ctx, seed);
}
}
-#line 836 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 865 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
/* @decl this_program reseed(int s)
* Reseed this object with seed @[s].
* @return
@@ -1420,52 +1456,52 @@
#define f_LFib_reseed_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_LFib_reseed_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_LFib_reseed(INT32 args) {
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE s;
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("reseed",args,1);
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("reseed",1,"int");
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
s=Pike_sp[0-1].u.integer;
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
knuth_lfib_init(THIS->ctx, s);
do { struct object * ret_=(this_object()); pop_stack(); push_object(ret_); return; }while(0);
-#line 844 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 873 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
-#line 846 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 875 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
/* Get one 32bit pseudorandom integer.
*/
#define f_LFib_get_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_LFib_get_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_LFib_get(INT32 args) {
-#line 848 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 877 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 0) wrong_number_of_args_error("get",args,0);
-#line 848 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 877 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
do { INT_TYPE ret_=(knuth_lfib_get(THIS->ctx)); push_int(ret_); return; }while(0);
-#line 850 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 879 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
}
}
-#line 852 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 881 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
/* Get a pseudorandom string of length @[len].
*/
#define f_LFib_get_string_defined
DEFAULT_CMOD_STORAGE ptrdiff_t f_LFib_get_string_fun_num = 0;
DEFAULT_CMOD_STORAGE void f_LFib_get_string(INT32 args) {
-#line 854 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 883 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
INT_TYPE len;
-#line 854 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 883 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(args != 1) wrong_number_of_args_error("get_string",args,1);
-#line 854 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 883 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
if(Pike_sp[0-1].type != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("get_string",1,"int");
-#line 854 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 883 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
len=Pike_sp[0-1].u.integer;
-#line 854 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 883 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
{
struct pike_string *s = begin_shared_string(len);
knuth_lfib_random(THIS->ctx, len, s->str);
@@ -1491,7 +1527,7 @@
}
#endif /* LFib_event_handler_defined */
-#line 861 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 890 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
/* @endclass
*/
@@ -1514,10 +1550,10 @@
#ifdef class_Yarrow_defined
#ifdef PROG_YARROW_ID
-#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
START_NEW_PROGRAM_ID(YARROW);
#else
-#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
start_new_program();
#endif /* PROG_YARROW_ID */
@@ -1533,6 +1569,11 @@
Yarrow_storage_offset = ADD_STORAGE(struct Yarrow_struct);
#endif /* THIS_YARROW */
+#ifdef var_seed_file_Yarrow_defined
+ PIKE_MAP_VARIABLE("seed_file", Yarrow_storage_offset + OFFSETOF(Yarrow_struct, seed_file),
+ tString, PIKE_T_STRING, ID_PRIVATE|ID_STATIC);
+#endif /* var_seed_file_Yarrow_defined */
+
#ifdef Yarrow_event_handler_defined
pike_set_prog_event_callback(Yarrow_event_handler);
@@ -1545,69 +1586,69 @@
#ifdef f_Yarrow_create_defined
f_Yarrow_create_fun_num =
-#line 56 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 71 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("create", f_Yarrow_create, tFunc(tOr(tVoid,"\10\200\0\0\0\177\377\377\377"),tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Yarrow_create_defined */
#ifdef f_Yarrow_seed_defined
f_Yarrow_seed_fun_num =
-#line 89 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 104 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("seed", f_Yarrow_seed, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_Yarrow_seed_defined */
#ifdef f_Yarrow_min_seed_size_defined
f_Yarrow_min_seed_size_fun_num =
-#line 106 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 123 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("min_seed_size", f_Yarrow_min_seed_size, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);
#endif /* f_Yarrow_min_seed_size_defined */
#ifdef f_Yarrow_get_seed_defined
f_Yarrow_get_seed_fun_num =
-#line 118 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
- ADD_FUNCTION2("get_seed", f_Yarrow_get_seed, tFunc(tNone,tString), 0, OPT_EXTERNAL_DEPEND);
+#line 136 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+ ADD_FUNCTION2("get_seed", f_Yarrow_get_seed, tDeprecated(tFunc(tNone, tStr8)), 0, OPT_EXTERNAL_DEPEND);
#endif /* f_Yarrow_get_seed_defined */
#ifdef f_Yarrow_is_seeded_defined
f_Yarrow_is_seeded_fun_num =
-#line 133 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 157 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("is_seeded", f_Yarrow_is_seeded, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND);
#endif /* f_Yarrow_is_seeded_defined */
#ifdef f_Yarrow_force_reseed_defined
f_Yarrow_force_reseed_fun_num =
-#line 144 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 168 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("force_reseed", f_Yarrow_force_reseed, tFunc(tNone,tVoid), 0, OPT_SIDE_EFFECT);
#endif /* f_Yarrow_force_reseed_defined */
#ifdef f_Yarrow_update_defined
f_Yarrow_update_fun_num =
-#line 156 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 181 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("update", f_Yarrow_update, tFunc(tString "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377","\10\0\0\0\0\0\0\0\1"), 0, OPT_SIDE_EFFECT);
#endif /* f_Yarrow_update_defined */
#ifdef f_Yarrow_needed_sources_defined
f_Yarrow_needed_sources_fun_num =
-#line 177 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 206 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("needed_sources", f_Yarrow_needed_sources, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND);
#endif /* f_Yarrow_needed_sources_defined */
#ifdef f_Yarrow_random_string_defined
f_Yarrow_random_string_fun_num =
-#line 186 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 215 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("random_string", f_Yarrow_random_string, tFunc("\10\200\0\0\0\177\377\377\377",tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Yarrow_random_string_defined */
-#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
Yarrow_program=end_program();
-#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
Yarrow_program_fun_num=add_program_constant("Yarrow",Yarrow_program,0);
#endif /* class_Yarrow_defined */
@@ -1615,10 +1656,10 @@
#ifdef class_CBC_defined
#ifdef PROG_CBC_ID
-#line 313 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 342 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
START_NEW_PROGRAM_ID(CBC);
#else
-#line 313 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 342 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
start_new_program();
#endif /* PROG_CBC_ID */
@@ -1646,62 +1687,62 @@
#ifdef f_CBC_create_defined
f_CBC_create_fun_num =
-#line 395 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 424 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("create", f_CBC_create, tFuncV(tOr3(tPrg(tObj),tObj,tFuncV(tNone,tMix,tAny)),tMix,tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_CBC_create_defined */
#ifdef f_CBC_name_defined
f_CBC_name_fun_num =
-#line 426 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 455 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("name", f_CBC_name, tFunc(tNone,tString), 0, OPT_TRY_OPTIMIZE);
#endif /* f_CBC_name_defined */
#ifdef f_CBC_block_size_defined
f_CBC_block_size_fun_num =
-#line 438 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 467 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("block_size", f_CBC_block_size, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);
#endif /* f_CBC_block_size_defined */
#ifdef f_CBC_key_size_defined
f_CBC_key_size_fun_num =
-#line 447 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 476 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("key_size", f_CBC_key_size, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND);
#endif /* f_CBC_key_size_defined */
#ifdef f_CBC_set_encrypt_key_defined
f_CBC_set_encrypt_key_fun_num =
-#line 457 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 486 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("set_encrypt_key", f_CBC_set_encrypt_key, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_CBC_set_encrypt_key_defined */
#ifdef f_CBC_set_decrypt_key_defined
f_CBC_set_decrypt_key_fun_num =
-#line 471 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 500 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("set_decrypt_key", f_CBC_set_decrypt_key, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_CBC_set_decrypt_key_defined */
#ifdef f_CBC_set_iv_defined
f_CBC_set_iv_fun_num =
-#line 484 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 513 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("set_iv", f_CBC_set_iv, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_CBC_set_iv_defined */
#ifdef f_CBC_crypt_defined
f_CBC_crypt_fun_num =
-#line 499 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 528 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("crypt", f_CBC_crypt, tFunc(tString,tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_CBC_crypt_defined */
-#line 313 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 342 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
CBC_program=end_program();
-#line 313 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 342 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
CBC_program_fun_num=add_program_constant("CBC",CBC_program,0);
#endif /* class_CBC_defined */
@@ -1709,10 +1750,10 @@
#ifdef class_Proxy_defined
#ifdef PROG_PROXY_ID
-#line 539 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 568 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
START_NEW_PROGRAM_ID(PROXY);
#else
-#line 539 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 568 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
start_new_program();
#endif /* PROG_PROXY_ID */
@@ -1740,69 +1781,69 @@
#ifdef f_Proxy_create_defined
f_Proxy_create_fun_num =
-#line 571 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 600 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("create", f_Proxy_create, tFuncV(tOr3(tPrg(tObj),tObj,tFuncV(tNone,tMix,tAny)),tMix,tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Proxy_create_defined */
#ifdef f_Proxy_name_defined
f_Proxy_name_fun_num =
-#line 596 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 625 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("name", f_Proxy_name, tFunc(tNone,tString), 0, OPT_TRY_OPTIMIZE);
#endif /* f_Proxy_name_defined */
#ifdef f_Proxy_block_size_defined
f_Proxy_block_size_fun_num =
-#line 609 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 638 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("block_size", f_Proxy_block_size, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);
#endif /* f_Proxy_block_size_defined */
#ifdef f_Proxy_key_size_defined
f_Proxy_key_size_fun_num =
-#line 619 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 648 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("key_size", f_Proxy_key_size, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND);
#endif /* f_Proxy_key_size_defined */
#ifdef f_Proxy_set_encrypt_key_defined
f_Proxy_set_encrypt_key_fun_num =
-#line 632 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 661 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("set_encrypt_key", f_Proxy_set_encrypt_key, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_Proxy_set_encrypt_key_defined */
#ifdef f_Proxy_set_decrypt_key_defined
f_Proxy_set_decrypt_key_fun_num =
-#line 649 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 678 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("set_decrypt_key", f_Proxy_set_decrypt_key, tFunc(tString,tObj), 0, OPT_SIDE_EFFECT);
#endif /* f_Proxy_set_decrypt_key_defined */
#ifdef f_Proxy_crypt_defined
f_Proxy_crypt_fun_num =
-#line 667 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 696 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("crypt", f_Proxy_crypt, tFunc(tString,tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Proxy_crypt_defined */
#ifdef f_Proxy_pad_defined
f_Proxy_pad_fun_num =
-#line 745 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 774 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("pad", f_Proxy_pad, tFunc(tNone,tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Proxy_pad_defined */
#ifdef f_Proxy_unpad_defined
f_Proxy_unpad_fun_num =
-#line 772 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 801 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("unpad", f_Proxy_unpad, tFunc(tString,tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_Proxy_unpad_defined */
-#line 539 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 568 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
Proxy_program=end_program();
-#line 539 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 568 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
Proxy_program_fun_num=add_program_constant("Proxy",Proxy_program,0);
#endif /* class_Proxy_defined */
@@ -1810,10 +1851,10 @@
#ifdef class_LFib_defined
#ifdef PROG_LFIB_ID
-#line 813 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 842 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
START_NEW_PROGRAM_ID(LFIB);
#else
-#line 813 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 842 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
start_new_program();
#endif /* PROG_LFIB_ID */
@@ -1841,21 +1882,21 @@
#ifdef f_LFib_create_defined
f_LFib_create_fun_num =
-#line 830 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 859 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("create", f_LFib_create, tFunc("\10\200\0\0\0\177\377\377\377",tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_LFib_create_defined */
#ifdef f_LFib_reseed_defined
f_LFib_reseed_fun_num =
-#line 841 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 870 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("reseed", f_LFib_reseed, tFunc("\10\200\0\0\0\177\377\377\377",tObj), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_LFib_reseed_defined */
#ifdef f_LFib_get_defined
f_LFib_get_fun_num =
-#line 848 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 877 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("get", f_LFib_get, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_LFib_get_defined */
@@ -1865,20 +1906,20 @@
ADD_FUNCTION2("get_string", f_LFib_get_string, tFunc("\10\200\0\0\0\177\377\377\377",tString), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);
#endif /* f_LFib_get_string_defined */
-#line 813 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 842 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
LFib_program=end_program();
-#line 813 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 842 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
LFib_program_fun_num=add_program_constant("LFib",LFib_program,0);
#endif /* class_LFib_defined */
#ifdef f_crypt_md5_defined
f_crypt_md5_fun_num =
-#line 222 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 251 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
ADD_FUNCTION2("crypt_md5", f_crypt_md5, tFunc(tString tString,tString), 0, OPT_TRY_OPTIMIZE);
#endif /* f_crypt_md5_defined */
-#line 879 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 908 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
;
#ifdef HAVE_LIBNETTLE
hash_init();
@@ -1906,7 +1947,7 @@
#ifdef class_Yarrow_defined
if(Yarrow_program) {
-#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 44 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
free_program(Yarrow_program);
Yarrow_program=0;
}
@@ -1915,7 +1956,7 @@
#ifdef class_CBC_defined
if(CBC_program) {
-#line 313 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 342 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
free_program(CBC_program);
CBC_program=0;
}
@@ -1924,7 +1965,7 @@
#ifdef class_Proxy_defined
if(Proxy_program) {
-#line 539 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 568 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
free_program(Proxy_program);
Proxy_program=0;
}
@@ -1933,13 +1974,13 @@
#ifdef class_LFib_defined
if(LFib_program) {
-#line 813 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 842 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
free_program(LFib_program);
LFib_program=0;
}
#endif /* class_LFib_defined */
-#line 903 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
+#line 932 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/nettle.cmod"
;
}
--- Pike-v7.8.316/src/post_modules/Nettle/cipher.c 2009-05-17 00:54:16.000000000 +0200
+++ pike7.8-7.8.316/src/post_modules/Nettle/cipher.c 2009-08-22 23:51:41.000000000 +0200
@@ -91,8 +91,8 @@
pike_nettle_set_key_func set_encrypt_key;
pike_nettle_set_key_func set_decrypt_key;
- nettle_crypt_func encrypt;
- nettle_crypt_func decrypt;
+ nettle_crypt_func *encrypt;
+ nettle_crypt_func *decrypt;
};
#define _PIKE_CIPHER(name, NAME) { \
@@ -102,8 +102,8 @@
NAME##_KEY_SIZE, \
pike_##name##_set_encrypt_key, \
pike_##name##_set_decrypt_key, \
- (nettle_crypt_func) name##_encrypt, \
- (nettle_crypt_func) name##_decrypt, \
+ (nettle_crypt_func*) name##_encrypt, \
+ (nettle_crypt_func*) name##_decrypt, \
}
/*! @class CipherInfo
@@ -281,7 +281,7 @@
#ifdef var_crypt_CipherState_defined
#line 178 "/home/peter/hack/Pike/7.8-distmaker/7.8/src/post_modules/Nettle/cipher.cmod"
-nettle_crypt_func crypt;
+nettle_crypt_func *crypt;
#endif /* var_crypt_CipherState_defined */
#ifdef var_ctx_CipherState_defined