if (result < 0)
{
gnutls_assert ();
- goto cleanup;
+ goto fail;
}
result =
if (result < 0)
{
gnutls_assert ();
- goto cleanup;
+ goto fail;
}
result =
if (result < 0)
{
gnutls_assert ();
- goto cleanup;
+ goto fail;
}
result =
if (result < 0)
{
gnutls_assert ();
- goto cleanup;
+ goto fail;
}
/* If the subject certificate is the same as the issuer
else
gnutls_assert ();
+fail:
result = 0;
cleanup:
if (issuer_version < 0)
{
gnutls_assert ();
- return issuer_version;
+ result = 0;
+ goto cleanup;
}
if (!(flags & GNUTLS_VERIFY_DISABLE_CA_SIGN) &&
((flags & GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT)
|| issuer_version != 1))
{
- if (check_if_ca (cert, issuer, max_path, flags) == 0)
+ if (check_if_ca (cert, issuer, max_path, flags) != 1)
{
gnutls_assert ();
out = GNUTLS_CERT_SIGNER_NOT_CA | GNUTLS_CERT_INVALID;
if (result < 0)
{
gnutls_assert ();
+ result = 0;
goto cleanup;
}
if (result < 0)
{
gnutls_assert ();
+ result = 0;
goto cleanup;
}
if (result < 0)
{
gnutls_assert ();
+ result = 0;
goto cleanup;
}
else if (result < 0)
{
gnutls_assert();
+ result = 0;
goto cleanup;
}
ret = _gnutls_verify_certificate2 (certificate_list[clist_size - 1],
trusted_cas, tcas_size, flags, &output,
&issuer, now, &max_path, func);
- if (ret == 0)
+ if (ret != 1)
{
/* if the last certificate in the certificate
* list is invalid, then the certificate is not
if ((ret =
_gnutls_verify_certificate2 (certificate_list[i - 1],
&certificate_list[i], 1, flags,
- &output, NULL, now, &max_path, func)) == 0)
+ &output, NULL, now, &max_path, func)) != 1)
{
status |= output;
status |= GNUTLS_CERT_INVALID;