]> git.ozlabs.org Git - ppp.git/commitdiff
Changing the define USE_EAPTLS to PPP_WITH_EAPTLS for consistency
authorEivind Næss <eivnaes@yahoo.com>
Sat, 7 Aug 2021 21:41:32 +0000 (14:41 -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/ccp.c
pppd/eap.c
pppd/eap.h
pppd/pathnames.h
pppd/plugins/passprompt.c
pppd/plugins/passwordfd.c
pppd/pppd.h
pppd/pppdconf.h.in

index af62cace7b35afcb77c4dec239416a8d05fa42ae..c04b4a21caec038110e447ec9dea8f336ba77404 100644 (file)
@@ -178,8 +178,8 @@ AM_CONDITIONAL(PPP_WITH_PLUGINS, test "${enable_plugins}" != "no")
 AC_ARG_ENABLE([eaptls],
     AS_HELP_STRING([--disable-eaptls], [Disable EAP-TLS authentication support]))
 AS_IF([test "x$enable_eaptls" != "xno"],
-    AC_DEFINE([USE_EAPTLS], 1, ["Have EAP-TLS authentication support"]))
-AM_CONDITIONAL(WITH_EAPTLS, test "x${enable_eaptls}" != "xno")
+    AC_DEFINE([PPP_WITH_EAPTLS], 1, [Have EAP-TLS authentication support]))
+AM_CONDITIONAL(PPP_WITH_EAPTLS, test "x${enable_eaptls}" != "xno")
 
 #
 # Disable PEAP support
index 2cf2400630a31d2229cf5fe32c6ca969d59aa431..3607f574aa4f56f9377752d1b55449eaa9907a12 100644 (file)
@@ -131,7 +131,7 @@ if WITH_PAM
 pppd_LIBS += -lpam -ldl
 endif
 
-if WITH_EAPTLS
+if PPP_WITH_EAPTLS
 pppd_SOURCES += eap-tls.c tls.c
 else
 if WITH_PEAP
index 5a7863d2742a2cbfd7161b14cd3b103d6b5bdcf5..f443a2937f1dd0cc3c4ff53a57ba0a8c8403656a 100644 (file)
 #include "upap.h"
 #include "chap-new.h"
 #include "eap.h"
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 #include "eap-tls.h"
 #endif
 #ifdef PPP_WITH_CBCP
@@ -198,7 +198,7 @@ int (*chap_check_hook)(void) = NULL;
 /* Hook for a plugin to get the CHAP password for authenticating us */
 int (*chap_passwd_hook)(char *user, char *passwd) = NULL;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 /* Hook for a plugin to get the EAP-TLS password for authenticating us */
 int (*eaptls_passwd_hook)(char *user, char *passwd) = NULL;
 #endif
@@ -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(USE_EAPTLS) || defined(USE_PEAP)
+#if defined(PPP_WITH_EAPTLS) || defined(USE_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 */
@@ -269,7 +269,7 @@ char *tls_verify_method = NULL; /* Verify certificate method */
 bool  tls_verify_key_usage = 0; /* Verify peer certificate key usage */
 #endif
 
-#if defined(USE_EAPTLS)
+#if defined(PPP_WITH_EAPTLS)
 char *cert_file    = NULL;  /* Client certificate file (pem format) */
 char *privkey_file = NULL;  /* Client private key file (pem format) */
 char *pkcs12_file  = NULL;  /* Client private key envelope file (pkcs12 format) */
@@ -290,7 +290,7 @@ static int  have_chap_secret (char *, char *, int, int *);
 static int  have_srp_secret(char *client, char *server, int need_ip,
     int *lacks_ipp);
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 static int  have_eaptls_secret_server
 (char *client, char *server, int need_ip, int *lacks_ipp);
 static int  have_eaptls_secret_client (char *client, char *server);
@@ -449,7 +449,7 @@ option_t auth_options[] = {
       "Set telephone number(s) which are allowed to connect",
       OPT_PRIV | OPT_A2LIST },
 
-#if defined(USE_EAPTLS) || defined(USE_PEAP)
+#if defined(PPP_WITH_EAPTLS) || defined(USE_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" },
@@ -462,13 +462,13 @@ option_t auth_options[] = {
       "Verify peer by method (none|subject|name|suffix)" },
 #endif
 
