]> git.ozlabs.org Git - ppp.git/commitdiff
Changing defines for USE_PEAP to PPP_WITH_PEAP for consistency
authorEivind Næss <eivnaes@yahoo.com>
Sat, 16 Oct 2021 19:28:01 +0000 (12:28 -0700)
committerEivind Næss <eivnaes@yahoo.com>
Fri, 15 Jul 2022 22:25:39 +0000 (15:25 -0700)
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
configure.ac
pppd/Makefile.am
pppd/auth.c
pppd/eap.c
pppd/eap.h
pppd/peap.c
pppd/pppd.h
pppd/pppdconf.h.in

index 6996955e3ff1848abc5fc2a9d83adcd5a8e356bf..19e981c63dbc090d41598ef676e0414a66ef863f 100644 (file)
@@ -186,8 +186,8 @@ AM_CONDITIONAL(PPP_WITH_EAPTLS, test "x${enable_eaptls}" != "xno")
 AC_ARG_ENABLE([peap],
     AS_HELP_STRING([--disable-peap], [Disable PEAP authentication support]))
 AS_IF([test "x${enable_peap}" != "xno"],
-    AC_DEFINE([USE_PEAP], 1, ["Have PEAP authentication support"]))
-AM_CONDITIONAL([WITH_PEAP], test "x${enable_peap}" != "xno")
+    AC_DEFINE([PPP_WITH_PEAP], 1, [Have PEAP authentication support]))
+AM_CONDITIONAL([PPP_WITH_PEAP], test "x${enable_peap}" != "xno")
 
 #
 # Disable OpenSSL engine support
index 3607f574aa4f56f9377752d1b55449eaa9907a12..a7d64cf089de78eb5bfad3f05d4154ea9cee6670 100644 (file)
@@ -134,12 +134,12 @@ endif
 if PPP_WITH_EAPTLS
 pppd_SOURCES += eap-tls.c tls.c
 else
-if WITH_PEAP
+if PPP_WITH_PEAP
 pppd_SOURCES += tls.c
 endif
 endif
 
-if WITH_PEAP
+if PPP_WITH_PEAP
 pppd_SOURCES += peap.c
 check_PROGRAMS += utest_peap
 endif
index 8615472d312f6419d99d3a6cdcc73a8395e5d201..1e9cba09825555ad6146c984ebd1e739cad97796 100644 (file)
@@ -259,7 +259,7 @@ bool explicit_user = 0;             /* Set if "user" option supplied */
 bool explicit_passwd = 0;      /* Set if "password" option supplied */
 char remote_name[MAXNAMELEN];  /* Peer's name for authentication */
 
-#if defined(PPP_WITH_EAPTLS) || defined(USE_PEAP)
+#if defined(PPP_WITH_EAPTLS) || defined(PPP_WITH_PEAP)
 char *cacert_file  = NULL;  /* CA certificate file (pem format) */
 char *ca_path      = NULL;  /* Directory with CA certificates */
 char *crl_dir      = NULL;  /* Directory containing CRL files */
@@ -449,7 +449,7 @@ option_t auth_options[] = {
       "Set telephone number(s) which are allowed to connect",
       OPT_PRIV | OPT_A2LIST },
 
-#if defined(PPP_WITH_EAPTLS) || defined(USE_PEAP)
+#if defined(PPP_WITH_EAPTLS) || defined(PPP_WITH_PEAP)
     { "ca", o_string, &cacert_file,     "CA certificate in PEM format" },
     { "capath", o_string, &ca_path,     "TLS CA certificate directory" },
     { "crl-dir", o_string, &crl_dir,    "Use CRLs in directory" },
index c9b3f676bfc9e642b5558bde4a1c065155fbbd83..c73dcfb2c3587b9bbfad680889886b2a7f42de9c 100644 (file)
@@ -67,9 +67,9 @@
 #include "pathnames.h"
 #include "md5.h"
 #include "eap.h"
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
 #include "peap.h"
-#endif /* USE_PEAP */
+#endif /* PPP_WITH_PEAP */
 
 #ifdef USE_SRP
 #ifdef HAVE_TIME_H
@@ -2220,7 +2220,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
 
            break;
 #endif /* PPP_WITH_CHAPMS */
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
        case EAPT_PEAP:
 
                /* Initialize the PEAP context (if not already initialized) */
@@ -2241,7 +2241,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
                }
 
                break;
-#endif // USE_PEAP
+#endif // PPP_WITH_PEAP
 
        default:
                info("EAP: unknown authentication type %d; Naking", typenum);
@@ -2795,7 +2795,7 @@ eap_success(eap_state *esp, u_char *inp, int id, int len)
                PRINTMSG(inp, len);
        }
 
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
        peap_finish(&esp->ea_peap);
 #endif
 
