]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/chap-md5.c
Update README to fix an error
[ppp.git] / pppd / chap-md5.c
index 8bcbbba6b025a41fee3716e47f0e3b2509ca54b8..b928ce9f7a8428f884ed289efce9619277168b64 100644 (file)
@@ -17,7 +17,7 @@
  * 3. Redistributions of any form whatsoever must retain the following
  *    acknowledgment:
  *    "This product includes software developed by Paul Mackerras
- *     <paulus@samba.org>".
+ *     <paulus@ozlabs.org>".
  *
  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 
 #include <stdlib.h>
 #include <string.h>
-#include "pppd.h"
-#include "chap-new.h"
+#include "pppd-private.h"
+#include "chap.h"
 #include "chap-md5.h"
 #include "magic.h"
-#include "ppp-crypto.h"
+#include "crypto.h"
 
 #define MD5_MIN_CHALLENGE      16
 #define MD5_MAX_CHALLENGE      24
@@ -112,6 +112,7 @@ chap_md5_make_response(unsigned char *response, int id, char *our_name,
        int challenge_len = *challenge++;
        int hash_len = MD5_DIGEST_LENGTH;
 
+       response[0] = 0;
        PPP_MD_CTX* ctx = PPP_MD_CTX_new();
        if (ctx) {
 
@@ -133,6 +134,8 @@ chap_md5_make_response(unsigned char *response, int id, char *our_name,
                }
                PPP_MD_CTX_free(ctx);
        }
+       if (response[0] == 0)
+               warn("Error occurred in preparing CHAP-Response");
 }
 
 static struct chap_digest_type md5_digest = {