code: func PopulateSubjectFromCSR(s *signer.Subject, req pkix.Name) pkix.Name {
  	// if no subject, use req
  	if s == nil {
  		return req
  	}
  
  	name := s.Name()
  
  	if name.CommonName == "" {
  		name.CommonName = req.CommonName
  	}
  
  	replaceSliceIfEmpty(&name.Country, &req.Country)
  	replaceSliceIfEmpty(&name.Province, &req.Province)
  	replaceSliceIfEmpty(&name.Locality, &req.Locality)
  	replaceSliceIfEmpty(&name.Organization, &req.Organization)
  	replaceSliceIfEmpty(&name.OrganizationalUnit, &req.OrganizationalUnit)
  	if name.SerialNumber == "" {
  		name.SerialNumber = req.SerialNumber
  	}
  	return name
  }
docs: // PopulateSubjectFromCSR has functionality similar to Name, except
  // it fills the fields of the resulting pkix.Name with req's if the
  // subject's corresponding fields are empty