@@ -2834,7 +2834,7 @@ eap_failure(eap_state *esp, u_char *inp, int id, int len)
 
        error("EAP: peer reports authentication failure");
 
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
        peap_finish(&esp->ea_peap);
 #endif
 
index d45f093d5f9d100e4c9b4fd822e8bb8dc1a57318..fbc72017da68a60ae74b2b425edf29db7ee2aeb9 100644 (file)
@@ -169,7 +169,7 @@ typedef struct eap_state {
        int es_unit;                    /* Interface unit number */
        struct eap_auth es_client;      /* Client (authenticatee) data */
        struct eap_auth es_server;      /* Server (authenticator) data */
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
        struct peap_state *ea_peap;     /* Client PEAP (authenticator) data */
 #endif
        int es_savedtime;               /* Saved timeout */
index fb9af3e22ebcecd26ffcd102ebfed3294e57a51c..414fa1194fb36345634cec46b6a42b54fb3ce541 100644 (file)
@@ -85,7 +85,7 @@ struct peap_state {
        u_char tk[PEAP_TLV_TK_LEN];
        u_char nonce[PEAP_TLV_NONCE_LEN];
        struct tls_info *info;
-#ifdef CHAPMS
+#ifdef PPP_WITH_CHAPMS
        struct chap_digest_type *chap;
 #endif
 };
@@ -162,7 +162,7 @@ static void generate_cmk(u_char *ipmk, u_char *tempkey, u_char *nonce, u_char *t
        BCOPY(nonce, (data_tlv + PEAP_TLV_HEADERLEN), PEAP_TLV_NONCE_LEN);
        data_tlv[60] = EAPT_PEAP;
 
-#ifdef MPPE
+#ifdef PPP_WITH_MPPE
        mppe_get_send_key(isk, MPPE_MAX_KEY_LEN);
        mppe_get_recv_key(isk + MPPE_MAX_KEY_LEN, MPPE_MAX_KEY_LEN);
 #endif
@@ -192,7 +192,7 @@ static void verify_compound_mac(struct peap_state *psm, u_char *in_buf)
                        fatal("server's CMK does not match client's CMK, potential MiTM");
 }
 
-#ifdef MPPE
+#ifdef PPP_WITH_MPPE
 #define PEAP_MPPE_KEY_LEN 32
 
 static void generate_mppe_keys(u_char *ipmk, int client)
@@ -310,7 +310,7 @@ void peap_do_inner_eap(u_char *in_buf, int in_len, eap_state *esp, int id,
                outp = outp + PEAP_TLV_RESULT_LEN;
                RAND_bytes(psm->nonce, PEAP_TLV_NONCE_LEN);
                generate_cmk(psm->ipmk, psm->tk, psm->nonce, outp, 1);
-#ifdef MPPE
+#ifdef PPP_WITH_MPPE
                /* set mppe keys */
                generate_mppe_keys(psm->ipmk, 1);
 #endif
@@ -337,7 +337,7 @@ void peap_do_inner_eap(u_char *in_buf, int in_len, eap_state *esp, int id,
                used += 2;
                break;
 
-#if CHAPMS
+#if PPP_WITH_CHAPMS
        case EAPT_MSCHAPV2: {
 
                // Must have at least 4 more bytes to process CHAP header
index b173aea31d9db5710593d330381bab02068003b9..8d896bd608e2e6fe7c64f4df76bec20b26832ac3 100644 (file)
@@ -340,7 +340,7 @@ extern char path_ipv6up[]; /* pathname of ipv6-up script */
 extern char    path_ipv6down[]; /* pathname of ipv6-down script */
 #endif
 
-#if defined(PPP_WITH_EAPTLS) || defined(USE_PEAP)
+#if defined(PPP_WITH_EAPTLS) || defined(PPP_WITH_PEAP)
 #define TLS_VERIFY_NONE     "none"
 #define TLS_VERIFY_NAME     "name"
 #define TLS_VERIFY_SUBJECT  "subject"
@@ -354,7 +354,7 @@ extern char *cacert_file;
 extern char *max_tls_version;
 extern bool tls_verify_key_usage;
 extern char *tls_verify_method;
-#endif /* PPP_WITH_EAPTLS || USE_PEAP */
+#endif /* PPP_WITH_EAPTLS || PPP_WITH_PEAP */
 
 #ifdef PPP_WITH_EAPTLS
 extern char *pkcs12_file;
index d07e2371a433e66cd5567566c4a46afcbb45f74a..0b46a1e2a5cfadf38c39f0f887d8caedea1f745a 100644 (file)
@@ -42,8 +42,8 @@
 /* Have EAP-TLS authentication support */
 #undef PPP_WITH_EAPTLS
 
-/* "Have PEAP authentication support" */
-#undef USE_PEAP
+/* Have PEAP authentication support */
+#undef PPP_WITH_PEAP
 
 /* Use included des included with pppd */
 #undef USE_CRYPT