Add a return value to signer_t.set_key()
This commit is contained in:
@@ -526,9 +526,8 @@ eap_radius_dae_t *eap_radius_dae_create(eap_radius_accounting_t *accounting)
|
||||
return NULL;
|
||||
}
|
||||
this->secret.len = strlen(this->secret.ptr);
|
||||
this->signer->set_key(this->signer, this->secret);
|
||||
|
||||
if (!open_socket(this))
|
||||
if (!this->signer->set_key(this->signer, this->secret) ||
|
||||
!open_socket(this))
|
||||
{
|
||||
destroy(this);
|
||||
return NULL;
|
||||
|
||||
@@ -166,12 +166,24 @@ static bool derive_ike_traditional(private_keymat_v2_t *this, u_int16_t enc_alg,
|
||||
|
||||
prf_plus->allocate_bytes(prf_plus, key_size, &key);
|
||||
DBG4(DBG_IKE, "Sk_ai secret %B", &key);
|
||||
signer_i->set_key(signer_i, key);
|
||||
if (!signer_i->set_key(signer_i, key))
|
||||
{
|
||||
signer_i->destroy(signer_i);
|
||||
signer_r->destroy(signer_r);
|
||||
chunk_clear(&key);
|
||||
return FALSE;
|
||||
}
|
||||
chunk_clear(&key);
|
||||
|
||||
prf_plus->allocate_bytes(prf_plus, key_size, &key);
|
||||
DBG4(DBG_IKE, "Sk_ar secret %B", &key);
|
||||
signer_r->set_key(signer_r, key);
|
||||
if (!signer_r->set_key(signer_r, key))
|
||||
{
|
||||
signer_i->destroy(signer_i);
|
||||
signer_r->destroy(signer_r);
|
||||
chunk_clear(&key);
|
||||
return FALSE;
|
||||
}
|
||||
chunk_clear(&key);
|
||||
|
||||
/* SK_ei/SK_er used for encryption */
|
||||
|
||||
Reference in New Issue
Block a user