add KeyUID to app info

This commit is contained in:
Andrea Franz 2018-10-24 13:44:58 +02:00
parent 09193d93e3
commit c3885e8a76
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,7 @@ type ApplicationInfo struct {
PublicKey []byte
Version []byte
AvailableSlots []byte
KeyUID []byte
}
func Select(c globalplatform.Channel, aid []byte) (*ApplicationInfo, error) {
@ -88,10 +89,16 @@ func parseApplicationInfo(resp *apdu.Response) (*ApplicationInfo, error) {
return nil, err
}
keyUID, err := apdu.FindTagN(resp.Data, 0, lightwallet.TagApplicationInfoTemplate, uint8(0x8E))
if err != nil {
return nil, err
}
return &ApplicationInfo{
InstanceUID: instanceUID,
PublicKey: pubKey,
Version: appVersion,
AvailableSlots: availableSlots,
KeyUID: keyUID,
}, nil
}