You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: service.go
    path of file: ./repos/linkerd2/pkg/identity
    
    the code of the file until where you have to start completion: package identity

import (
	"context"
	"crypto/sha256"
	"crypto/x509"
	"encoding/hex"
	"errors"
	"fmt"
	"strings"
	"sync"
	"time"

	v1 "k8s.io/api/core/v1"

    
func (svc *Service) loadCredentials() (tls.Issuer, error) {
	creds, err := tls.ReadPEMCreds(
		svc.issuerPathKey,
		svc.issuerPathCrt,
	)

	if err != nil {
		return nil, fmt.Errorf("failed to read CA from disk: %w", err)
	}

	// Don't verify with dns name as this is not a leaf certificate
	if err := creds.Crt.Verify(svc.trustAnchors, "", time.Time{}); err != nil {
		return nil, fmt.Errorf("failed to verify issuer credentials for '%s' with trust anchors: %w", svc.expectedName, err)
	}

	if !creds.Certificate.IsCA {
		return nil, fmt.Errorf("failed to verify issuer certificate: it must be an intermediate-CA, but it is not")
	}

	log.Debugf("Loaded issuer cert: %s", creds.EncodeCertificatePEM())
	return tls.NewCA(*creds, *svc.validity), nil
}