diff options
Diffstat (limited to 'lib/gnutls_x509.c')
-rw-r--r-- | lib/gnutls_x509.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index 4ee09841a5..ab7e44709f 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -159,6 +159,14 @@ _gnutls_x509_cert_verify_peers (gnutls_session_t session, return ret; } + + if (ret < 0) + { + gnutls_assert(); + CLEAR_CERTS; + return ret; + } + ret = check_bits (peer_certificate_list[i], cred->verify_bits); if (ret < 0) { @@ -171,6 +179,7 @@ _gnutls_x509_cert_verify_peers (gnutls_session_t session, /* Verify certificate */ + ret = gnutls_x509_crt_list_verify (peer_certificate_list, peer_certificate_list_size, cred->x509_ca_list, cred->x509_ncas, |