aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rspamadm/signtool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rspamadm/signtool.c b/src/rspamadm/signtool.c
index d92071bfa..03f6ac60e 100644
--- a/src/rspamadm/signtool.c
+++ b/src/rspamadm/signtool.c
@@ -592,8 +592,13 @@ rspamadm_signtool (gint argc, gchar **argv, const struct rspamadm_command *cmd)
kp = rspamd_keypair_from_ucl (top);
- if (kp == NULL || rspamd_keypair_type (kp) != RSPAMD_KEYPAIR_SIGN) {
- rspamd_fprintf (stderr, "invalid or unsuitable for signing key\n");
+ if (kp == NULL) {
+ rspamd_fprintf (stderr, "invalid signing key\n");
+ exit (EXIT_FAILURE);
+ }
+
+ if (rspamd_keypair_type (kp) != RSPAMD_KEYPAIR_SIGN) {
+ rspamd_fprintf (stderr, "unsuitable for signing key\n");
exit (EXIT_FAILURE);
}