temporarily remove pair and status commands

This commit is contained in:
Andrea Franz 2019-03-11 12:53:02 +01:00
parent 76f58a670d
commit 0a248c09c1
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D

View File

@ -48,8 +48,8 @@ func init() {
"info": commandInfo, "info": commandInfo,
"delete": commandDelete, "delete": commandDelete,
"init": commandInit, "init": commandInit,
"pair": commandPair, // "pair": commandPair,
"status": commandStatus, // "status": commandStatus,
} }
if len(os.Args) < 2 { if len(os.Args) < 2 {
@ -239,35 +239,35 @@ func commandInit(card *scard.Card) error {
return nil return nil
} }
func commandPair(card *scard.Card) error { // func commandPair(card *scard.Card) error {
i := NewInitializer(card) // i := NewInitializer(card)
pairingPass := ask("Pairing password") // pairingPass := ask("Pairing password")
pin := ask("PIN") // pin := ask("PIN")
info, err := i.Pair(pairingPass, pin) // info, err := i.Pair(pairingPass, pin)
if err != nil { // if err != nil {
return err // return err
} // }
fmt.Printf("Pairing key 0x%x\n", info.Key) // fmt.Printf("Pairing key 0x%x\n", info.Key)
fmt.Printf("Pairing Index %d\n", info.Index) // fmt.Printf("Pairing Index %d\n", info.Index)
return nil // return nil
} // }
func commandStatus(card *scard.Card) error { // func commandStatus(card *scard.Card) error {
i := NewInitializer(card) // i := NewInitializer(card)
index := askUint8("Pairing index") // index := askUint8("Pairing index")
key := askHex("Pairing key") // key := askHex("Pairing key")
appStatus, err := i.Status(index, key) // appStatus, err := i.Status(index, key)
if err != nil { // if err != nil {
return err // return err
} // }
fmt.Printf("Pin retry count: %d\n", appStatus.PinRetryCount) // fmt.Printf("Pin retry count: %d\n", appStatus.PinRetryCount)
fmt.Printf("PUK retry count: %d\n", appStatus.PUKRetryCount) // fmt.Printf("PUK retry count: %d\n", appStatus.PUKRetryCount)
fmt.Printf("Key initialized: %v\n", appStatus.KeyInitialized) // fmt.Printf("Key initialized: %v\n", appStatus.KeyInitialized)
fmt.Printf("Public key derivation: %v\n", appStatus.PubKeyDerivation) // fmt.Printf("Public key derivation: %v\n", appStatus.PubKeyDerivation)
return nil // return nil
} // }