use NewCommandSelect
This commit is contained in:
parent
8adf2b6627
commit
744a584d51
|
@ -41,14 +41,7 @@ func (cs *CommandSet) Select() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := apdu.NewCommand(
|
cmd := globalplatform.NewCommandSelect(instanceAID)
|
||||||
0x00,
|
|
||||||
globalplatform.InsSelect,
|
|
||||||
uint8(0x04),
|
|
||||||
uint8(0x00),
|
|
||||||
instanceAID,
|
|
||||||
)
|
|
||||||
|
|
||||||
cmd.SetLe(0)
|
cmd.SetLe(0)
|
||||||
resp, err := cs.c.Send(cmd)
|
resp, err := cs.c.Send(cmd)
|
||||||
if err = cs.checkOK(resp, err); err != nil {
|
if err = cs.checkOK(resp, err); err != nil {
|
||||||
|
|
|
@ -31,14 +31,7 @@ func (cs *CommandSet) Select() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *CommandSet) SelectAID(aid []byte) error {
|
func (cs *CommandSet) SelectAID(aid []byte) error {
|
||||||
cmd := apdu.NewCommand(
|
cmd := NewCommandSelect(aid)
|
||||||
0x00,
|
|
||||||
InsSelect,
|
|
||||||
uint8(0x04),
|
|
||||||
uint8(0x00),
|
|
||||||
aid,
|
|
||||||
)
|
|
||||||
|
|
||||||
cmd.SetLe(0)
|
cmd.SetLe(0)
|
||||||
resp, err := cs.c.Send(cmd)
|
resp, err := cs.c.Send(cmd)
|
||||||
|
|
||||||
|
|
|
@ -56,10 +56,6 @@ func NewCommandSelect(aid []byte) *apdu.Command {
|
||||||
aid,
|
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
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue