fix token ask for PIN, if available
This commit is contained in:
parent
7ca1143c4b
commit
2b97122a66
1 changed files with 3 additions and 1 deletions
|
@ -834,12 +834,14 @@ token(){
|
|||
|
||||
[ -z "${P11M+x}" ] && { P11M=/usr/lib64/p11-kit-proxy.so; export P11M; }
|
||||
|
||||
tmppubkey="${XDG_RUNTIME_DIR}/token.pub"
|
||||
loginfo "$(ssh-keygen -D $P11M >$tmppubkey)"
|
||||
# Usage:
|
||||
# token <identity> will load token in agent. does nothing, if token is already loaded
|
||||
# token -r|-f|--reload-token <identity> will remove token from agent and add it again (if plugged off and plugged in again
|
||||
# startagent -t $@
|
||||
# loadagent $@
|
||||
loginfo "$(ssh-add -s $P11M || { ssh-add -e $P11M; ssh-add -s $P11M; } )"
|
||||
loginfo "$(ssh-add -T ${tmppubkey} || { ssh-add -e $P11M; ssh-add -s $P11M; } )"
|
||||
loginfo "$(ssh-add -l)"
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue