mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
now use the identical implementation from ../common/membuf.c. * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use membuf functions to return the value. * pkdecrypt.c (agent_pkdecrypt): Ditto. * genkey.c (agent_genkey): Ditto. * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced assuan_get_data_fp() by a the membuf scheme. (clear_outbuf, write_and_clear_outbuf): New. * membuf.c (put_membuf): Wipe out buffer after a failed realloc.
This commit is contained in:
parent
e212805a9c
commit
18fd4964f6
9 changed files with 112 additions and 108 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <gcrypt.h>
|
||||
#include "../common/util.h"
|
||||
#include "../common/errors.h"
|
||||
#include "membuf.h"
|
||||
|
||||
/* Convenience function to be used instead of returning the old
|
||||
GNUPG_Out_Of_Core. */
|
||||
|
@ -166,16 +167,16 @@ void agent_unlock_cache_entry (void **cache_id);
|
|||
int agent_pksign_do (CTRL ctrl, const char *desc_text,
|
||||
gcry_sexp_t *signature_sexp, int ignore_cache);
|
||||
int agent_pksign (ctrl_t ctrl, const char *desc_text,
|
||||
FILE *outfp, int ignore_cache);
|
||||
membuf_t *outbuf, int ignore_cache);
|
||||
|
||||
/*-- pkdecrypt.c --*/
|
||||
int agent_pkdecrypt (ctrl_t ctrl, const char *desc_text,
|
||||
const unsigned char *ciphertext, size_t ciphertextlen,
|
||||
FILE *outfp);
|
||||
membuf_t *outbuf);
|
||||
|
||||
/*-- genkey.c --*/
|
||||
int agent_genkey (ctrl_t ctrl,
|
||||
const char *keyparam, size_t keyparmlen, FILE *outfp);
|
||||
const char *keyparam, size_t keyparmlen, membuf_t *outbuf);
|
||||
int agent_protect_and_store (ctrl_t ctrl, gcry_sexp_t s_skey);
|
||||
|
||||
/*-- protect.c --*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue