X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fchap_ms.c;h=0fe1888c150e9195c4a88c07c9ea11068f17a42a;hb=e50870a901749c7390109404e90c095ea3ef7072;hp=8f6bb1c9abfc644789f4165e3adf80e349611bc6;hpb=62230e86739202fd86841ad8bb39261a0410f63b;p=ppp.git diff --git a/pppd/chap_ms.c b/pppd/chap_ms.c index 8f6bb1c..0fe1888 100644 --- a/pppd/chap_ms.c +++ b/pppd/chap_ms.c @@ -1,23 +1,31 @@ /* * chap_ms.c - Microsoft MS-CHAP compatible implementation. * - * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited. - * http://www.strataware.com/ + * Copyright (c) 1995 Eric Rosenquist. All rights reserved. * - * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Eric Rosenquist. The name of the author may not be used to - * endorse or promote products derived from this software without - * specific prior written permission. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* @@ -40,7 +48,7 @@ * Copyright (c) 2002 Google, Inc. */ -#define RCSID "$Id: chap_ms.c,v 1.24 2002/11/13 12:26:03 fcusack Exp $" +#define RCSID "$Id: chap_ms.c,v 1.26 2002/12/23 23:24:37 fcusack Exp $" #ifdef CHAPMS @@ -91,6 +99,7 @@ bool ms_lanman = 0; /* Use LanMan password instead of NT */ #ifdef MPPE u_char mppe_send_key[MPPE_MAX_KEY_LEN]; u_char mppe_recv_key[MPPE_MAX_KEY_LEN]; +int mppe_keys_set = 0; /* Have the MPPE keys been set? */ #endif static void @@ -453,6 +462,7 @@ ChapMS(chap_state *cstate, u_char *rchallenge, char *secret, int secret_len, #ifdef MPPE Set_Start_Key(rchallenge, secret, secret_len); + mppe_keys_set = 1; #endif } @@ -499,6 +509,7 @@ ChapMS2(chap_state *cstate, u_char *rchallenge, u_char *PeerChallenge, #ifdef MPPE SetMasterKeys(secret, secret_len, response->NTResp, authenticator); + mppe_keys_set = 1; #endif }