add KeyUID to app info
This commit is contained in:
parent
09193d93e3
commit
c3885e8a76
|
@ -19,6 +19,7 @@ type ApplicationInfo struct {
|
||||||
PublicKey []byte
|
PublicKey []byte
|
||||||
Version []byte
|
Version []byte
|
||||||
AvailableSlots []byte
|
AvailableSlots []byte
|
||||||
|
KeyUID []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func Select(c globalplatform.Channel, aid []byte) (*ApplicationInfo, error) {
|
func Select(c globalplatform.Channel, aid []byte) (*ApplicationInfo, error) {
|
||||||
|
@ -88,10 +89,16 @@ func parseApplicationInfo(resp *apdu.Response) (*ApplicationInfo, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyUID, err := apdu.FindTagN(resp.Data, 0, lightwallet.TagApplicationInfoTemplate, uint8(0x8E))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return &ApplicationInfo{
|
return &ApplicationInfo{
|
||||||
InstanceUID: instanceUID,
|
InstanceUID: instanceUID,
|
||||||
PublicKey: pubKey,
|
PublicKey: pubKey,
|
||||||
Version: appVersion,
|
Version: appVersion,
|
||||||
AvailableSlots: availableSlots,
|
AvailableSlots: availableSlots,
|
||||||
|
KeyUID: keyUID,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue