diff --git a/VERSION b/VERSION index 2cfabea..8cbf02c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.11 +0.0.12 diff --git a/shell.go b/shell.go index ffb3400..f2bf66e 100644 --- a/shell.go +++ b/shell.go @@ -204,12 +204,17 @@ func (s *Shell) commandGPSendAPDU(args ...string) error { } logger.Info(fmt.Sprintf("send apdu %x", rawCmd)) - _, err = channel.Send(cmd) + resp, err := channel.Send(cmd) if err != nil { logger.Error("send apdu failed", "error", err) return err } + if resp.Sw != apdu.SwOK { + logger.Error("unexpected response", "sw", fmt.Sprintf("%x", resp.Sw)) + return err + } + return nil }