eap: Use pen_t instead of uint32_t for vendor ID
This commit is contained in:
@@ -595,7 +595,7 @@ METHOD(eap_method_t, initiate, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_aka_peer_t *this, uint32_t *vendor)
|
||||
private_eap_aka_peer_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_AKA;
|
||||
|
||||
@@ -638,7 +638,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_aka_server_t *this, uint32_t *vendor)
|
||||
private_eap_aka_server_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_AKA;
|
||||
|
||||
@@ -83,7 +83,7 @@ CALLBACK(entry_matches_cb, bool,
|
||||
* Load the given EAP method
|
||||
*/
|
||||
static eap_method_t *load_method(private_eap_dynamic_t *this,
|
||||
eap_type_t type, uint32_t vendor)
|
||||
eap_type_t type, pen_t vendor)
|
||||
{
|
||||
eap_method_t *method;
|
||||
|
||||
@@ -191,7 +191,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
private_eap_dynamic_t *this, eap_payload_t *in, eap_payload_t **out)
|
||||
{
|
||||
eap_type_t received_type, type;
|
||||
uint32_t received_vendor, vendor;
|
||||
pen_t received_vendor, vendor;
|
||||
|
||||
received_type = in->get_type(in, &received_vendor);
|
||||
if (received_vendor == 0 && received_type == EAP_NAK)
|
||||
@@ -246,7 +246,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_dynamic_t *this, uint32_t *vendor)
|
||||
private_eap_dynamic_t *this, pen_t *vendor)
|
||||
{
|
||||
if (this->method)
|
||||
{
|
||||
@@ -356,7 +356,7 @@ static void get_supported_eap_types(private_eap_dynamic_t *this)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
enumerator = charon->eap->create_enumerator(charon->eap, EAP_SERVER);
|
||||
while (enumerator->enumerate(enumerator, &type, &vendor))
|
||||
|
||||
@@ -186,7 +186,7 @@ METHOD(eap_method_t, process_server, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_gtc_t *this, uint32_t *vendor)
|
||||
private_eap_gtc_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_GTC;
|
||||
|
||||
@@ -125,7 +125,7 @@ METHOD(eap_method_t, initiate_server, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_identity_t *this, uint32_t *vendor)
|
||||
private_eap_identity_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_IDENTITY;
|
||||
|
||||
@@ -205,7 +205,7 @@ METHOD(eap_method_t, process_server, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_md5_t *this, uint32_t *vendor)
|
||||
private_eap_md5_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_MD5;
|
||||
|
||||
@@ -1316,7 +1316,7 @@ METHOD(eap_method_t, process_server, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_mschapv2_t *this, uint32_t *vendor)
|
||||
private_eap_mschapv2_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_MSCHAPV2;
|
||||
|
||||
@@ -78,7 +78,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_peap_t *this, uint32_t *vendor)
|
||||
private_eap_peap_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_PEAP;
|
||||
|
||||
@@ -72,7 +72,7 @@ METHOD(tls_application_t, process, status_t,
|
||||
eap_payload_t *in;
|
||||
eap_code_t code;
|
||||
eap_type_t type, received_type;
|
||||
uint32_t vendor, received_vendor;
|
||||
pen_t vendor, received_vendor;
|
||||
|
||||
status = this->avp->process(this->avp, reader, &data,
|
||||
this->ph1_method->get_identifier(this->ph1_method));
|
||||
@@ -138,7 +138,7 @@ METHOD(tls_application_t, process, status_t,
|
||||
if (received_vendor)
|
||||
{
|
||||
DBG1(DBG_IKE, "server requested vendor specific EAP method %d-%d "
|
||||
"(id 0x%02X", received_type, received_vendor,
|
||||
"(id 0x%02X)", received_type, received_vendor,
|
||||
in->get_identifier(in));
|
||||
}
|
||||
else
|
||||
@@ -192,7 +192,7 @@ METHOD(tls_application_t, build, status_t,
|
||||
chunk_t data;
|
||||
eap_code_t code;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
if (this->out)
|
||||
{
|
||||
|
||||
@@ -168,7 +168,7 @@ METHOD(tls_application_t, process, status_t,
|
||||
eap_payload_t *in;
|
||||
eap_code_t code;
|
||||
eap_type_t type = EAP_NAK, received_type;
|
||||
uint32_t vendor, received_vendor;
|
||||
pen_t vendor, received_vendor;
|
||||
|
||||
status = this->avp->process(this->avp, reader, &data,
|
||||
this->ph1_method->get_identifier(this->ph1_method));
|
||||
@@ -339,7 +339,7 @@ METHOD(tls_application_t, build, status_t,
|
||||
chunk_t data;
|
||||
eap_code_t code;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
if (this->ph2_method == NULL && this->start_phase2 && this->start_phase2_id)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ struct private_eap_radius_t {
|
||||
/**
|
||||
* EAP vendor, if any
|
||||
*/
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
/**
|
||||
* EAP message identifier
|
||||
@@ -717,7 +717,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_radius_t *this, uint32_t *vendor)
|
||||
private_eap_radius_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = this->vendor;
|
||||
return this->type;
|
||||
|
||||
@@ -651,7 +651,7 @@ METHOD(eap_method_t, initiate, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_sim_peer_t *this, uint32_t *vendor)
|
||||
private_eap_sim_peer_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_SIM;
|
||||
|
||||
@@ -552,7 +552,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_sim_server_t *this, uint32_t *vendor)
|
||||
private_eap_sim_server_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_SIM;
|
||||
|
||||
@@ -75,7 +75,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_tls_t *this, uint32_t *vendor)
|
||||
private_eap_tls_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_TLS;
|
||||
|
||||
@@ -181,7 +181,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_tnc_t *this, uint32_t *vendor)
|
||||
private_eap_tnc_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return this->type;
|
||||
|
||||
@@ -78,7 +78,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_ttls_t *this, uint32_t *vendor)
|
||||
private_eap_ttls_t *this, pen_t *vendor)
|
||||
{
|
||||
*vendor = 0;
|
||||
return EAP_TTLS;
|
||||
|
||||
@@ -76,7 +76,7 @@ METHOD(tls_application_t, process, status_t,
|
||||
eap_packet_t *pkt;
|
||||
eap_code_t code;
|
||||
eap_type_t type, received_type;
|
||||
uint32_t vendor, received_vendor;
|
||||
pen_t vendor, received_vendor;
|
||||
uint16_t eap_len;
|
||||
size_t eap_pos = 0;
|
||||
bool concatenated = FALSE;
|
||||
@@ -241,7 +241,7 @@ METHOD(tls_application_t, build, status_t,
|
||||
chunk_t data;
|
||||
eap_code_t code;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
if (this->method == NULL && this->start_phase2)
|
||||
{
|
||||
|
||||
@@ -164,7 +164,7 @@ METHOD(tls_application_t, process, status_t,
|
||||
eap_payload_t *in;
|
||||
eap_code_t code;
|
||||
eap_type_t type = EAP_NAK, received_type;
|
||||
uint32_t vendor, received_vendor;
|
||||
pen_t vendor, received_vendor;
|
||||
|
||||
status = this->avp->process(this->avp, reader, &data);
|
||||
switch (status)
|
||||
@@ -310,7 +310,7 @@ METHOD(tls_application_t, build, status_t,
|
||||
chunk_t data;
|
||||
eap_code_t code;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
|
||||
if (this->method == NULL && this->start_phase2 &&
|
||||
lib->settings->get_bool(lib->settings,
|
||||
|
||||
@@ -478,7 +478,7 @@ static void process_eap(private_tnc_pdp_t *this, radius_message_t *request,
|
||||
eap_payload_t *in, *out = NULL;
|
||||
eap_method_t *method;
|
||||
eap_type_t eap_type;
|
||||
uint32_t eap_vendor;
|
||||
pen_t eap_vendor;
|
||||
chunk_t data, message = chunk_empty, msk = chunk_empty;
|
||||
chunk_t user_name = chunk_empty, nas_id = chunk_empty;
|
||||
identification_t *group = NULL;
|
||||
|
||||
@@ -114,7 +114,7 @@ static bool verify_eap(private_xauth_eap_t *this, eap_method_t *backend)
|
||||
eap_payload_t *request, *response;
|
||||
eap_method_t *frontend;
|
||||
eap_type_t type;
|
||||
uint32_t vendor;
|
||||
pen_t vendor;
|
||||
status_t status;
|
||||
|
||||
if (backend->initiate(backend, &request) != NEED_MORE)
|
||||
|
||||
Reference in New Issue
Block a user