aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands/acert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pki/commands/acert.c')
-rw-r--r--src/pki/commands/acert.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pki/commands/acert.c b/src/pki/commands/acert.c
index d49365db5..4a11c4716 100644
--- a/src/pki/commands/acert.c
+++ b/src/pki/commands/acert.c
@@ -53,8 +53,7 @@ static int acert()
case 'h':
goto usage;
case 'g':
- digest = enum_from_name(hash_algorithm_short_names, arg);
- if (digest == -1)
+ if (!enum_from_name(hash_algorithm_short_names, arg, &digest))
{
error = "invalid --digest type";
goto usage;