From 74895bb582d948797bad5046d16e6db002d81a78 Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Fri, 15 Mar 2019 01:13:28 +0100 Subject: [PATCH] rmeove pub key derivation field from get status response --- cmd/keycard/main.go | 1 - types/application_status.go | 13 +++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/cmd/keycard/main.go b/cmd/keycard/main.go index 015db9d..9bbb6e0 100644 --- a/cmd/keycard/main.go +++ b/cmd/keycard/main.go @@ -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 } diff --git a/types/application_status.go b/types/application_status.go index b19a6c2..ae7b5a2 100644 --- a/types/application_status.go +++ b/types/application_status.go @@ -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 }