aboutsummaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-22 15:00:54 +0000
committerWerner Koch <[email protected]>2023-05-24 10:13:53 +0000
commit7e681da1b217768b40713825ef8177f0d1010eff (patch)
tree3a89d027a598fb8a7be7f03ea230abd2978ff1b1 /sm
parentgpgtar: Emit FAILURE status line. (diff)
downloadgnupg-7e681da1b217768b40713825ef8177f0d1010eff.tar.gz
gnupg-7e681da1b217768b40713825ef8177f0d1010eff.zip
sm: Emit STATUS_FAILURE for non-implemented commands.
* sm/gpgsm.c (main): Do it here.
Diffstat (limited to 'sm')
-rw-r--r--sm/gpgsm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 55173f8a2..07c3ff480 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1951,11 +1951,17 @@ main ( int argc, char **argv)
break;
case aSignEncr: /* sign and encrypt the given file */
- log_error ("this command has not yet been implemented\n");
+ log_error ("the command '%s' has not yet been implemented\n",
+ "--sign --encrypt");
+ gpgsm_status_with_error (&ctrl, STATUS_FAILURE, "option-parser",
+ gpg_error (GPG_ERR_NOT_IMPLEMENTED));
break;
case aClearsign: /* make a clearsig */
- log_error ("this command has not yet been implemented\n");
+ log_error ("the command '%s' has not yet been implemented\n",
+ "--clearsign");
+ gpgsm_status_with_error (&ctrl, STATUS_FAILURE, "option-parser",
+ gpg_error (GPG_ERR_NOT_IMPLEMENTED));
break;
case aVerify:
@@ -2188,8 +2194,10 @@ main ( int argc, char **argv)
default:
- log_error (_("invalid command (there is no implicit command)\n"));
- break;
+ log_error (_("invalid command (there is no implicit command)\n"));
+ gpgsm_status_with_error (&ctrl, STATUS_FAILURE, "option-parser",
+ gpg_error (GPG_ERR_MISSING_ACTION));
+ break;
}
/* Print the audit result if needed. */