From 1ee5362afce7dd0621504dc4211296a707019771 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Fri, 4 Mar 2022 18:06:31 +0000 Subject: [PATCH] Make rehash respect FILE_HASH_DISABLED - Improve test hash functions Signed-off-by: Richard T Bonhomme --- easytls | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/easytls b/easytls index 471bc1d..12d876c 100755 --- a/easytls +++ b/easytls @@ -10000,7 +10000,7 @@ main () case "${cmd}" in rehash) # If hashes have unsynced - unset -v FILE_HASH_DISABLED + #unset -v FILE_HASH_DISABLED easytls_rehash "$@" || die "easytls_rehash" #AUTO_CHECK_DISABLED=1 #easytls_verb_io off @@ -10014,13 +10014,18 @@ main () gmh|generate-master-hash) return_hashes=1 generate_master_hash "$@" || die "generate_master_hash" + easytls_verbose print "generated_master_hash: ${generated_master_hash}" + easytls_verbose unset -v return_hashes=1 - return 0 + AUTO_CHECK_DISABLED=1 + skip_master_hash=1 + break ;; smh|save-master-hash) return_hashes=1 verify_master_hash "$@" || die "verify_faster_hash" + easytls_verbose print "generated_master_hash: ${generated_master_hash}" print "saved_master_hash : ${saved_master_hash}" print @@ -10033,16 +10038,23 @@ main () update_master_hash=1 save_master_hash "$@" || die "save_master_hash" print "save_master_hash: ${generated_master_hash}" + easytls_verbose unset -v return_hashes=1 - return 0 + AUTO_CHECK_DISABLED=1 + skip_master_hash=1 + break ;; vmh|verify-master-hash) return_hashes=1 verify_master_hash "$@" || die "verify_master_hash" + easytls_verbose print "generated_master_hash: ${generated_master_hash}" print "saved_master_hash : ${saved_master_hash}" + easytls_verbose unset -v return_hashes=1 - return 0 + AUTO_CHECK_DISABLED=1 + skip_master_hash=1 + break ;; esac