rmeove pub key derivation field from get status response
This commit is contained in:
parent
b1872e0e0f
commit
74895bb582
|
@ -271,7 +271,6 @@ func commandStatus(card *scard.Card) error {
|
|||
fmt.Printf("Pin retry count: %d\n", appStatus.PinRetryCount)
|
||||
fmt.Printf("PUK retry count: %d\n", appStatus.PUKRetryCount)
|
||||
fmt.Printf("Key initialized: %v\n", appStatus.KeyInitialized)
|
||||
fmt.Printf("Public key derivation: %v\n", appStatus.PubKeyDerivation)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -10,10 +10,9 @@ import (
|
|||
var ErrApplicationStatusTemplateNotFound = errors.New("application status template not found")
|
||||
|
||||
type ApplicationStatus struct {
|
||||
PinRetryCount int
|
||||
PUKRetryCount int
|
||||
KeyInitialized bool
|
||||
PubKeyDerivation bool
|
||||
PinRetryCount int
|
||||
PUKRetryCount int
|
||||
KeyInitialized bool
|
||||
}
|
||||
|
||||
func ParseApplicationStatus(data []byte) (*ApplicationStatus, error) {
|
||||
|
@ -38,11 +37,5 @@ func ParseApplicationStatus(data []byte) (*ApplicationStatus, error) {
|
|||
}
|
||||
}
|
||||
|
||||
if keyDerivationSupported, err := apdu.FindTagN(tpl, 1, uint8(0x01)); err == nil {
|
||||
if bytes.Equal(keyDerivationSupported, []byte{0xFF}) {
|
||||
appStatus.PubKeyDerivation = true
|
||||
}
|
||||
}
|
||||
|
||||
return appStatus, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue