aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/sa/authenticator.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-25 10:06:30 +0000
committerMartin Willi <martin@strongswan.org>2006-04-25 10:06:30 +0000
commit13e4a62f5c352981a93156be7749bfa712782d84 (patch)
tree16790bf1294e870da3b40f3991e258b7176f778e /Source/charon/sa/authenticator.c
parenta8c09d8cc0044fbff6c89c2e8966427ee7ed1ef0 (diff)
downloadstrongswan-13e4a62f5c352981a93156be7749bfa712782d84.tar.bz2
strongswan-13e4a62f5c352981a93156be7749bfa712782d84.tar.xz
- added separate implementation for connection_store, credential_store, policy_store
- added folder structure to config - credentials are fetched solely on IDs now
Diffstat (limited to 'Source/charon/sa/authenticator.c')
-rw-r--r--Source/charon/sa/authenticator.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/charon/sa/authenticator.c b/Source/charon/sa/authenticator.c
index 32817b0a1..3aeb8795f 100644
--- a/Source/charon/sa/authenticator.c
+++ b/Source/charon/sa/authenticator.c
@@ -250,15 +250,14 @@ static status_t verify_auth_data (private_authenticator_t *this,
auth_data = auth_payload->get_data(auth_payload);
- status = charon->credentials->get_rsa_public_key(charon->credentials,
- other_id,
- &public_key);
- if (status != SUCCESS)
+ public_key = charon->credentials->get_rsa_public_key(charon->credentials,
+ other_id);
+ if (public_key == NULL)
{
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;
+ return NOT_FOUND;
}
octets = this->allocate_octets(this,last_received_packet, my_nonce,other_id_payload, initiator);
@@ -338,13 +337,13 @@ static status_t compute_auth_data (private_authenticator_t *this,
status_t status;
chunk_t octets, auth_data;
- status = charon->credentials->get_rsa_private_key(charon->credentials, my_id, &private_key);
- if (status != SUCCESS)
+ private_key = charon->credentials->get_rsa_private_key(charon->credentials, my_id);
+ if (private_key == NULL)
{
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;
+ return NOT_FOUND;
}
my_id->destroy(my_id);