aboutsummaryrefslogtreecommitdiffstats
path: root/gpgme/encrypt.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2002-02-26 23:39:58 +0000
committerMarcus Brinkmann <[email protected]>2002-02-26 23:39:58 +0000
commit31b2a458ff66a70fffe587448d60044b7127b795 (patch)
tree4b878c81bd811c278f354beb093aa4651262375b /gpgme/encrypt.c
parent2002-02-27 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-31b2a458ff66a70fffe587448d60044b7127b795.tar.gz
gpgme-31b2a458ff66a70fffe587448d60044b7127b795.zip
doc/
2002-02-27 Marcus Brinkmann <[email protected]> * gpgme.texi (Encrypting a Plaintext): Document GPGME_Invalid_Recipients. (Error Values): Likewise. gpgme/ 2002-02-27 Marcus Brinkmann <[email protected]> * gpgme.h: Add new error code GPGME_Invalid_Recipient. * encrypt.c (struct encrypt_result_s): New member invalid_recipients, rename no_recipients to no_valid_recipients. (_gpgme_encrypt_status_handler): Include error for invalid recipients. * engine-gpgsm.c (gpgsm_set_recipients): Change type of first argument to GpgsmObject. Use that to report back the status about the recipients.
Diffstat (limited to '')
-rw-r--r--gpgme/encrypt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gpgme/encrypt.c b/gpgme/encrypt.c
index 2f6abdae..ffaf2d90 100644
--- a/gpgme/encrypt.c
+++ b/gpgme/encrypt.c
@@ -38,7 +38,8 @@
struct encrypt_result_s
{
- int no_recipients;
+ int no_valid_recipients;
+ int invalid_recipients;
GpgmeData xmlinfo;
};
@@ -113,16 +114,19 @@ _gpgme_encrypt_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args)
_gpgme_set_op_info (ctx, ctx->result.encrypt->xmlinfo);
ctx->result.encrypt->xmlinfo = NULL;
}
- if (ctx->result.encrypt->no_recipients)
+ if (ctx->result.encrypt->no_valid_recipients)
ctx->error = mk_error (No_Recipients);
+ else if (ctx->result.encrypt->invalid_recipients)
+ ctx->error = mk_error (Invalid_Recipients);
break;
case STATUS_INV_RECP:
+ ctx->result.encrypt->invalid_recipients++;
append_xml_encinfo (&ctx->result.encrypt->xmlinfo, args);
break;
case STATUS_NO_RECP:
- ctx->result.encrypt->no_recipients = 1; /* i.e. no usable ones */
+ ctx->result.encrypt->no_valid_recipients = 1;
break;
default: