fix error reset on Select

This commit is contained in:
Andrea Franz 2019-03-15 00:50:06 +01:00
parent 7c52fa75c3
commit bb9353b78a
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
1 changed files with 6 additions and 4 deletions

View File

@ -71,11 +71,13 @@ func (i *Initializer) Info() (*types.ApplicationInfo, error) {
logger.Info("select keycard applet")
err := cmdSet.Select()
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
}