X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fchap-new.h;fp=pppd%2Fchap-new.h;h=e6a534df80c0d0caf5e2a3f45cfec3dc3acc0b10;hp=0f38ff434ecf919eb1f714a742199097b4405143;hb=7f45a9a839d065ec6b02f684ae5a240f89fe8c8c;hpb=03a755882397bda31e3e44d3aa51034338ea3ce6 diff --git a/pppd/chap-new.h b/pppd/chap-new.h index 0f38ff4..e6a534d 100644 --- a/pppd/chap-new.h +++ b/pppd/chap-new.h @@ -63,19 +63,16 @@ #define MDTYPE_MICROSOFT_V2 0x1 #define MDTYPE_MICROSOFT 0x2 #define MDTYPE_MD5 0x4 +#define MDTYPE_NONE 0 -#ifdef CHAPMS -#define MDTYPE_ALL (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5) -#else -#define MDTYPE_ALL (MDTYPE_MD5) -#endif -#define MDTYPE_NONE 0 +/* hashes supported by this instance of pppd */ +extern int chap_mdtype_all; /* Return the digest alg. ID for the most preferred digest type. */ #define CHAP_DIGEST(mdtype) \ + ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ ((mdtype) & MDTYPE_MICROSOFT_V2)? CHAP_MICROSOFT_V2: \ ((mdtype) & MDTYPE_MICROSOFT)? CHAP_MICROSOFT: \ - ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ 0 /* Return the bit flag (lsb set) for our most preferred digest type. */