moved tls_t existance test into tls_eap_create() again
This commit is contained in:
@@ -141,11 +141,6 @@ static eap_tls_t *eap_tls_create(identification_t *server,
|
|||||||
frag_size = lib->settings->get_int(lib->settings,
|
frag_size = lib->settings->get_int(lib->settings,
|
||||||
"charon.plugins.eap-tls.fragment_size", MAX_FRAGMENT_LEN);
|
"charon.plugins.eap-tls.fragment_size", MAX_FRAGMENT_LEN);
|
||||||
tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TLS, NULL);
|
tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TLS, NULL);
|
||||||
if (!tls)
|
|
||||||
{
|
|
||||||
free(this);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
this->tls_eap = tls_eap_create(EAP_TLS, tls, frag_size);
|
this->tls_eap = tls_eap_create(EAP_TLS, tls, frag_size);
|
||||||
if (!this->tls_eap)
|
if (!this->tls_eap)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -143,11 +143,6 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
|
|||||||
frag_size = lib->settings->get_int(lib->settings,
|
frag_size = lib->settings->get_int(lib->settings,
|
||||||
"charon.plugins.eap-tnc.fragment_size", MAX_FRAGMENT_LEN);
|
"charon.plugins.eap-tnc.fragment_size", MAX_FRAGMENT_LEN);
|
||||||
tnc_if_tnccs = tnc_if_tnccs_create(is_server, TLS_PURPOSE_EAP_TNC);
|
tnc_if_tnccs = tnc_if_tnccs_create(is_server, TLS_PURPOSE_EAP_TNC);
|
||||||
if (!tnc_if_tnccs)
|
|
||||||
{
|
|
||||||
free(this);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
this->tls_eap = tls_eap_create(EAP_TNC, tnc_if_tnccs, frag_size);
|
this->tls_eap = tls_eap_create(EAP_TNC, tnc_if_tnccs, frag_size);
|
||||||
if (!this->tls_eap)
|
if (!this->tls_eap)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -148,11 +148,6 @@ static eap_ttls_t *eap_ttls_create(identification_t *server,
|
|||||||
frag_size = lib->settings->get_int(lib->settings,
|
frag_size = lib->settings->get_int(lib->settings,
|
||||||
"charon.plugins.eap-ttls.fragment_size", MAX_FRAGMENT_LEN);
|
"charon.plugins.eap-ttls.fragment_size", MAX_FRAGMENT_LEN);
|
||||||
tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TTLS, application);
|
tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TTLS, application);
|
||||||
if (!tls)
|
|
||||||
{
|
|
||||||
free(this);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
this->tls_eap = tls_eap_create(EAP_TTLS, tls, frag_size);
|
this->tls_eap = tls_eap_create(EAP_TTLS, tls, frag_size);
|
||||||
if (!this->tls_eap)
|
if (!this->tls_eap)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -325,6 +325,11 @@ tls_eap_t *tls_eap_create(eap_type_t type, tls_t *tls, size_t frag_size)
|
|||||||
{
|
{
|
||||||
private_tls_eap_t *this;
|
private_tls_eap_t *this;
|
||||||
|
|
||||||
|
if (!tls)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.initiate = _initiate,
|
.initiate = _initiate,
|
||||||
|
|||||||
Reference in New Issue
Block a user