summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 15:41:33 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 15:48:29 +0100
commit690479ff508c74296a07d2476e8f6c98b9abfa9c (patch)
treeb0d6583b781fc77009aeabdd7cfd0a497819b91b
parent6fa3371b2311c0d48f80aa7a1ff4e2db96bdaf35 (diff)
downloadgnutls-690479ff508c74296a07d2476e8f6c98b9abfa9c.tar.gz
ensure failure when parsing fails.
-rw-r--r--lib/x509/verify.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/x509/verify.c b/lib/x509/verify.c
index 3174e23661..bde6c930c1 100644
--- a/lib/x509/verify.c
+++ b/lib/x509/verify.c
@@ -130,7 +130,7 @@ check_if_ca(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
&issuer_signed_data);
if (result < 0) {
gnutls_assert();
- goto cleanup;
+ goto fail;
}
result =
@@ -138,7 +138,7 @@ check_if_ca(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
&cert_signed_data);
if (result < 0) {
gnutls_assert();
- goto cleanup;
+ goto fail;
}
result =
@@ -146,7 +146,7 @@ check_if_ca(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
&issuer_signature);
if (result < 0) {
gnutls_assert();
- goto cleanup;
+ goto fail;
}
result =
@@ -154,7 +154,7 @@ check_if_ca(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
&cert_signature);
if (result < 0) {
gnutls_assert();
- goto cleanup;
+ goto fail;
}
/* If the subject certificate is the same as the issuer
@@ -207,9 +207,10 @@ check_if_ca(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
} else
gnutls_assert();
+ fail:
result = 0;
- cleanup:
+ cleanup:
_gnutls_free_datum(&cert_signed_data);
_gnutls_free_datum(&issuer_signed_data);
_gnutls_free_datum(&cert_signature);