Skip to content

Commit

Permalink
Fix cosmetic issue in EAP-SIM error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 28, 2014
1 parent 7f209e7 commit fdbaef8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/rlm_eap/types/rlm_eap_sim/rlm_eap_sim.c
Expand Up @@ -205,11 +205,11 @@ static int eap_sim_get_challenge(eap_handler_t *handler, VALUE_PAIR *vps, int id
}
if (!vp) {
/* bad, we can't find stuff! */
REDEBUG("EAP-SIM-Challenge%i not found", idx);
REDEBUG("EAP-SIM-RAND%i not found", idx + 1);
return 0;
}
if(vp->length != EAPSIM_RAND_SIZE) {
REDEBUG("EAP-SIM-challenge%i is not 8 bytes, got %zu bytes", idx, vp->length);
if (vp->length != EAPSIM_RAND_SIZE) {
REDEBUG("EAP-SIM-RAND%i is not 8 bytes, got %zu bytes", idx + 1, vp->length);
return 0;
}
memcpy(ess->keys.rand[idx], vp->vp_strvalue, EAPSIM_RAND_SIZE);
Expand All @@ -221,11 +221,11 @@ static int eap_sim_get_challenge(eap_handler_t *handler, VALUE_PAIR *vps, int id
}
if (!vp) {
/* bad, we can't find stuff! */
REDEBUG("EAP-SIM-SRES%i not found", idx);
REDEBUG("EAP-SIM-SRES%i not found", idx + 1);
return 0;
}
if (vp->length != EAPSIM_SRES_SIZE) {
REDEBUG("EAP-SIM-SRES%i is not 16 bytes, got %zu bytes", idx, vp->length);
REDEBUG("EAP-SIM-SRES%i is not 16 bytes, got %zu bytes", idx + 1, vp->length);
return 0;
}
memcpy(ess->keys.sres[idx], vp->vp_strvalue, EAPSIM_SRES_SIZE);
Expand All @@ -237,11 +237,11 @@ static int eap_sim_get_challenge(eap_handler_t *handler, VALUE_PAIR *vps, int id
}
if (!vp) {
/* bad, we can't find stuff! */
REDEBUG("EAP-SIM-Kc%i not found", idx);
REDEBUG("EAP-SIM-Kc%i not found", idx + 1);
return 0;
}
if (vp->length != EAPSIM_Kc_SIZE) {
REDEBUG("EAP-SIM-Kc%i is not 16 bytes, got %zu bytes", idx, vp->length);
REDEBUG("EAP-SIM-Kc%i is not 16 bytes, got %zu bytes", idx + 1, vp->length);
return 0;
}
memcpy(ess->keys.Kc[idx], vp->vp_strvalue, EAPSIM_Kc_SIZE);
Expand Down

0 comments on commit fdbaef8

Please sign in to comment.