INNER CODE UNIT · Go

TestPINPolicyMatchOnceSingleVerification

go-piv/piv-go · v2/piv/bio_integration_test.go:107

func TestPINPolicyMatchOnceSingleVerification(t *testing.T) {
	requireBioTests(t)

	yk, close := newTestYubiKey(t)
	defer close()

	key := Key{
		Algorithm:   AlgorithmEC256,
		PINPolicy:   PINPolicyMatchOnce,
		TouchPolicy: TouchPolicyNever,
	}
	pub, err := yk.GenerateKey(DefaultManagementKey, SlotAuthentication, key)
	if err != nil {
		if isUnsupportedMatchPolicy(err) {
			t.Skipf("match policy not supported: %v", err)
		}
		t.Fatalf("generating key: %v", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…