diff --git a/command_set.go b/command_set.go index 08d40ff..20a9cbd 100644 --- a/command_set.go +++ b/command_set.go @@ -41,14 +41,7 @@ func (cs *CommandSet) Select() error { return err } - cmd := apdu.NewCommand( - 0x00, - globalplatform.InsSelect, - uint8(0x04), - uint8(0x00), - instanceAID, - ) - + cmd := globalplatform.NewCommandSelect(instanceAID) cmd.SetLe(0) resp, err := cs.c.Send(cmd) if err = cs.checkOK(resp, err); err != nil { diff --git a/globalplatform/command_set.go b/globalplatform/command_set.go index 2463e91..d5af556 100644 --- a/globalplatform/command_set.go +++ b/globalplatform/command_set.go @@ -31,14 +31,7 @@ func (cs *CommandSet) Select() error { } func (cs *CommandSet) SelectAID(aid []byte) error { - cmd := apdu.NewCommand( - 0x00, - InsSelect, - uint8(0x04), - uint8(0x00), - aid, - ) - + cmd := NewCommandSelect(aid) cmd.SetLe(0) resp, err := cs.c.Send(cmd) diff --git a/globalplatform/commands.go b/globalplatform/commands.go index 094a4f0..bb2a681 100644 --- a/globalplatform/commands.go +++ b/globalplatform/commands.go @@ -56,10 +56,6 @@ func NewCommandSelect(aid []byte) *apdu.Command { aid, ) - // with T=0 we can both set or not the Le value - // with T=1 it works only without Le - // c.SetLe(0x00) - return c }