diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index 0347f640..182f6a39 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -1512,6 +1512,12 @@ gpgsm_export (void *engine, const char *pattern, gpgme_export_mode_t mode, if (!gpgsm) return gpg_error (GPG_ERR_INV_VALUE); + if ((mode & ~(GPGME_EXPORT_MODE_SECRET + |GPGME_EXPORT_MODE_MINIMAL + |GPGME_EXPORT_MODE_RAW + |GPGME_EXPORT_MODE_PKCS12))) + return gpg_error (GPG_ERR_NOT_SUPPORTED); + if (!pattern) pattern = ""; @@ -1559,6 +1565,12 @@ gpgsm_export_ext (void *engine, const char *pattern[], gpgme_export_mode_t mode, if (!gpgsm) return gpg_error (GPG_ERR_INV_VALUE); + if ((mode & ~(GPGME_EXPORT_MODE_SECRET + |GPGME_EXPORT_MODE_MINIMAL + |GPGME_EXPORT_MODE_RAW + |GPGME_EXPORT_MODE_PKCS12))) + return gpg_error (GPG_ERR_NOT_SUPPORTED); + if (pattern && *pattern) { const char **pat = pattern;