INNER CODE UNIT · Go

yubicoCAs

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

func yubicoCAs() (roots, intermediates *x509.CertPool, err error) {
	certPool := x509.NewCertPool()
	intermediates = x509.NewCertPool()

	if !certPool.AppendCertsFromPEM([]byte(yubicoPIVCAPEMAfter2018)) {
		return nil, nil, fmt.Errorf("failed to parse yubico cert")
	}

	bU2F, _ := pem.Decode([]byte(yubicoPIVCAPEMU2F))
	if bU2F == nil {
		return nil, nil, fmt.Errorf("failed to decode yubico pem data")
	}

	certU2F, err := x509.ParseCertificate(bU2F.Bytes)
	if err != nil {
		return nil, nil, fmt.Errorf("failed to parse yubico cert: %v", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…