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
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
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 */
"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" },
#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
break;
#endif /* PPP_WITH_CHAPMS */
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
case EAPT_PEAP:
/* Initialize the PEAP context (if not already initialized) */
}
break;
-#endif // USE_PEAP
+#endif // PPP_WITH_PEAP
default:
info("EAP: unknown authentication type %d; Naking", typenum);
PRINTMSG(inp, len);
}
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
peap_finish(&esp->ea_peap);
#endif
error("EAP: peer reports authentication failure");
-#ifdef USE_PEAP
+#ifdef PPP_WITH_PEAP
peap_finish(&esp->ea_peap);
#endif
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 */
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
};
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
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)
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
used += 2;
break;
-#if CHAPMS
+#if PPP_WITH_CHAPMS
case EAPT_MSCHAPV2: {
// Must have at least 4 more bytes to process CHAP header
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"
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;
/* 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