diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-02-19 15:41:33 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-02-19 15:48:29 +0100 |
commit | 690479ff508c74296a07d2476e8f6c98b9abfa9c (patch) | |
tree | b0d6583b781fc77009aeabdd7cfd0a497819b91b | |
parent | 6fa3371b2311c0d48f80aa7a1ff4e2db96bdaf35 (diff) | |
download | gnutls-690479ff508c74296a07d2476e8f6c98b9abfa9c.tar.gz |
ensure failure when parsing fails.
-rw-r--r-- | lib/x509/verify.c | 11 |
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); |