use NewCommandSelect
This commit is contained in:
parent
8adf2b6627
commit
744a584d51
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue