fix error reset on Select
This commit is contained in:
parent
7c52fa75c3
commit
bb9353b78a
|
@ -71,11 +71,13 @@ func (i *Initializer) Info() (*types.ApplicationInfo, error) {
|
||||||
|
|
||||||
logger.Info("select keycard applet")
|
logger.Info("select keycard applet")
|
||||||
err := cmdSet.Select()
|
err := cmdSet.Select()
|
||||||
|
if err != nil {
|
||||||
if e, ok := err.(*apdu.ErrBadResponse); ok && e.Sw == globalplatform.SwFileNotFound {
|
if e, ok := err.(*apdu.ErrBadResponse); ok && e.Sw == globalplatform.SwFileNotFound {
|
||||||
err = nil
|
err = nil
|
||||||
} else {
|
} else {
|
||||||
logger.Error("select failed", "error", err)
|
logger.Error("select failed", "error", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return cmdSet.ApplicationInfo, err
|
return cmdSet.ApplicationInfo, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue