aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/sa/authenticator.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/charon/sa/authenticator.c')
-rw-r--r--Source/charon/sa/authenticator.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/charon/sa/authenticator.c b/Source/charon/sa/authenticator.c
index 2ec1733e1..20667f736 100644
--- a/Source/charon/sa/authenticator.c
+++ b/Source/charon/sa/authenticator.c
@@ -205,6 +205,8 @@ static status_t verify_auth_data (private_authenticator_t *this,
&preshared_secret);
if (status != SUCCESS)
{
+ this->logger->log(this->logger, ERROR|LEVEL1, "No shared secret found for %s",
+ other_id->get_string(other_id));
other_id->destroy(other_id);
return status;
}
@@ -252,6 +254,8 @@ static status_t verify_auth_data (private_authenticator_t *this,
&public_key);
if (status != SUCCESS)
{
+ this->logger->log(this->logger, ERROR|LEVEL1, "No RSA public key found for %s",
+ other_id->get_string(other_id));
other_id->destroy(other_id);
return status;
}
@@ -307,11 +311,14 @@ static status_t compute_auth_data (private_authenticator_t *this,
my_id,
&preshared_secret);
- my_id->destroy(my_id);
if (status != SUCCESS)
{
+ this->logger->log(this->logger, ERROR|LEVEL1, "No shared secret found for %s",
+ my_id->get_string(my_id));
+ my_id->destroy(my_id);
return status;
}
+ my_id->destroy(my_id);
auth_data = this->build_preshared_secret_signature(this, last_sent_packet, other_nonce,
my_id_payload, initiator, preshared_secret);
@@ -331,11 +338,14 @@ static status_t compute_auth_data (private_authenticator_t *this,
chunk_t octets, auth_data;
status = charon->credentials->get_rsa_private_key(charon->credentials, my_id, &private_key);
- my_id->destroy(my_id);
if (status != SUCCESS)
{
+ this->logger->log(this->logger, ERROR|LEVEL1, "No RSA private key found for %s",
+ my_id->get_string(my_id));
+ my_id->destroy(my_id);
return status;
}
+ my_id->destroy(my_id);
octets = this->allocate_octets(this,last_sent_packet,other_nonce,my_id_payload,initiator);