Deleted Added
full compact
chap.c (24217) chap.c (25630)
1/*
2 * PPP CHAP Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
1/*
2 * PPP CHAP Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * $Id: chap.c,v 1.12 1997/03/17 14:47:55 ache Exp $
20 * $Id: chap.c,v 1.13 1997/03/24 16:01:42 ache Exp $
21 *
22 * TODO:
23 */
24#include <sys/types.h>
25#include <time.h>
26#include "fsm.h"
27#include "chap.h"
28#include "lcpproto.h"

--- 119 unchanged lines hidden (view full) ---

148 keylen = strlen(keyp);
149 } else {
150 keylen = strlen(VarAuthKey);
151 keyp = VarAuthKey;
152 }
153 name = VarAuthName;
154 namelen = strlen(VarAuthName);
155 argp = malloc(1 + valsize + namelen + 16);
21 *
22 * TODO:
23 */
24#include <sys/types.h>
25#include <time.h>
26#include "fsm.h"
27#include "chap.h"
28#include "lcpproto.h"

--- 119 unchanged lines hidden (view full) ---

148 keylen = strlen(keyp);
149 } else {
150 keylen = strlen(VarAuthKey);
151 keyp = VarAuthKey;
152 }
153 name = VarAuthName;
154 namelen = strlen(VarAuthName);
155 argp = malloc(1 + valsize + namelen + 16);
156 if (argp == NULL) {
157 ChapOutput(CHAP_FAILURE, chp->id, "Out of memory!", 14);
158 return;
159 }
156 digest = argp;
157 *digest++ = 16; /* value size */
158 ap = answer;
159 *ap++ = chp->id;
160 bcopy(keyp, ap, keylen);
161 ap += keylen;
162 bcopy(cp, ap, valsize);
163#ifdef DEBUG

--- 109 unchanged lines hidden ---
160 digest = argp;
161 *digest++ = 16; /* value size */
162 ap = answer;
163 *ap++ = chp->id;
164 bcopy(keyp, ap, keylen);
165 ap += keylen;
166 bcopy(cp, ap, valsize);
167#ifdef DEBUG

--- 109 unchanged lines hidden ---