moved tls_t existance test into tls_eap_create() again

This commit is contained in:
Andreas Steffen
2010-09-08 11:09:11 +02:00
parent d2b1d4378e
commit 51b385d44d
4 changed files with 5 additions and 15 deletions
-5
View File
@@ -141,11 +141,6 @@ static eap_tls_t *eap_tls_create(identification_t *server,
frag_size = lib->settings->get_int(lib->settings,
"charon.plugins.eap-tls.fragment_size", MAX_FRAGMENT_LEN);
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);
if (!this->tls_eap)
{
-5
View File
@@ -143,11 +143,6 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
frag_size = lib->settings->get_int(lib->settings,
"charon.plugins.eap-tnc.fragment_size", MAX_FRAGMENT_LEN);
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);
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,
"charon.plugins.eap-ttls.fragment_size", MAX_FRAGMENT_LEN);
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);
if (!this->tls_eap)
{
+5
View File
@@ -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;
if (!tls)
{
return NULL;
}
INIT(this,
.public = {
.initiate = _initiate,