|
发表于 2006-5-17 16:59:26
|
显示全部楼层
直接修改xsupplicant-1.2.4\src\eap_types\md5\eapmd5可能会快一点
发送帧的DATA部分是在函数
int eapmd5_process(struct generic_eap_data *thisint, u_char *dataoffs,
int insize, u_char *outframe, int *outsize)
中生成的。
关键是要分析发送帧的DATA部分在港湾的认证系统中是什么结构。
更好一点的办法还是修改\xsupplicant-1.2.4\src\eap.c
添加自己的认证方式
主要是两个地方:
struct eap_type_handler eaphandlers[] = {
{EAP_TYPE_MD5, "EAP_MD5", eapmd5_setup, eapmd5_process, eapmd5_get_keys,
eapmd5_failed, eapmd5_cleanup},
{EAP_TYPE_TLS, "EAP_TLS", eaptls_setup, eaptls_process, eaptls_get_keys,
eaptls_failed, eaptls_cleanup},
{EAP_TYPE_TTLS, "EAP_TTLS", eapttls_setup, eapttls_process, eapttls_get_keys,
eapttls_failed, eapttls_cleanup},
{EAP_TYPE_MSCHAPV2, "EAP_MSCHAPV2", eapmschapv2_setup, eapmschapv2_process,
eapmschapv2_get_keys, eapmschapv2_failed, eapmschapv2_cleanup},
{EAP_TYPE_PEAP, "EAP_PEAP", eappeap_setup, eappeap_process, eappeap_get_keys,
eappeap_failed, eappeap_cleanup},
{EAP_TYPE_LEAP, "EAP_LEAP", eapleap_setup, eapleap_process, eapleap_get_keys,
eapleap_failed, eapleap_cleanup},
#ifdef EAP_SIM_ENABLE
{EAP_TYPE_SIM, "EAP_SIM", eapsim_setup, eapsim_process, eapsim_get_keys,
eapsim_failed, eapsim_cleanup},
{EAP_TYPE_AKA, "EAP_AKA", eapaka_setup, eapaka_process, eapaka_get_keys,
eapaka_failed, eapaka_cleanup},
#endif
{EAP_TYPE_OTP, "EAP_OTP", eapotp_setup, eapotp_process, eapotp_get_keys,
NULL, eapotp_cleanup},
{EAP_TYPE_GTC, "EAP_GTC", eapotp_setup, eapotp_process, eapotp_get_keys,
NULL, eapotp_cleanup},
{NO_EAP_AUTH, NULL, NULL, NULL, NULL, NULL, NULL}
};
和
// Header files for auth types we know about.
#include "eap_types/md5/eapmd5.h"
#include "eap_types/tls/eaptls.h"
#include "eap_types/ttls/eapttls.h"
#include "eap_types/mschapv2/eapmschapv2.h"
#include "eap_types/peap/eappeap.h"
#include "eap_types/leap/eapleap.h"
#include "eap_types/otp/eapotp.h"
#ifdef EAP_SIM_ENABLE
#include "winscard.h"
#include "eap_types/sim/eapsim.h"
#include "eap_types/aka/eapaka.h"
#endif
然后写自己的认证方式的函数。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|