check if token == P11M and add debug

This commit is contained in:
Jakobus Schürz 2021-05-11 11:51:37 +02:00
parent 2303caec48
commit 3c67a1f7ba

View file

@ -283,6 +283,8 @@ agent-load-identity-keys () {
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
logdebug "P11M: $P11M - key: $key"
[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
tokenfingerprint="$(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}')" tokenfingerprint="$(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}')"
if [[ ${fingerprints[*]} =~ "$tokenfingerprint" ]]; then if [[ ${fingerprints[*]} =~ "$tokenfingerprint" ]]; then
logdebug "token: $key ($tokenfingerprint) is loaded" logdebug "token: $key ($tokenfingerprint) is loaded"