From ec8c9d9494494656b2618ecfc43ec485dc931ec4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 31 Jul 2001 15:21:58 +0000 Subject: A couple of minor changes and a short README for Gpgcom --- gpgme/encrypt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gpgme/encrypt.c') diff --git a/gpgme/encrypt.c b/gpgme/encrypt.c index 3fe60a62..bff4153d 100644 --- a/gpgme/encrypt.c +++ b/gpgme/encrypt.c @@ -70,7 +70,7 @@ gpgme_op_encrypt_start ( GpgmeCtx c, GpgmeRecipients recp, for ( i=0; i < c->verbosity; i++ ) _gpgme_gpg_add_arg ( c->gpg, "--verbose" ); /* If we know that all recipients are valid (full or ultimate trust) - * we can pass suppress further checks */ + * we can suppress further checks */ if ( _gpgme_recipients_all_valid (recp) ) _gpgme_gpg_add_arg ( c->gpg, "--always-trust" ); @@ -127,6 +127,12 @@ gpgme_op_encrypt ( GpgmeCtx c, GpgmeRecipients recp, if ( !rc ) { gpgme_wait (c, 1); c->pending = 0; + /* FIXME: gpg does not return status info for invalid + * recipients, so we simply check whether we got any output at + * all and if not assume that we don't have valid recipients + * */ + if (gpgme_data_get_type (out) == GPGME_DATA_TYPE_NONE) + rc = mk_error (No_Recipients); } return rc; } -- cgit v1.2.3