From 0d620a6eb276b6610913a5d944e380f00d589a43 Mon Sep 17 00:00:00 2001 From: Andrey Rys Date: Sun, 2 Aug 2020 19:16:46 +0200 Subject: [PATCH] -V: fix when used with -P --- VERSION | 2 +- tfc_error.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 7facc89..81b5c5d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -36 +37 diff --git a/tfc_error.c b/tfc_error.c index 16e4cd0..17efe74 100644 --- a/tfc_error.c +++ b/tfc_error.c @@ -91,11 +91,14 @@ void usage(void) tfc_yesno is_embedded_prog = NO; if (optopt == 'V') { - char shash[64]; tfc_say("tfcrypt toolkit, version %s.", _TFCRYPT_VERSION); - hash_defaults(shash, sizeof(shash)); - tfc_say("Defaults hash: %s", shash); - memset(shash, 0, sizeof(shash)); + if (ctr_mode != TFC_MODE_PLAIN) { + char shash[64]; + + hash_defaults(shash, sizeof(shash)); + tfc_say("Defaults hash: %s", shash); + memset(shash, 0, sizeof(shash)); + } xexit(0); } -- 2.31.1