#include <linux/ppp-comp.h>
#endif
-#include "pppd.h"
-#include "chap-new.h"
+#include "pppd-private.h"
+#include "options.h"
+#include "chap.h"
#include "chap_ms.h"
#include "magic.h"
#include "mppe.h"
-#include "ppp-crypto.h"
-#include "pppcrypt.h"
+#include "crypto.h"
+#include "crypto_ms.h"
#ifdef UNIT_TEST
#undef PPP_WITH_MPPE
/*
* Command-line options.
*/
-static option_t chapms_option_list[] = {
+static struct option chapms_option_list[] = {
#ifdef PPP_WITH_MSLANMAN
{ "ms-lanman", o_bool, &ms_lanman,
"Use LanMan passwd when using MS-CHAP", 1 },
u_char *PasswordHash,
u_char *response)
{
- u_char ZPasswordHash[21];
+ u_char ZPasswordHash[24];
PPP_CIPHER_CTX *ctx;
BZERO(ZPasswordHash, sizeof(ZPasswordHash));
PPP_MD_CTX* ctx;
u_char hash[SHA_DIGEST_LENGTH];
int hash_len;
- char *user;
+ const char *user;
/* remove domain from "domain\username" */
if ((user = strrchr(username, '\\')) != NULL)
int i;
PPP_MD_CTX *ctx;
- u_char Digest[SHA_DIGEST_LENGTH];
+ u_char Digest[SHA_DIGEST_LENGTH] = {};
int hash_len;
u_char Challenge[8];
* Authenticator Response.
*/
void
-ChapMS2(u_char *rchallenge, u_char *PeerChallenge,
+ChapMS2(unsigned char *rchallenge, unsigned char *PeerChallenge,
char *user, char *secret, int secret_len, unsigned char *response,
u_char authResponse[], int authenticator)
{
{
chap_register_digest(&chapms_digest);
chap_register_digest(&chapms2_digest);
- add_options(chapms_option_list);
+ ppp_add_options(chapms_option_list);
}
#else