summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/mppe.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-11-07 23:19:11 +0000
committerbrian <brian@FreeBSD.org>2000-11-07 23:19:11 +0000
commit34d0ad4986a2d93f4c82f3a76e6f76f284c9e7a4 (patch)
treec6235cde408dda01abf7c7817f6b472e631061ab /usr.sbin/ppp/mppe.c
parent3e6dc67f1fc629ceacdf110524b175b0910a7093 (diff)
downloadFreeBSD-src-34d0ad4986a2d93f4c82f3a76e6f76f284c9e7a4.zip
FreeBSD-src-34d0ad4986a2d93f4c82f3a76e6f76f284c9e7a4.tar.gz
Introduce another global (MPPE_IsServer) so that we initiate the
MPPE session keys correctly. I'm a bit dubious about this code. It seems that the session keys are initialised differently based on whether you're the client or the server. One side is the server if it issues the first challenge, but of course you can issue a challenge from both sides.... at the same time. Sounds like another wonderful M$ assumption... Ppp can now talk to itself correctly using encryption. Problem solved by: Ustimenko Semen <semen@iclub.nsu.ru> Hair torn out by: me
Diffstat (limited to 'usr.sbin/ppp/mppe.c')
-rw-r--r--usr.sbin/ppp/mppe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/mppe.c b/usr.sbin/ppp/mppe.c
index 253bb56..d843ecb 100644
--- a/usr.sbin/ppp/mppe.c
+++ b/usr.sbin/ppp/mppe.c
@@ -67,6 +67,7 @@ struct mppe_state {
};
int MPPE_MasterKeyValid = 0;
+int MPPE_IsServer = 0;
char MPPE_MasterKey[MPPE_KEY_LEN];
static void
@@ -340,7 +341,8 @@ MPPEInitInput(struct lcp_opt *o)
log_Printf(LogDEBUG, "MPPE: InitInput: %d-bits\n", mip->keybits);
- GetAsymetricStartKey(MPPE_MasterKey, mip->mastkey, mip->keylen, 0, 0);
+ GetAsymetricStartKey(MPPE_MasterKey, mip->mastkey, mip->keylen, 0,
+ MPPE_IsServer);
GetNewKeyFromSHA(mip->mastkey, mip->mastkey, mip->keylen, mip->sesskey);
MPPEReduceSessionKey(mip);
@@ -381,7 +383,8 @@ MPPEInitOutput(struct lcp_opt *o)
log_Printf(LogDEBUG, "MPPE: InitOutput: %d-bits\n", mop->keybits);
- GetAsymetricStartKey(MPPE_MasterKey, mop->mastkey, mop->keylen, 1, 0);
+ GetAsymetricStartKey(MPPE_MasterKey, mop->mastkey, mop->keylen, 1,
+ MPPE_IsServer);
GetNewKeyFromSHA(mop->mastkey, mop->mastkey, mop->keylen, mop->sesskey);
MPPEReduceSessionKey(mop);
OpenPOWER on IntegriCloud