-#if defined(USE_EAPTLS)
+#if defined(PPP_WITH_EAPTLS)
     { "cert", o_string, &cert_file,     "client certificate in PEM format" },
     { "key", o_string, &privkey_file,   "client private key in PEM format" },
     { "pkcs12", o_string, &pkcs12_file, "EAP-TLS client credentials in PKCS12 format" },
     { "need-peer-eap", o_bool, &need_peer_eap,
       "Require the peer to authenticate us", 1 },
-#endif
+#endif /* PPP_WITH_EAPTLS */
     { NULL }
 };
 
@@ -793,7 +793,7 @@ link_established(int unit)
     lcp_options *wo = &lcp_wantoptions[unit];
     lcp_options *go = &lcp_gotoptions[unit];
     lcp_options *ho = &lcp_hisoptions[unit];
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     lcp_options *ao = &lcp_allowoptions[unit];
 #endif
     int i;
@@ -830,7 +830,7 @@ link_established(int unit)
        }
     }
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     if (need_peer_eap && !ao->neg_eap) {
        warn("eap required to authenticate us but no suitable secrets");
        lcp_close(unit, "couldn't negotiate eap");
@@ -1352,7 +1352,7 @@ auth_check_options(void)
                                    our_name, 1, &lacks_ip);
     }
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     if (!can_auth && wo->neg_eap) {
        can_auth =
            have_eaptls_secret_server((explicit_remote ? remote_name :
@@ -1415,7 +1415,7 @@ auth_reset(int unit)
        (hadchap == 1 || (hadchap == -1 && have_chap_secret(user,
            (explicit_remote? remote_name: NULL), 0, NULL))) ||
        have_srp_secret(user, (explicit_remote? remote_name: NULL), 0, NULL)
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                || have_eaptls_secret_client(user, (explicit_remote? remote_name: NULL))
 #endif
        );
@@ -1434,7 +1434,7 @@ auth_reset(int unit)
                1, NULL))) &&
        !have_srp_secret((explicit_remote? remote_name: NULL), our_name, 1,
            NULL)
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
         && !have_eaptls_secret_server((explicit_remote? remote_name: NULL),
                                   our_name, 1, NULL)
 #endif
@@ -2414,7 +2414,7 @@ auth_script(char *script)
 }
 
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 static int
 have_eaptls_secret_server(char *client, char *server,
                          int need_ip, int *lacks_ipp)
index 36ee5496d33b530de45fb6df64bbca85207fa85d..cfe94f8e9f3af44813a6e2cda02b2243924df956 100644 (file)
@@ -525,7 +525,7 @@ ccp_resetci(fsm *f)
     if (go->mppe) {
        ccp_options *ao = &ccp_allowoptions[f->unit];
        int auth_mschap_bits = auth_done[f->unit];
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        int auth_eap_bits = auth_done[f->unit];
 #endif
        int numbits;
@@ -556,7 +556,7 @@ ccp_resetci(fsm *f)
            return;
        }
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     /*
      * MPPE is also possible in combination with EAP-TLS.
      * It is not possible to detect if we're doing EAP or EAP-TLS
index 0944d7a81749e2f7b49c375730c057cf1d48fac2..c9b3f676bfc9e642b5558bde4a1c065155fbbd83 100644 (file)
@@ -85,9 +85,9 @@
 #define        SHA_DIGESTSIZE 20
 #endif
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 #include "eap-tls.h"
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef PPP_WITH_CHAPMS
 #include "chap_ms.h"
@@ -227,9 +227,9 @@ eap_init(int unit)
        esp->es_server.ea_id = (u_char)(drand48() * 0x100);
        esp->es_client.ea_timeout = EAP_DEFREQTIME;
        esp->es_client.ea_maxrequests = EAP_DEFALLOWREQ;
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        esp->es_client.ea_using_eaptls = 0;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 #ifdef PPP_WITH_CHAPMS
        esp->es_client.digest = chap_find_digest(CHAP_MICROSOFT_V2);
        esp->es_server.digest = chap_find_digest(CHAP_MICROSOFT_V2);
@@ -444,16 +444,16 @@ eap_figure_next_state(eap_state *esp, int status)
        u_char vals[2];
        struct b64state bs;
 #endif /* USE_SRP */
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        struct eaptls_session *ets;
        int secret_len;
        char secret[MAXWORDLEN];
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        esp->es_server.ea_timeout = esp->es_savedtime;
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        esp->es_server.ea_prev_state = esp->es_server.ea_state;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
        switch (esp->es_server.ea_state) {
        case eapBadAuth:
                return;
@@ -578,19 +578,19 @@ eap_figure_next_state(eap_state *esp, int status)
                        break;
                }
 #endif /* USE_SRP */
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                 if (!get_secret(esp->es_unit, esp->es_server.ea_peer,
                     esp->es_server.ea_name, secret, &secret_len, 1)) {
 
                        esp->es_server.ea_state = eapTlsStart;
                        break;
                }
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
                esp->es_server.ea_state = eapMD5Chall;
                break;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        case eapTlsStart:
                /* Initialize ssl session */
                if(!eaptls_init_ssl_server(esp)) {
@@ -651,7 +651,7 @@ eap_figure_next_state(eap_state *esp, int status)
        case eapTlsSendAlert:
                esp->es_server.ea_state = eapTlsRecvAlertAck;
                break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        case eapSRP1:
 #ifdef USE_SRP
@@ -722,9 +722,9 @@ eap_figure_next_state(eap_state *esp, int status)
        if (esp->es_server.ea_state == eapBadAuth)
                eap_send_failure(esp);
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        dbglog("EAP id=0x%2x '%s' -> '%s'", esp->es_server.ea_id, eap_state_name(esp->es_server.ea_prev_state), eap_state_name(esp->es_server.ea_state));
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 }
 
 #if PPP_WITH_CHAPMS
