core: Make gpgme_op_encrypt_ext work for CMS.

* src/engine-gpgsm.c (gpgsm_encrypt): Fix argument check.
--

It is pretty obvious thar the string based new encrypt function has
never been tested for S/MIME.  The fix was easy.  A followup patch
will extend it to allow for keywords in the future.

GnuPG-bug-id: 4556
Fixes-commit: a1f76b3b54
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-06-03 18:26:51 +02:00
parent 47135ffdb9
commit e9ca36f876
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1458,7 +1458,7 @@ gpgsm_encrypt (void *engine, gpgme_key_t recp[], const char *recpstring,
if (!gpgsm)
return gpg_error (GPG_ERR_INV_VALUE);
if (!recp)
if (!recp && !recpstring) /* Symmetric only */
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
if ((flags & GPGME_ENCRYPT_NO_ENCRYPT_TO))