INNER CODE UNIT · Go
isUnsupportedMatchPolicy
go-piv/piv-go · v2/piv/bio_integration_test.go:152
func isUnsupportedMatchPolicy(err error) bool {
var apdu *apduErr
if !errors.As(err, &apdu) {
return false
}
switch apdu.Status() {
case 0x6a80, 0x6a81, 0x6a86, 0x6d00:
return true
default:
return false
}
}
func getPublicKeyFromSlot(yk *YubiKey) (crypto.PublicKey, error) {
cert, err := yk.Certificate(SlotAuthentication)
if err == nil {
return cert.PublicKey, nil
}