diff options
author | Werner Koch <[email protected]> | 2007-06-21 18:44:48 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2007-06-21 18:44:48 +0000 |
commit | 0b66f30d66fadbfd1a949edbe765043b06c5931b (patch) | |
tree | e2e33a51151de2deac0d4e43cd7bc38429fe2965 /common/membuf.c | |
parent | [w32] gpg-agent is now started automagically by gpgsm. (diff) | |
download | gnupg-0b66f30d66fadbfd1a949edbe765043b06c5931b.tar.gz gnupg-0b66f30d66fadbfd1a949edbe765043b06c5931b.zip |
Implemented the --gen-key command as we can't use the gpgsm-gencert.sh under Windows.
Diffstat (limited to 'common/membuf.c')
-rw-r--r-- | common/membuf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/membuf.c b/common/membuf.c index 51014592b..eb436c466 100644 --- a/common/membuf.c +++ b/common/membuf.c @@ -52,7 +52,7 @@ init_membuf_secure (membuf_t *mb, int initiallen) mb->len = 0; mb->size = initiallen; mb->out_of_core = 0; - mb->buf = xtrymalloc (initiallen); + mb->buf = xtrymalloc_secure (initiallen); if (!mb->buf) mb->out_of_core = errno; } @@ -87,6 +87,13 @@ put_membuf (membuf_t *mb, const void *buf, size_t len) } +void +put_membuf_str (membuf_t *mb, const char *string) +{ + put_membuf (mb, string, strlen (string)); +} + + void * get_membuf (membuf_t *mb, size_t *len) { |