mirror of
https://github.com/status-im/keycard-go.git
synced 2025-02-28 11:30:29 +00:00
fix info command in case where applet is not installed
This commit is contained in:
parent
97eeba53f8
commit
b4f62deb1f
@ -70,7 +70,12 @@ func (i *Initializer) Init() (*keycard.Secrets, error) {
|
||||
// Info returns a types.ApplicationInfo struct with info about the card.
|
||||
func (i *Initializer) Info() (types.ApplicationInfo, error) {
|
||||
cmdSet := keycard.NewCommandSet(i.c)
|
||||
logger.Info("select keycard applet")
|
||||
err := cmdSet.Select()
|
||||
if e, ok := err.(*apdu.ErrBadResponse); ok && e.Sw == globalplatform.SwFileNotFound {
|
||||
err = nil
|
||||
}
|
||||
|
||||
return cmdSet.ApplicationInfo, err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user