Updatde from stable branch.
[openssl.git] / ssl / s2_clnt.c
index e976ba82e9f87a44d9ddc02d6f3148a09741b576..00ac158f9bbcf7075ff06246b753037e3ac23276 100644 (file)
@@ -1046,7 +1046,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, const unsigned char *data)
 
        i=ssl_verify_cert_chain(s,sk);
                
-       if ((s->verify_mode != SSL_VERIFY_NONE) && (!i))
+       if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0))
                {
                SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
                goto err;