encoding: Allow ke_payload_create_from_diffie_hellman() to fail
This commit is contained in:
@@ -694,7 +694,13 @@ METHOD(phase1_t, add_nonce_ke, bool,
|
||||
nonce_gen_t *nonceg;
|
||||
chunk_t nonce;
|
||||
|
||||
ke_payload = ke_payload_create_from_diffie_hellman(PLV1_KEY_EXCHANGE, this->dh);
|
||||
ke_payload = ke_payload_create_from_diffie_hellman(PLV1_KEY_EXCHANGE,
|
||||
this->dh);
|
||||
if (!ke_payload)
|
||||
{
|
||||
DBG1(DBG_IKE, "creating KE payload failed");
|
||||
return FALSE;
|
||||
}
|
||||
message->add_payload(message, &ke_payload->payload_interface);
|
||||
|
||||
nonceg = this->keymat->keymat.create_nonce_gen(&this->keymat->keymat);
|
||||
|
||||
Reference in New Issue
Block a user