-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Currently we're assuming > 4.3.0 since I only have a v4.3.7 and v3.4.9 key to test with
Lines 137 to 152 in 2184bb6
func TestYubiKeyLoginNeeded(t *testing.T) { | |
yk, close := newTestYubiKey(t) | |
defer close() | |
testRequiresVersion(t, yk, 4, 3, 0) | |
if !ykLoginNeeded(yk.tx) { | |
t.Errorf("expected login needed") | |
} | |
if err := ykLogin(yk.tx, DefaultPIN); err != nil { | |
t.Fatalf("login: %v", err) | |
} | |
if ykLoginNeeded(yk.tx) { | |
t.Errorf("expected no login needed") | |
} | |
} |
If someone can confirm that that test passes with an older version of a YubiKey (e.g. 4.2.X), we can support PIN caching and PINPolicyOnce for those versions.
To test against a YubiKey, comment out the version and run (this will destroy all data on your PIV applet but leave GPG and U2F/WebAuthN data unaffected):
go test -v -run=^TestYubiKeyReset$ . -wipe-yubikey
go test -v -run=^TestYubiKeyLoginNeeded$ . -wipe-yubikey
Metadata
Metadata
Assignees
Labels
No labels