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