diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/_ak_gpg | 17 | ||||
-rwxr-xr-x | lib/_ak_zblock | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/_ak_gpg b/lib/_ak_gpg index af65fcb..b381067 100755 --- a/lib/_ak_gpg +++ b/lib/_ak_gpg @@ -149,6 +149,23 @@ _ak_gpg_encrypt_for_self(){ fi } +_ak_gpg_verify_clear_signature(){ + if [ ! -z $1 ] && [ -n "$1" ] && [ -f "$1" ] + then + fingerprint="$(cat $1 | _ak_gpg 2>&1 | grep RSA | awk '{print $5}')" + if [ $? -ne 0 ] + then + _ak_log_error "Could not verify signature" + exit 1 + fi + _ak_log_debug "$1 signed with $fingerprint" + cat $1 | _ak_gpg 2> /dev/null + else + _ak_log_error "Failed to verify detached signature $1 against $2" + exit 1 + fi +} + _ak_gpg_verify_signature(){ if [ ! -z $1 ] && [ -n "$1" ] && [ -f "$1" ] && [ ! -z $2 ] && [ -n "$2" ] && [ -f "$2" ] then diff --git a/lib/_ak_zblock b/lib/_ak_zblock index 73f5f9e..6657c25 100755 --- a/lib/_ak_zblock +++ b/lib/_ak_zblock @@ -685,7 +685,7 @@ _ak_zblock_repack(){ } _ak_zblock_pack(){ - if [ ! -z $2 ]; + if [ ! -z $2 ] then MESSAGE="$2" ACTION="$1" |