agent_p = find_id(source_p->preClient->sasl_agent);
if(agent_p == NULL)
- sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s", me.id,
- source_p->id, parv[1]);
+ {
+ if (!strcmp(parv[1], "EXTERNAL") && source_p->certfp != NULL)
+ sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s %s", me.id,
+ source_p->id, parv[1],
+ source_p->certfp);
+ else
+ sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s", me.id,
+ source_p->id, parv[1]);
+ }
else
sendto_one(agent_p, ":%s ENCAP %s SASL %s %s C %s", me.id, agent_p->servptr->name,
source_p->id, agent_p->id, parv[1]);
if(*target_p->preClient->sasl_agent && strncmp(parv[1], target_p->preClient->sasl_agent, IDLEN))
return 0;
else if(!*target_p->preClient->sasl_agent)
- strlcpy(target_p->preClient->sasl_agent, parv[1], IDLEN);
+ rb_strlcpy(target_p->preClient->sasl_agent, parv[1], IDLEN);
if(*parv[3] == 'C')
sendto_one(target_p, "AUTHENTICATE %s", parv[4]);
else if(*parv[4] == 'S') {
sendto_one(target_p, form_str(RPL_SASLSUCCESS), me.name, EmptyString(target_p->name) ? "*" : target_p->name);
target_p->preClient->sasl_complete = 1;
- ServerStats->is_ssuc++;
+ ServerStats.is_ssuc++;
}
*target_p->preClient->sasl_agent = '\0'; /* Blank the stored agent so someone else can answer */
}
return;
data->preClient->sasl_out = data->preClient->sasl_complete = 0;
- ServerStats->is_sbad++;
+ ServerStats.is_sbad++;
if(!IsClosing(data))
sendto_one(data, form_str(ERR_SASLABORTED), me.name, EmptyString(data->name) ? "*" : data->name);