check if only one token is plugged in

This commit is contained in:
Jakobus Schürz 2023-02-18 21:21:15 +01:00
parent 155d82a228
commit 2b25173b37

View file

@ -298,9 +298,9 @@ agent_load_identity_keys () {
logtrace "fingerprints: ${fingerprints[*]}"
logtrace "tokenfingerprints count: ${#tokenfingerprints[@]}"
# if [ ${#tokenfingerprints[@]} -gt 1 ]; then
# logerr "Found ${#tokenfingerprints[@]} in p11-kit-proxy! Check if only one token is plugged into your computer"
# else
if [ ${#tokenfingerprints[@]} -gt 1 ]; then
logerr "Found ${#tokenfingerprints[@]} in p11-kit-proxy! Check if only one token is plugged into your computer"
else
tokenfingerprint=${tokenfingerprints[0]}
logtrace "tokenfingerprint: ${tokenfingerprint}"
if [[ "${fingerprints[@]}" =~ "$tokenfingerprint" ]]; then