cosmetics

This commit is contained in:
Andreas Steffen
2007-05-15 12:45:19 +00:00
parent 1387e64af1
commit b17e0db372
+7 -9
View File
@@ -134,25 +134,23 @@ static void process_certs(private_ike_cert_t *this, message_t *message)
cert = x509_create_from_chunk(cert_data, 0); cert = x509_create_from_chunk(cert_data, 0);
if (cert) if (cert)
{ {
if (charon->credentials->verify(charon->credentials, if (charon->credentials->verify(charon->credentials, cert, &found))
cert, &found))
{ {
DBG2(DBG_IKE, "received end entity certificate is trusted, " DBG2(DBG_IKE, "received end entity certificate is trusted, "
"added to store"); "added to store");
if (!found) if (found)
{ {
charon->credentials->add_end_certificate( cert->destroy(cert);
charon->credentials, cert);
} }
else else
{ {
cert->destroy(cert); charon->credentials->add_end_certificate(charon->credentials, cert);
} }
} }
else else
{ {
DBG1(DBG_IKE, "received end entity certificate is not " DBG1(DBG_IKE, "received end entity certificate is not trusted,"
"trusted, discarded"); "discarded");
cert->destroy(cert); cert->destroy(cert);
} }
} }