mirror of
https://github.com/status-im/status-keycard-go.git
synced 2025-02-24 20:18:06 +00:00
add unblockPIN implementation
This commit is contained in:
parent
736adcccad
commit
a7c15e6c91
@ -2,7 +2,6 @@ package statuskeycardgo
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha512"
|
"crypto/sha512"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ebfe/scard"
|
"github.com/ebfe/scard"
|
||||||
@ -224,8 +223,19 @@ func (kc *keycardContext) verifyPin(pin string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (kc *keycardContext) unblockPIN(puk string, newPin string) error {
|
func (kc *keycardContext) unblockPIN(puk string, newPIN string) error {
|
||||||
return errors.New("not implemented yet")
|
<-kc.connected
|
||||||
|
if kc.runErr != nil {
|
||||||
|
return kc.runErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err := kc.cmdSet.UnblockPIN(puk, newPIN)
|
||||||
|
if err != nil {
|
||||||
|
l("unblockPIN failed %+v", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (kc *keycardContext) generateKey() ([]byte, error) {
|
func (kc *keycardContext) generateKey() ([]byte, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user