Skip to content

Commit

Permalink
improves delete
Browse files Browse the repository at this point in the history
  • Loading branch information
chripo committed Oct 5, 2021
1 parent 3097efb commit 40f0047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keyring
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ EOF
do
[ ! -e "${key}" ] && continue
fp="$(ssh-keygen -l -E sha256 -f "${key}" | cut -d' ' -f2 | cut -d: -f2)"
kid="$(gpg-connect-agent 'keyinfo --ssh-list --ssh-fpr=sha256' /bye | grep -- "${fp}" | cut -d' ' -f3)"
kid="$(gpg-connect-agent 'KEYINFO --ssh-list --ssh-fpr=sha256' /bye | grep -- "${fp}" | cut -s -d' ' -f3)"
[ -z "${kid}" ] && printf 'key not in keyring: %s\n' "${fp}" && continue
gpg-connect-agent "delete_key --force ${kid}" /bye
gpg-connect-agent "DELETE_KEY --force ${kid}" /bye
done
;;

Expand Down

0 comments on commit 40f0047

Please sign in to comment.