code: func validator(req *csr.CertificateRequest) error {
  	if req.CN != "" {
  		return nil
  	}
  
  	if len(req.Names) == 0 {
  		return cferr.Wrap(cferr.PolicyError, cferr.InvalidRequest, errors.New("missing subject information"))
  	}
  
  	for i := range req.Names {
  		if csr.IsNameEmpty(req.Names[i]) {
  			return cferr.Wrap(cferr.PolicyError, cferr.InvalidRequest, errors.New("missing subject information"))
  		}
  	}
  
  	return nil
  }
docs: // validator contains the default validation logic for certificate
  // authority certificates. The only requirement here is that the
  // certificate have a non-empty subject field.