Lines Matching refs:outp
268 u_char *outp;
270 outp = outpacket_buf;
272 MAKEHEADER(outp, PPP_EAP);
274 PUTCHAR(EAP_FAILURE, outp);
276 PUTCHAR(esp->es_server.ea_id, outp);
277 PUTSHORT(EAP_HEADERLEN, outp);
293 u_char *outp;
295 outp = outpacket_buf;
297 MAKEHEADER(outp, PPP_EAP);
299 PUTCHAR(EAP_SUCCESS, outp);
301 PUTCHAR(esp->es_server.ea_id, outp);
302 PUTSHORT(EAP_HEADERLEN, outp);
345 b64enc(bs, inp, inlen, outp)
349 u_char *outp;
358 *outp++ = base64[(bs->bs_bits >> 18) & 0x3F];
359 *outp++ = base64[(bs->bs_bits >> 12) & 0x3F];
360 *outp++ = base64[(bs->bs_bits >> 6) & 0x3F];
361 *outp++ = base64[bs->bs_bits & 0x3F];
371 b64flush(bs, outp)
373 u_char *outp;
378 *outp++ = base64[(bs->bs_bits >> 2) & 0x3F];
379 *outp++ = base64[(bs->bs_bits << 4) & 0x3F];
382 *outp++ = base64[(bs->bs_bits >> 10) & 0x3F];
383 *outp++ = base64[(bs->bs_bits >> 4) & 0x3F];
384 *outp++ = base64[(bs->bs_bits << 2) & 0x3F];
393 b64dec(bs, inp, inlen, outp)
397 u_char *outp;
409 *outp++ = bs->bs_bits >> (bs->bs_offs - 8);
643 u_char *outp;
683 outp = outpacket_buf;
685 MAKEHEADER(outp, PPP_EAP);
687 PUTCHAR(EAP_REQUEST, outp);
688 PUTCHAR(esp->es_server.ea_id, outp);
689 lenloc = outp;
690 INCPTR(2, outp);
694 PUTCHAR(EAPT_IDENTITY, outp);
697 BCOPY(str, outp, challen);
698 INCPTR(challen, outp);
702 PUTCHAR(EAPT_MD5CHAP, outp);
710 PUTCHAR(challen, outp);
715 BCOPY(esp->es_challenge, outp, esp->es_challen);
716 INCPTR(esp->es_challen, outp);
717 BCOPY(esp->es_server.ea_name, outp, esp->es_server.ea_namelen);
718 INCPTR(esp->es_server.ea_namelen, outp);
723 PUTCHAR(EAPT_SRP, outp);
724 PUTCHAR(EAPSRP_CHALLENGE, outp);
726 PUTCHAR(esp->es_server.ea_namelen, outp);
727 BCOPY(esp->es_server.ea_name, outp, esp->es_server.ea_namelen);
728 INCPTR(esp->es_server.ea_namelen, outp);
732 PUTCHAR(ts->s.len, outp);
733 BCOPY(ts->s.data, outp, ts->s.len);
734 INCPTR(ts->s.len, outp);
737 PUTCHAR(0, outp);
739 PUTCHAR(ts->g.len, outp);
740 BCOPY(ts->g.data, outp, ts->g.len);
741 INCPTR(ts->g.len, outp);
746 BCOPY(ts->n.data, outp, ts->n.len);
747 INCPTR(ts->n.len, outp);
752 PUTCHAR(EAPT_SRP, outp);
753 PUTCHAR(EAPSRP_SKEY, outp);
757 BCOPY(ts->B.data, outp, ts->B.len);
758 INCPTR(ts->B.len, outp);
762 PUTCHAR(EAPT_SRP, outp);
763 PUTCHAR(EAPSRP_SVALIDATOR, outp);
764 PUTLONG(SRPVAL_EBIT, outp);
767 BCOPY(t_serverresponse(ts), outp, SHA_DIGESTSIZE);
768 INCPTR(SHA_DIGESTSIZE, outp);
772 optr = outp;
785 outp++; /* space for pseudonym length */
786 outp += b64enc(&b64, cipher, 8, outp);
789 outp += b64enc(&b64, cipher, 8, outp);
801 outp += b64enc(&b64, cipher, 8, outp);
803 outp += b64flush(&b64, outp);
806 i = outp - optr - 1;
811 *outp++ = drand48() * 0x100;
823 while (optr < outp) {
839 PUTCHAR(EAPT_SRP, outp);
840 PUTCHAR(EAPSRP_LWRECHALLENGE, outp);
847 BCOPY(esp->es_challenge, outp, esp->es_challen);
848 INCPTR(esp->es_challen, outp);
856 outlen = (outp - outpacket_buf) - PPP_HDRLEN;
1049 u_char *outp;
1052 outp = outpacket_buf;
1054 MAKEHEADER(outp, PPP_EAP);
1056 PUTCHAR(EAP_RESPONSE, outp);
1057 PUTCHAR(id, outp);
1060 PUTSHORT(msglen, outp);
1061 PUTCHAR(typenum, outp);
1063 BCOPY(str, outp, lenstr);
1080 u_char *outp;
1083 outp = outpacket_buf;
1085 MAKEHEADER(outp, PPP_EAP);
1087 PUTCHAR(EAP_RESPONSE, outp);
1088 PUTCHAR(id, outp);
1092 PUTSHORT(msglen, outp);
1093 PUTCHAR(EAPT_MD5CHAP, outp);
1094 PUTCHAR(MD5_SIGNATURE_SIZE, outp);
1095 BCOPY(hash, outp, MD5_SIGNATURE_SIZE);
1096 INCPTR(MD5_SIGNATURE_SIZE, outp);
1098 BCOPY(name, outp, namelen);
1116 u_char *outp;
1119 outp = outpacket_buf;
1121 MAKEHEADER(outp, PPP_EAP);
1123 PUTCHAR(EAP_RESPONSE, outp);
1124 PUTCHAR(id, outp);
1127 PUTSHORT(msglen, outp);
1128 PUTCHAR(EAPT_SRP, outp);
1129 PUTCHAR(subtypenum, outp);
1131 BCOPY(str, outp, lenstr);
1147 u_char *outp;
1150 outp = outpacket_buf;
1152 MAKEHEADER(outp, PPP_EAP);
1154 PUTCHAR(EAP_RESPONSE, outp);
1155 PUTCHAR(id, outp);
1159 PUTSHORT(msglen, outp);
1160 PUTCHAR(EAPT_SRP, outp);
1161 PUTCHAR(EAPSRP_CVALIDATOR, outp);
1162 PUTLONG(flags, outp);
1163 BCOPY(str, outp, SHA_DIGESTSIZE);
1175 u_char *outp;
1178 outp = outpacket_buf;
1180 MAKEHEADER(outp, PPP_EAP);
1182 PUTCHAR(EAP_RESPONSE, outp);
1183 PUTCHAR(id, outp);
1186 PUTSHORT(msglen, outp);
1187 PUTCHAR(EAPT_NAK, outp);
1188 PUTCHAR(type, outp);