diff options
Diffstat (limited to 'src/gpgme-tool.c')
-rw-r--r-- | src/gpgme-tool.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c index 978c387..0ebabab 100644 --- a/src/gpgme-tool.c +++ b/src/gpgme-tool.c @@ -1911,11 +1911,14 @@ gt_sign_encrypt (gpgme_tool_t gt, gpgme_encrypt_flags_t flags, gpgme_data_t plain, gpgme_data_t cipher, int sign) { gpg_error_t err; + gpgme_key_t *recp; + + recp = gt->recipients_nr? gt->recipients : NULL; if (sign) - err = gpgme_op_encrypt_sign (gt->ctx, gt->recipients, flags, plain, cipher); + err = gpgme_op_encrypt_sign (gt->ctx, recp, flags, plain, cipher); else - err = gpgme_op_encrypt (gt->ctx, gt->recipients, flags, plain, cipher); + err = gpgme_op_encrypt (gt->ctx, recp, flags, plain, cipher); gt_recipients_clear (gt); @@ -3056,7 +3059,7 @@ _cmd_genkey_write (gpgme_data_t data, const void *buf, size_t size) { while (size > 0) { - ssize_t writen = gpgme_data_write (data, buf, size); + gpgme_ssize_t writen = gpgme_data_write (data, buf, size); if (writen < 0 && errno != EAGAIN) return gpg_error_from_syserror (); else if (writen > 0) @@ -3112,7 +3115,7 @@ cmd_genkey (assuan_context_t ctx, char *line) do { char buf[512]; - ssize_t readn = gpgme_data_read (inp_data, buf, sizeof (buf)); + gpgme_ssize_t readn = gpgme_data_read (inp_data, buf, sizeof (buf)); if (readn < 0) { err = gpg_error_from_syserror (); |