added support for EAP methods not establishing an MSK
This commit is contained in:
@@ -62,6 +62,7 @@ static status_t verify(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
chunk_t auth_data, octets;
|
||||
rsa_public_key_t *public_key;
|
||||
identification_t *other_id;
|
||||
prf_t *prf;
|
||||
|
||||
other_id = this->ike_sa->get_other_id(this->ike_sa);
|
||||
|
||||
@@ -77,8 +78,9 @@ static status_t verify(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
DBG1(DBG_IKE, "no RSA public key found for '%D'", other_id);
|
||||
return NOT_FOUND;
|
||||
}
|
||||
octets = build_tbs_octets(ike_sa_init, my_nonce, other_id,
|
||||
this->ike_sa->get_auth_verify(this->ike_sa));
|
||||
prf = this->ike_sa->get_prf(this->ike_sa);
|
||||
prf->set_key(prf, this->ike_sa->get_skp_verify(this->ike_sa));
|
||||
octets = build_tbs_octets(ike_sa_init, my_nonce, other_id, prf);
|
||||
status = public_key->verify_emsa_pkcs1_signature(public_key, octets, auth_data);
|
||||
chunk_free(&octets);
|
||||
|
||||
@@ -106,6 +108,7 @@ static status_t build(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
rsa_public_key_t *my_pubkey;
|
||||
rsa_private_key_t *my_key;
|
||||
identification_t *my_id;
|
||||
prf_t *prf;
|
||||
|
||||
my_id = this->ike_sa->get_my_id(this->ike_sa);
|
||||
DBG1(DBG_IKE, "authentication of '%D' (myself) with %N",
|
||||
@@ -130,8 +133,9 @@ static status_t build(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
}
|
||||
DBG2(DBG_IKE, "matching RSA private key found");
|
||||
|
||||
octets = build_tbs_octets(ike_sa_init, other_nonce, my_id,
|
||||
this->ike_sa->get_auth_build(this->ike_sa));
|
||||
prf = this->ike_sa->get_prf(this->ike_sa);
|
||||
prf->set_key(prf, this->ike_sa->get_skp_build(this->ike_sa));
|
||||
octets = build_tbs_octets(ike_sa_init, other_nonce, my_id, prf);
|
||||
status = my_key->build_emsa_pkcs1_signature(my_key, HASH_SHA1, octets, &auth_data);
|
||||
chunk_free(&octets);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user