check for malformed IKE and ESP proposals
This commit is contained in:
@@ -560,6 +560,7 @@ static status_t add_string_algo(private_proposal_t *this, chunk_t alg)
|
|||||||
|
|
||||||
if (token == NULL)
|
if (token == NULL)
|
||||||
{
|
{
|
||||||
|
DBG1(DBG_CFG, "algorithm '%.*s' not recognized", alg.len, alg.ptr);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ static void add_esp_proposals(private_sql_config_t *this,
|
|||||||
while (e->enumerate(e, &prop))
|
while (e->enumerate(e, &prop))
|
||||||
{
|
{
|
||||||
proposal = proposal_create_from_string(PROTO_ESP, prop);
|
proposal = proposal_create_from_string(PROTO_ESP, prop);
|
||||||
|
if (!proposal)
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "could not create ESP proposal from '%s'", prop);
|
||||||
|
break;
|
||||||
|
}
|
||||||
child->add_proposal(child, proposal);
|
child->add_proposal(child, proposal);
|
||||||
use_default = FALSE;
|
use_default = FALSE;
|
||||||
}
|
}
|
||||||
@@ -223,6 +228,11 @@ static void add_ike_proposals(private_sql_config_t *this,
|
|||||||
while (e->enumerate(e, &prop))
|
while (e->enumerate(e, &prop))
|
||||||
{
|
{
|
||||||
proposal = proposal_create_from_string(PROTO_IKE, prop);
|
proposal = proposal_create_from_string(PROTO_IKE, prop);
|
||||||
|
if (!proposal)
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "could not create IKE proposal from '%s'", prop);
|
||||||
|
break;
|
||||||
|
}
|
||||||
ike_cfg->add_proposal(ike_cfg, proposal);
|
ike_cfg->add_proposal(ike_cfg, proposal);
|
||||||
use_default = FALSE;
|
use_default = FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user