@@ -905,7 +905,7 @@ eap_send_request(eap_state *esp)
                break;
 #endif /* PPP_WITH_CHAPMS */
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        case eapTlsStart:
                PUTCHAR(EAPT_TLS, outp);
                PUTCHAR(EAP_TLS_FLAGS_START, outp);
@@ -927,7 +927,7 @@ eap_send_request(eap_state *esp)
                eaptls_send(esp->es_server.ea_session, &outp);
                eap_figure_next_state(esp, 0);
                break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef USE_SRP
        case eapSRP1:
@@ -1112,18 +1112,18 @@ eap_authpeer(int unit, char *localname)
 static void
 eap_server_timeout(void *arg)
 {
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        u_char *outp;
        u_char *lenloc;
        int outlen;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        eap_state *esp = (eap_state *) arg;
 
        if (!eap_server_active(esp))
                return;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        switch(esp->es_server.ea_prev_state) {
 
        /*
@@ -1161,7 +1161,7 @@ eap_server_timeout(void *arg)
        default:
                break;
        }
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        /* EAP ID number must not change on timeout. */
        eap_send_request(esp);
@@ -1399,7 +1399,7 @@ eap_srpval_response(eap_state *esp, u_char id, u_int32_t flags, u_char *str)
 }
 #endif /* USE_SRP */
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 /*
  * Send an EAP-TLS response message with tls data
  */
@@ -1466,7 +1466,7 @@ eap_tls_sendack(eap_state *esp, u_char id)
 
        output(esp->es_unit, outpacket_buf, PPP_HDRLEN + outlen);
 }
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 static void
 eap_send_nak(eap_state *esp, u_char id, u_char type)
@@ -1644,10 +1644,10 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
        char rhostname[256];
        MD5_CTX mdContext;
        u_char hash[MD5_SIGNATURE_SIZE];
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        u_char flags;
        struct eaptls_session *ets = esp->es_client.ea_session;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef USE_SRP
        struct t_client *tc;
@@ -1791,7 +1791,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
                    esp->es_client.ea_namelen);
                break;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        case EAPT_TLS:
 
                switch(esp->es_client.ea_state) {
@@ -1879,7 +1879,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
                }
 
                break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef USE_SRP
        case EAPT_SRP:
