]> git.ozlabs.org Git - ppp.git/commit
pppd: Expose the MPPE keys generated through an API (#267)
authorEivind Næss <eivnaes@yahoo.com>
Sat, 24 Apr 2021 10:00:34 +0000 (03:00 -0700)
committerGitHub <noreply@github.com>
Sat, 24 Apr 2021 10:00:34 +0000 (20:00 +1000)
commitd706c95906d996534f13632a747af5dc617f306e
tree1131915f02dea5d849b1a390f2cbdfa0902aca9c
parent750475927f15964be39a8bdda8ea2f57c764f846
pppd: Expose the MPPE keys generated through an API (#267)

The lengthy part of this fix is to refactor the handling of MPPE keys
by moving it into mppe.c and thus reducing the clutter in chap_ms.c.
It does so by renaming the mppe_set_keys/2 to the corresponding
mppe_set_chapv1/mppe_set_chapv2 versions and updates callers of these
functions.

Having done so, it conveniently allows the name "mppe_set_keys" to be
re-used for this new purpose which will copy the key material up to
its size and then clear the input parameters (avoids leaving the MPPE
keys on the stack).

Additional functiions added to the MPPE code allow plugins et al. to
access the MPPE keys, clear the keys, and check if they are set. All
plugin and CCP code has been updated to use this API.

This fixes GitHub Issue #258

Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
pppd/Makefile.linux
pppd/Makefile.sol2
pppd/ccp.c
pppd/chap_ms.c
pppd/chap_ms.h
pppd/eap-tls.c
pppd/eap-tls.h
pppd/mppe.c [new file with mode: 0644]
pppd/mppe.h
pppd/plugins/radius/radius.c
pppd/plugins/winbind.c