Changeset - 47859cb4f774
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-06-29 04:18:12
branko@majic.rs
Make sure that when exporting a public key only one specific subkey is exported. Fixed a typo in error message.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
openpgp/gitprotect.sh
Show inline comments
 
@@ -255,7 +255,7 @@ elif [[ $command == "addkey" ]]; then
 
            if ! gpg2 --batch --list-keys "$key" >/dev/null 2>&1; then
 
                echo "WARN: Key with identifier '$key' not found in user's GnuPG keyring. Skipping." >&2
 
            else
 
                ! gpg2 --batch --armor --export "$key" | gpg2 "${gnupgArgs[@]}" --import
 
                ! gpg2 --batch --armor --export "${key}!" | gpg2 "${gnupgArgs[@]}" --import
 
                if [[ ${PIPESTATUS[0]} != 0 ]]; then
 
                    echo "ERROR: Failed to add key with identifier '$key')." >&2
 
                fi
 
@@ -303,7 +303,7 @@ elif [[ $command = "encrypt" ]]; then
 

	
 
    # Make sure that we have at least a single recipient.
 
    if [[ "${#recipients[@]}" == 0 ]]; then
 
        echo "ERROR: No suitable recipients were found in the keyring. Did you forget ot add keys?" >&2
 
        echo "ERROR: No suitable recipients were found in the keyring. Did you forget to add keys?" >&2
 
        exit "$ERR_NORECIPIENTS"
 
    fi
 

	
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now