#!/bin/sh# SPDX-License-Identifier: LGPL-2.1-or-laterset -u# The first thing we do is list loaded keysloaded=$(ssh-add -L)result="$?"set -eprintf "$loaded"# Get info for each loaded key# ssh-keygen -l -f - is not# supported everywhere so use tempfileif [ $result -eq 0 ]; thentempfile=$(mktemp)echo "$loaded" | while read line; doecho "$line" > "$tempfile"printf "\v%s\v\v" "$line"ssh-keygen -l -f "$tempfile" || truedonerm $tempfilefi# Try to list keys in this directorycd "$1" || exit 0# After that each .pub file gets its on set of blocksfor file in *.pub; doprintf "\v"cat "$file"printf "\v%s\v" "$file"ssh-keygen -l -f "$file" || truedone