INNER CODE UNIT · Go

func

go-piv/piv-go · v2/piv/key.go:242

func (v *Verifier) Verify(attestationCert, slotCert *x509.Certificate) (*Attestation, error) {
	o := x509.VerifyOptions{KeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageAny}}
	o.Roots = v.Roots
	var intermediates *x509.CertPool
	if o.Roots == nil {
		cas, in, err := yubicoCAs()
		if err != nil {
			return nil, fmt.Errorf("failed to load yubico CAs: %v", err)
		}
		o.Roots = cas
		intermediates = in
	}

	if intermediates == nil {
		intermediates = x509.NewCertPool()
	}
	o.Intermediates = intermediates

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…