code: func (ca *CA) SignCertificate(baseDir, name string, ous, sans []string, pub *ecdsa.PublicKey,
  	ku x509.KeyUsage, eku []x509.ExtKeyUsage) (*x509.Certificate, error) {
  
  	template := x509Template()
  	template.KeyUsage = ku
  	template.ExtKeyUsage = eku
  
  	//set the organization for the subject
  	subject := subjectTemplateAdditional(ca.Country, ca.Province, ca.Locality, ca.OrganizationalUnit, ca.StreetAddress, ca.PostalCode)
  	subject.CommonName = name
  
  	subject.OrganizationalUnit = append(subject.OrganizationalUnit, ous...)
  
  	template.Subject = subject
  	for _, san := range sans {
  		// try to parse as an IP address first
  		ip := net.ParseIP(san)
  		if ip != nil {
  			template.IPAddresses = append(template.IPAddresses, ip)
  		} else {
  			template.DNSNames = append(template.DNSNames, san)
  		}
  	}
  
  	cert, err := genCertificateECDSA(baseDir, name, &template, ca.SignCert,
  		pub, ca.Signer)
  
  	if err != nil {
  		return nil, err
  	}
  
  	return cert, nil
  }
docs: // SignCertificate creates a signed certificate based on a built-in template
  // and saves it in baseDir/name