@@ -2288,10 +2288,10 @@ eap_response(eap_state *esp, u_char *inp, int id, int len)
        u_char dig[SHA_DIGESTSIZE];
 #endif /* USE_SRP */
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        struct eaptls_session *ets;
        u_char flags;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 #ifdef PPP_WITH_CHAPMS
        u_char opcode;
        int (*chap_verifier)(char *, char *, int, struct chap_digest_type *,
@@ -2344,7 +2344,7 @@ eap_response(eap_state *esp, u_char *inp, int id, int len)
                eap_figure_next_state(esp, 0);
                break;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        case EAPT_TLS:
                switch(esp->es_server.ea_state) {
 
@@ -2400,7 +2400,7 @@ eap_response(eap_state *esp, u_char *inp, int id, int len)
                        break;
                }
                break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        case EAPT_NOTIFICATION:
                dbglog("EAP unexpected Notification; response discarded");
@@ -2433,12 +2433,12 @@ eap_response(eap_state *esp, u_char *inp, int id, int len)
                        esp->es_server.ea_state = eapMD5Chall;
                        break;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                        /* Send EAP-TLS start packet */
                case EAPT_TLS:
                        esp->es_server.ea_state = eapTlsStart;
                        break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef PPP_WITH_CHAPMS
                case EAPT_MSCHAPV2:
@@ -2766,9 +2766,9 @@ static void
 eap_success(eap_state *esp, u_char *inp, int id, int len)
 {
        if (esp->es_client.ea_state != eapOpen && !eap_client_active(esp)
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                && esp->es_client.ea_state != eapTlsRecvSuccess
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
                ) {
                dbglog("EAP unexpected success message in state %s (%d)",
                    eap_state_name(esp->es_client.ea_state),
@@ -2776,7 +2776,7 @@ eap_success(eap_state *esp, u_char *inp, int id, int len)
                return;
        }
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        if(esp->es_client.ea_using_eaptls && esp->es_client.ea_state !=
                eapTlsRecvSuccess) {
                dbglog("EAP-TLS unexpected success message in state %s (%d)",
@@ -2784,7 +2784,7 @@ eap_success(eap_state *esp, u_char *inp, int id, int len)
                     esp->es_client.ea_state);
                return;
        }
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
        if (esp->es_client.ea_timeout > 0) {
                UNTIMEOUT(eap_client_timeout, (void *)esp);
@@ -2918,9 +2918,9 @@ eap_printpkt(u_char *inp, int inlen,
        int code, id, len, rtype, vallen;
        u_char *pstart;
        u_int32_t uval;
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        u_char flags;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 #ifdef PPP_WITH_CHAPMS
        u_char opcode;
 #endif /* PPP_WITH_CHAPMS */
@@ -3043,7 +3043,7 @@ eap_printpkt(u_char *inp, int inlen,
                        break;
 #endif /* PPP_WITH_CHAPMS */
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                case EAPT_TLS:
                        if (len < 1)
                                break;
@@ -3059,7 +3059,7 @@ eap_printpkt(u_char *inp, int inlen,
                        printer(arg, flags & EAP_TLS_FLAGS_MF ? "M":"-");
                        printer(arg, flags & EAP_TLS_FLAGS_START ? "S":"- ");
                        break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef USE_SRP
                case EAPT_SRP:
@@ -3174,7 +3174,7 @@ eap_printpkt(u_char *inp, int inlen,
                        }
                        break;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
                case EAPT_TLS:
                        if (len < 1)
                                break;
@@ -3191,7 +3191,7 @@ eap_printpkt(u_char *inp, int inlen,
                        printer(arg, flags & EAP_TLS_FLAGS_START ? "S":"- ");
 
                        break;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
                case EAPT_NAK:
                        if (len <= 0) {
index 5dba3b91b5e8f5a1c45d9bfd9e6951a5385c74de..d45f093d5f9d100e4c9b4fd822e8bb8dc1a57318 100644 (file)
@@ -124,13 +124,13 @@ enum eap_state_code {
        "TlsSendAlert", "TlsRecvAlertAck" , "TlsRecvSuccess", "TlsRecvFailure", \
        "SRP1", "SRP2", "SRP3", "MD5Chall", "MSCHAPv2Chall", "Open", "SRP4", "BadAuth"
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 #define        eap_client_active(esp)  ((esp)->es_client.ea_state != eapInitial &&\
                                 (esp)->es_client.ea_state != eapPending &&\
                                 (esp)->es_client.ea_state != eapClosed)
 #else
 #define eap_client_active(esp) ((esp)->es_client.ea_state == eapListen)
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #define        eap_server_active(esp)  \
        ((esp)->es_server.ea_state >= eapIdentify && \
@@ -146,7 +146,7 @@ struct eap_auth {
        u_short ea_namelen;     /* Length of our name */
        u_short ea_peerlen;     /* Length of peer's name */
        enum eap_state_code ea_state;
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        enum eap_state_code ea_prev_state;
 #endif
 #ifdef PPP_WITH_CHAPMS
@@ -157,7 +157,7 @@ struct eap_auth {
        u_char ea_responses;    /* Number of Responses */
        u_char ea_type;         /* One of EAPT_* */
        u_int32_t ea_keyflags;  /* SRP shared key usage flags */
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
        bool ea_using_eaptls;
 #endif
 };
@@ -185,12 +185,12 @@ typedef struct eap_state {
  * Timeouts.
  */
 #define        EAP_DEFTIMEOUT          3       /* Timeout (seconds) for rexmit */
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 #define        EAP_DEFTRANSMITS        30      /* max # times to transmit */
                                        /* certificates can be long ... */
 #else
 #define        EAP_DEFTRANSMITS        10      /* max # times to transmit */
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 #define        EAP_DEFREQTIME          20      /* Time to wait for peer request */
 #define        EAP_DEFALLOWREQ         20      /* max # times to accept requests */
 
index c14402bfcc14961a17d1b65d54e97bf165ed8504..4d9b80c7b51a50e7094c7a07277626d9024cdea1 100644 (file)
 #define _PATH_CHAPFILE          _ROOT_PATH "/etc/ppp/chap-secrets"
 #define _PATH_SRPFILE   _ROOT_PATH "/etc/ppp/srp-secrets"
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 #define _PATH_EAPTLSCLIFILE    _ROOT_PATH "/etc/ppp/eaptls-client"
 #define _PATH_EAPTLSSERVFILE   _ROOT_PATH "/etc/ppp/eaptls-server"
 #define _PATH_OPENSSLCONFFILE  _ROOT_PATH "/etc/ppp/openssl.cnf"
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #define _PATH_SYSOPTIONS _ROOT_PATH "/etc/ppp/options"
 #define _PATH_IPUP      _ROOT_PATH "/etc/ppp/ip-up"
index 743c087b47805ea002b026dd7cf36a6b2ef5afb4..06d9ff2197c9f89a080f4186d2c57c792b67b916 100644 (file)
@@ -124,7 +124,7 @@ void plugin_init(void)
 {
     add_options(options);
     pap_passwd_hook = promptpass;
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     eaptls_passwd_hook = promptpass;
 #endif
 }
index 84fd72e3b9b6994a43d112410de3312744cdf3bc..9a0cd822fa96a8a4f80c4a14eb862b89892ac6fd 100644 (file)
@@ -84,7 +84,7 @@ void plugin_init (void)
     chap_check_hook = pwfd_check;
     chap_passwd_hook = pwfd_passwd;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     eaptls_passwd_hook = pwfd_passwd;
 #endif
 }
index 133ccf6b44aa11578e59384ffb1e41a2a5bae47b..a20bf0d36b1bbc16eb8cd93944950cd512db3ffa 100644 (file)
@@ -340,8 +340,7 @@ extern char path_ipv6up[]; /* pathname of ipv6-up script */
 extern char    path_ipv6down[]; /* pathname of ipv6-down script */
 #endif
 
-#if defined(USE_EAPTLS) || defined(USE_PEAP)
-
+#if defined(PPP_WITH_EAPTLS) || defined(USE_PEAP)
 #define TLS_VERIFY_NONE     "none"
 #define TLS_VERIFY_NAME     "name"
 #define TLS_VERIFY_SUBJECT  "subject"
@@ -355,11 +354,11 @@ extern char *cacert_file;
 extern char *max_tls_version;
 extern bool tls_verify_key_usage;
 extern char *tls_verify_method;
-#endif /* USE_EAPTLS || USE_PEAP */
+#endif /* PPP_WITH_EAPTLS || USE_PEAP */
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 extern char *pkcs12_file;
-#endif /* USE_EAPTLS */
+#endif /* PPP_WITH_EAPTLS */
 
 #ifdef MAXOCTETS
 extern unsigned int maxoctets;      /* Maximum octetes per session (in bytes) */
@@ -779,7 +778,7 @@ extern int (*chap_check_hook)(void);
 extern int (*chap_passwd_hook)(char *user, char *passwd);
 extern void (*multilink_join_hook)(void);
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
 extern int (*eaptls_passwd_hook)(char *user, char *passwd);
 #endif
 
index a77e3eb970089f37629e9263bf96967b00ea0b50..d5f670fad622d8d08963cbaddd902bab9908aafb 100644 (file)
@@ -39,8 +39,8 @@
 /* "Have EAP-SRP authentication support" */
 #undef USE_SRP
 
-/* "Have EAP-TLS authentication support" */
-#undef USE_EAPTLS
+/* Have EAP-TLS authentication support */
+#undef PPP_WITH_EAPTLS
 
 /* "Have PEAP authentication support" */
 #undef USE_PEAP