code: func (c *fabricCAAdapter) Reenroll(key core.Key, cert []byte, request *api.ReenrollmentRequest) ([]byte, error) {
  
  	logger.Debugf("Re Enrolling user with provided key/cert pair for CA [%s]", c.caClient.Config.CAName)
  
  	careq := &caapi.ReenrollmentRequest{
  		CAName:  c.caClient.Config.CAName,
  		Profile: request.Profile,
  		Label:   request.Label,
  	}
  	if len(request.AttrReqs) > 0 {
  		attrs := make([]*caapi.AttributeRequest, len(request.AttrReqs))
  		for i, a := range request.AttrReqs {
  			attrs[i] = &caapi.AttributeRequest{Name: a.Name, Optional: a.Optional}
  		}
  		careq.AttrReqs = attrs
  	}
  
  	caidentity, err := c.newIdentity(key, cert)
  	if err != nil {
  		return nil, errors.WithMessage(err, "failed to create CA signing identity")
  	}
  
  	caresp, err := caidentity.Reenroll(careq)
  	if err != nil {
  		return nil, errors.WithMessage(err, "reenroll failed")
  	}
  
  	return caresp.Identity.GetECert().Cert(), nil
  }
docs: // Reenroll handles re-enrollment