aboutsummaryrefslogtreecommitdiffstats
path: root/sm/decrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r--sm/decrypt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c
index 76524b51f..df0edc2ae 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -333,6 +333,11 @@ gpgsm_decrypt (CTRL ctrl, int in_fd, FILE *out_fp)
numbuf, algoid?algoid:"?", NULL);
}
+ /* If it seems that this is not an ecrypted message we
+ return a more sensible error code. */
+ if (!algoid)
+ rc = gpg_error (GPG_ERR_NO_DATA);
+
goto leave;
}
dfparm.algo = algo;