int eap_server_identity_register(void) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, "Identity"); if (eap == NULL) return -1; eap->init = eap_identity_init; eap->initPickUp = eap_identity_initPickUp; eap->reset = eap_identity_reset; eap->buildReq = eap_identity_buildReq; eap->check = eap_identity_check; eap->process = eap_identity_process; eap->isDone = eap_identity_isDone; eap->isSuccess = eap_identity_isSuccess; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_sim_register(void) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_SIM, "SIM"); if (eap == NULL) return -1; eap->init = eap_sim_init; eap->reset = eap_sim_reset; eap->buildReq = eap_sim_buildReq; eap->check = eap_sim_check; eap->process = eap_sim_process; eap->isDone = eap_sim_isDone; eap->getKey = eap_sim_getKey; eap->isSuccess = eap_sim_isSuccess; eap->get_emsk = eap_sim_get_emsk; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_vendor_test_register(void) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_ID, EAP_VENDOR_TYPE, "VENDOR-TEST"); if (eap == NULL) return -1; eap->init = eap_vendor_test_init; eap->reset = eap_vendor_test_reset; eap->buildReq = eap_vendor_test_buildReq; eap->check = eap_vendor_test_check; eap->process = eap_vendor_test_process; eap->isDone = eap_vendor_test_isDone; eap->getKey = eap_vendor_test_getKey; eap->isSuccess = eap_vendor_test_isSuccess; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_wsc_register(void) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, "WSC"); if (eap == NULL) return -1; eap->init = eap_wsc_init; eap->reset = eap_wsc_reset; eap->buildReq = eap_wsc_buildReq; eap->check = eap_wsc_check; eap->process = eap_wsc_process; eap->isDone = eap_wsc_isDone; eap->isSuccess = eap_wsc_isSuccess; eap->getTimeout = eap_wsc_getTimeout; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_mschapv2_register(struct eap_method **eap_methods) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, "MSCHAPV2"); if (eap == NULL) return -1; eap->init = eap_mschapv2_init; eap->reset = eap_mschapv2_reset; eap->buildReq = eap_mschapv2_buildReq; eap->check = eap_mschapv2_check; eap->process = eap_mschapv2_process; eap->isDone = eap_mschapv2_isDone; eap->getKey = eap_mschapv2_getKey; eap->isSuccess = eap_mschapv2_isSuccess; ret = eap_server_method_register(eap_methods,eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_tls_register(void) { struct eap_method *eap; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_TLS, "TLS"); if (eap == NULL) return -1; eap->init = eap_tls_init; eap->reset = eap_tls_reset; eap->buildReq = eap_tls_buildReq; eap->check = eap_tls_check; eap->process = eap_tls_process; eap->isDone = eap_tls_isDone; eap->getKey = eap_tls_getKey; eap->isSuccess = eap_tls_isSuccess; eap->get_emsk = eap_tls_get_emsk; eap->getSessionId = eap_tls_get_session_id; return eap_server_method_register(eap); }
int eap_server_wfa_unauth_tls_register(void) { struct eap_method *eap; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_WFA_NEW, EAP_VENDOR_WFA_UNAUTH_TLS, "WFA-UNAUTH-TLS"); if (eap == NULL) return -1; eap->init = eap_wfa_unauth_tls_init; eap->reset = eap_tls_reset; eap->buildReq = eap_tls_buildReq; eap->check = eap_tls_check; eap->process = eap_tls_process; eap->isDone = eap_tls_isDone; eap->getKey = eap_tls_getKey; eap->isSuccess = eap_tls_isSuccess; eap->get_emsk = eap_tls_get_emsk; return eap_server_method_register(eap); }
int eap_server_tlv_register(void) { struct eap_method *eap; int ret; eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_TLV, "TLV"); if (eap == NULL) return -1; eap->init = eap_tlv_init; eap->reset = eap_tlv_reset; eap->buildReq = eap_tlv_buildReq; eap->check = eap_tlv_check; eap->process = eap_tlv_process; eap->isDone = eap_tlv_isDone; eap->isSuccess = eap_tlv_isSuccess; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }
int eap_server_pwd_register(void) { struct eap_method *eap; int ret; struct timeval tp; struct timezone tz; u32 sr; EVP_add_digest(EVP_sha256()); sr = 0xdeaddada; (void) gettimeofday(&tp, &tz); sr ^= (tp.tv_sec ^ tp.tv_usec); srandom(sr); eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_PWD, "PWD"); if (eap == NULL) return -1; eap->init = eap_pwd_init; eap->reset = eap_pwd_reset; eap->buildReq = eap_pwd_build_req; eap->check = eap_pwd_check; eap->process = eap_pwd_process; eap->isDone = eap_pwd_is_done; eap->getKey = eap_pwd_getkey; eap->get_emsk = eap_pwd_get_emsk; eap->isSuccess = eap_pwd_is_success; ret = eap_server_method_register(eap); if (ret) eap_server_method_free(eap); return ret; }