From: Nikos Mavrogiannopoulos Date: Sun, 27 Jan 2013 14:20:09 +0000 (+0100) Subject: propagate the error of the verify callback. X-Git-Tag: gnutls_3_1_7~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b062201a4304c5759c678eeda44755fbf0cd8af1;p=thirdparty%2Fgnutls.git propagate the error of the verify callback. --- diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 842caf10bc..47d2ed0517 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2497,7 +2497,9 @@ static int run_verify_callback(gnutls_session_t session, unsigned int side) if (cred != NULL && cred->verify_callback != NULL) { ret = cred->verify_callback (session); - if (ret != 0) + if (ret < -1) + return ret; + else if (ret != 0) return GNUTLS_E_CERTIFICATE_ERROR; }