code: func LoadCertificateAuthority(pkiDir string, baseName string) (*x509.Certificate, crypto.Signer, error) {
  	// Checks if certificate authority exists in the PKI directory
  	if !pkiutil.CertOrKeyExist(pkiDir, baseName) {
  		return nil, nil, errors.Errorf("couldn't load %s certificate authority from %s", baseName, pkiDir)
  	}
  
  	// Try to load certificate authority .crt and .key from the PKI directory
  	caCert, caKey, err := pkiutil.TryLoadCertAndKeyFromDisk(pkiDir, baseName)
  	if err != nil {
  		return nil, nil, errors.Wrapf(err, "failure loading %s certificate authority", baseName)
  	}
  
  	// Make sure the loaded CA cert actually is a CA
  	if !caCert.IsCA {
  		return nil, nil, errors.Errorf("%s certificate is not a certificate authority", baseName)
  	}
  
  	return caCert, caKey, nil
  }
docs: // LoadCertificateAuthority tries to load a CA in the given directory with the given name.