Skip to content

Commit d51de19

Browse files
Stephanie LaknerMeneDev
authored andcommitted
🚑 Continue after error that appears when using a Yubikey 5
Trying to read the Yubikey's serial fails for the Yubikey 5. But since we don't use the serial anywhere, this is not critical or harmful and we can continue as if nothing happened.
1 parent 006edbd commit d51de19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

yubikey/scard/scard_yubikey.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ func (key *scardYubiKey) GetCodeWithPassword(pwd string) (string, error) {
6363

6464
rsp, err := key.selectAid(AID_OTP)
6565
if err != nil {
66-
return "", err
66+
fmt.Printf("Error setting 'AID_OTP': %s\n", err)
6767
}
6868

6969
serial, err := key.readSerial()
7070
if err != nil {
71-
fmt.Println("Error Transmit:", err)
72-
return "", err
71+
fmt.Printf("Error reading serial: %s\n", err)
7372
}
7473
fmt.Printf("% 0x \n", rsp)
7574
fmt.Printf("serial %d\n", serial)

0 commit comments

Comments
 (0)