123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- /*
- * EAP method registration
- * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
- #include "includes.h"
- #include "common.h"
- #include "eap_peer/eap_methods.h"
- #include "eap_server/eap_methods.h"
- #include "wpa_supplicant_i.h"
- /**
- * eap_register_methods - Register statically linked EAP methods
- * Returns: 0 on success, -1 or -2 on failure
- *
- * This function is called at program initialization to register all EAP
- * methods that were linked in statically.
- */
- int eap_register_methods(void)
- {
- int ret = 0;
- #ifdef EAP_MD5
- if (ret == 0)
- ret = eap_peer_md5_register();
- #endif /* EAP_MD5 */
- #ifdef EAP_TLS
- if (ret == 0)
- ret = eap_peer_tls_register();
- #endif /* EAP_TLS */
- #ifdef EAP_UNAUTH_TLS
- if (ret == 0)
- ret = eap_peer_unauth_tls_register();
- #endif /* EAP_UNAUTH_TLS */
- #ifdef EAP_TLS
- #ifdef CONFIG_HS20
- if (ret == 0)
- ret = eap_peer_wfa_unauth_tls_register();
- #endif /* CONFIG_HS20 */
- #endif /* EAP_TLS */
- #ifdef EAP_MSCHAPv2
- if (ret == 0)
- ret = eap_peer_mschapv2_register();
- #endif /* EAP_MSCHAPv2 */
- #ifdef EAP_PEAP
- if (ret == 0)
- ret = eap_peer_peap_register();
- #endif /* EAP_PEAP */
- #ifdef EAP_TTLS
- if (ret == 0)
- ret = eap_peer_ttls_register();
- #endif /* EAP_TTLS */
- #ifdef EAP_GTC
- if (ret == 0)
- ret = eap_peer_gtc_register();
- #endif /* EAP_GTC */
- #ifdef EAP_OTP
- if (ret == 0)
- ret = eap_peer_otp_register();
- #endif /* EAP_OTP */
- #ifdef EAP_SIM
- if (ret == 0)
- ret = eap_peer_sim_register();
- #endif /* EAP_SIM */
- #ifdef EAP_LEAP
- if (ret == 0)
- ret = eap_peer_leap_register();
- #endif /* EAP_LEAP */
- #ifdef EAP_PSK
- if (ret == 0)
- ret = eap_peer_psk_register();
- #endif /* EAP_PSK */
- #ifdef EAP_AKA
- if (ret == 0)
- ret = eap_peer_aka_register();
- #endif /* EAP_AKA */
- #ifdef EAP_AKA_PRIME
- if (ret == 0)
- ret = eap_peer_aka_prime_register();
- #endif /* EAP_AKA_PRIME */
- #ifdef EAP_FAST
- if (ret == 0)
- ret = eap_peer_fast_register();
- #endif /* EAP_FAST */
- #ifdef EAP_PAX
- if (ret == 0)
- ret = eap_peer_pax_register();
- #endif /* EAP_PAX */
- #ifdef EAP_SAKE
- if (ret == 0)
- ret = eap_peer_sake_register();
- #endif /* EAP_SAKE */
- #ifdef EAP_GPSK
- if (ret == 0)
- ret = eap_peer_gpsk_register();
- #endif /* EAP_GPSK */
- #ifdef EAP_WSC
- if (ret == 0)
- ret = eap_peer_wsc_register();
- #endif /* EAP_WSC */
- #ifdef EAP_IKEV2
- if (ret == 0)
- ret = eap_peer_ikev2_register();
- #endif /* EAP_IKEV2 */
- #ifdef EAP_VENDOR_TEST
- if (ret == 0)
- ret = eap_peer_vendor_test_register();
- #endif /* EAP_VENDOR_TEST */
- #ifdef EAP_TNC
- if (ret == 0)
- ret = eap_peer_tnc_register();
- #endif /* EAP_TNC */
- #ifdef EAP_PWD
- if (ret == 0)
- ret = eap_peer_pwd_register();
- #endif /* EAP_PWD */
- #ifdef EAP_EKE
- if (ret == 0)
- ret = eap_peer_eke_register();
- #endif /* EAP_EKE */
- #ifdef EAP_SERVER_IDENTITY
- if (ret == 0)
- ret = eap_server_identity_register();
- #endif /* EAP_SERVER_IDENTITY */
- #ifdef EAP_SERVER_MD5
- if (ret == 0)
- ret = eap_server_md5_register();
- #endif /* EAP_SERVER_MD5 */
- #ifdef EAP_SERVER_TLS
- if (ret == 0)
- ret = eap_server_tls_register();
- #endif /* EAP_SERVER_TLS */
- #ifdef EAP_SERVER_UNAUTH_TLS
- if (ret == 0)
- ret = eap_server_unauth_tls_register();
- #endif /* EAP_SERVER_UNAUTH_TLS */
- #ifdef EAP_SERVER_MSCHAPV2
- if (ret == 0)
- ret = eap_server_mschapv2_register();
- #endif /* EAP_SERVER_MSCHAPV2 */
- #ifdef EAP_SERVER_PEAP
- if (ret == 0)
- ret = eap_server_peap_register();
- #endif /* EAP_SERVER_PEAP */
- #ifdef EAP_SERVER_TLV
- if (ret == 0)
- ret = eap_server_tlv_register();
- #endif /* EAP_SERVER_TLV */
- #ifdef EAP_SERVER_GTC
- if (ret == 0)
- ret = eap_server_gtc_register();
- #endif /* EAP_SERVER_GTC */
- #ifdef EAP_SERVER_TTLS
- if (ret == 0)
- ret = eap_server_ttls_register();
- #endif /* EAP_SERVER_TTLS */
- #ifdef EAP_SERVER_SIM
- if (ret == 0)
- ret = eap_server_sim_register();
- #endif /* EAP_SERVER_SIM */
- #ifdef EAP_SERVER_AKA
- if (ret == 0)
- ret = eap_server_aka_register();
- #endif /* EAP_SERVER_AKA */
- #ifdef EAP_SERVER_AKA_PRIME
- if (ret == 0)
- ret = eap_server_aka_prime_register();
- #endif /* EAP_SERVER_AKA_PRIME */
- #ifdef EAP_SERVER_PAX
- if (ret == 0)
- ret = eap_server_pax_register();
- #endif /* EAP_SERVER_PAX */
- #ifdef EAP_SERVER_PSK
- if (ret == 0)
- ret = eap_server_psk_register();
- #endif /* EAP_SERVER_PSK */
- #ifdef EAP_SERVER_SAKE
- if (ret == 0)
- ret = eap_server_sake_register();
- #endif /* EAP_SERVER_SAKE */
- #ifdef EAP_SERVER_GPSK
- if (ret == 0)
- ret = eap_server_gpsk_register();
- #endif /* EAP_SERVER_GPSK */
- #ifdef EAP_SERVER_VENDOR_TEST
- if (ret == 0)
- ret = eap_server_vendor_test_register();
- #endif /* EAP_SERVER_VENDOR_TEST */
- #ifdef EAP_SERVER_FAST
- if (ret == 0)
- ret = eap_server_fast_register();
- #endif /* EAP_SERVER_FAST */
- #ifdef EAP_SERVER_WSC
- if (ret == 0)
- ret = eap_server_wsc_register();
- #endif /* EAP_SERVER_WSC */
- #ifdef EAP_SERVER_IKEV2
- if (ret == 0)
- ret = eap_server_ikev2_register();
- #endif /* EAP_SERVER_IKEV2 */
- #ifdef EAP_SERVER_TNC
- if (ret == 0)
- ret = eap_server_tnc_register();
- #endif /* EAP_SERVER_TNC */
- #ifdef EAP_SERVER_PWD
- if (ret == 0)
- ret = eap_server_pwd_register();
- #endif /* EAP_SERVER_PWD */
- return ret;
- }
|