diff --git a/functions.sh b/functions.sh index d61b0bb..96027c9 100755 --- a/functions.sh +++ b/functions.sh @@ -858,7 +858,7 @@ token(){ token-extract-pubkey() { if pkcs11-tool --module $P11M --list-token-slots >&2 ;then - ssh-keygen -i -m pkcs8 -f <(pkcs11-tool --module $P11M -r --type pubkey $1 $2 |openssl rsa -pubin -inform DER ) + ssh-keygen -i -m pkcs8 -f <(pkcs11-tool --module $P11M -r --type pubkey ${1:---label} ${1} |openssl rsa -pubin -inform DER ) if [ $? -gt 0 ] ; then token-list-objects fi