cosmetics
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user