INNER CODE UNIT · Go
Verify
go-piv/piv-go · v2/piv/key.go:222
func Verify(attestationCert, slotCert *x509.Certificate) (*Attestation, error) {
var v Verifier
return v.Verify(attestationCert, slotCert)
}
// Verifier allows specifying options when verifying attestations produced by
// YubiKeys.
type Verifier struct {
// Root certificates to use to validate challenges. If nil, this defaults to Yubico's
// CA bundle.
//
// https://developers.yubico.com/PIV/Introduction/PIV_attestation.html
// https://developers.yubico.com/PIV/Introduction/piv-attestation-ca.pem
// https://developers.yubico.com/U2F/yubico-u2f-ca-certs.txt
Roots *x509.CertPool
}
// Verify proves that a key was generated on a YubiKey.