mirror of
https://github.com/status-im/keycard-go.git
synced 2025-01-31 14:15:09 +00:00
temporarily remove pair and status commands
This commit is contained in:
parent
76f58a670d
commit
0a248c09c1
@ -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
|
||||||
}
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user