INNER CODE UNIT · Go
TestPINPolicyMatchOnceIntegration
go-piv/piv-go · v2/piv/bio_integration_test.go:17
func TestPINPolicyMatchOnceIntegration(t *testing.T) {
requireBioTests(t)
yk, close := newTestYubiKey(t)
defer close()
pub, err := getPublicKeyFromSlot(yk)
if err != nil {
key := Key{
Algorithm: AlgorithmEC256,
PINPolicy: PINPolicyMatchAlways,
TouchPolicy: TouchPolicyNever,
}
pub, err = yk.GenerateKey(DefaultManagementKey, SlotAuthentication, key)
if err != nil {
if isUnsupportedMatchPolicy(err) {
t.Skipf("match policy not supported: %v", err)
}