Skip to content
Browse files

use correct packet for channel binding. Closes #1990

  • Loading branch information
alandekok committed May 16, 2017
1 parent fba1d6f commit 3047fc60a7df94c101e525b2e9a4b4a184232cec
@@ -280,15 +280,15 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
return packet;

VALUE_PAIR *eap_chbind_packet2vp(REQUEST *request, chbind_packet_t *packet)
VALUE_PAIR *eap_chbind_packet2vp(RADIUS_PACKET *packet, chbind_packet_t *chbind)

if (!packet) return NULL; /* don't produce garbage */
if (!chbind) return NULL; /* don't produce garbage */

vp = fr_pair_afrom_num(request->packet, PW_UKERNA_CHBIND, VENDORPEC_UKERNA);
vp = fr_pair_afrom_num(packet, PW_UKERNA_CHBIND, VENDORPEC_UKERNA);
if (!vp) return NULL;
fr_pair_value_memcpy(vp, (uint8_t *) packet, talloc_array_length((uint8_t *)packet));
fr_pair_value_memcpy(vp, (uint8_t *) chbind, talloc_array_length((uint8_t *)chbind));

return vp;
@@ -58,7 +58,7 @@ typedef struct CHBIND_REQ {
/* Channel binding function prototypes */
PW_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind_req);

VALUE_PAIR *eap_chbind_packet2vp(REQUEST *request, chbind_packet_t *packet);
VALUE_PAIR *eap_chbind_packet2vp(RADIUS_PACKET *packet, chbind_packet_t *chbind);
chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps);

#endif /*_EAP_CHBIND_H*/
@@ -1183,7 +1183,7 @@ int eapttls_process(eap_handler_t *handler, tls_session_t *tls_session)
if (req->response) {
RDEBUG("sending chbind response");
eap_chbind_packet2vp(fake, req->response));
eap_chbind_packet2vp(fake->reply, req->response));
} else {
RDEBUG("no chbind response");

0 comments on commit 3047fc6

Please sign in to comment.
You can’t perform that action at this time.