Changeset - 698830f87ee7
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-06-29 04:17:29
branko@majic.rs
Don't list keys used for encryption when decrypting a file.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
openpgp/gitprotect.sh
Show inline comments
 
@@ -287,14 +287,14 @@ elif [[ $command = "decrypt" ]]; then
 

	
 
    # Process each GnuPG-encrypted file.
 
    while read filePath; do
 
        filename=$(basename "$filePath" ".gpg")
 

	
 
        # Remove the "decrypted" file if decryption had failed.
 
        if ! gpg2 --decrypt "$filePath" > "decrypted/$filename"; then
 
            echo "ERROR: Failed to decrypt file '$filepath'. No private key available." >&2
 
        if ! gpg2 --quiet --decrypt "$filePath" > "decrypted/$filename"; then
 
            echo "ERROR: Failed to decrypt file '$filePath'. No private key available." >&2
 
            rm "decrypted/$filename"
 
        fi
 
    done < <(find . -maxdepth 1 -name '*.gpg')
 
else
 
    echo "ERROR: Unsupported command '$command'" >&2
 
fi
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now