Index: lib/libssl/src/crypto/x509/x509_vfy.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/x509/x509_vfy.c,v
retrieving revision 1.6
diff -u -r1.6 x509_vfy.c
--- lib/libssl/src/crypto/x509/x509_vfy.c 15 May 2002 02:29:17 -0000 1.6
+++ lib/libssl/src/crypto/x509/x509_vfy.c 3 Oct 2003 22:22:01 -0000
@@ -674,7 +674,7 @@
ok=(*cb)(0,ctx);
if (!ok) goto end;
}
- if (X509_verify(xs,pkey) <= 0)
+ else if (X509_verify(xs,pkey) <= 0)
/* XXX For the final trusted self-signed cert,
* this is a waste of time. That check should
* optional so that e.g. 'openssl x509' can be
Index: lib/libssl/src/ssl/s3_clnt.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/ssl/s3_clnt.c,v
retrieving revision 1.12
diff -u -r1.12 s3_clnt.c
--- lib/libssl/src/ssl/s3_clnt.c 23 Sep 2002 21:32:28 -0000 1.12
+++ lib/libssl/src/ssl/s3_clnt.c 3 Oct 2003 22:22:01 -0000
@@ -1752,6 +1752,7 @@
*(d++)=SSL3_MT_CERTIFICATE_VERIFY;
l2n3(n,d);
+ s->state=SSL3_ST_CW_CERT_VRFY_B;
s->init_num=(int)n+4;
s->init_off=0;
}
Index: lib/libssl/src/ssl/s3_srvr.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/ssl/s3_srvr.c,v
retrieving revision 1.15
diff -u -r1.15 s3_srvr.c
--- lib/libssl/src/ssl/s3_srvr.c 19 Mar 2003 23:03:01 -0000 1.15
+++ lib/libssl/src/ssl/s3_srvr.c 3 Oct 2003 22:22:01 -0000
@@ -425,10 +425,11 @@
if (ret == 2)
s->state = SSL3_ST_SR_CLNT_HELLO_C;
else {
- /* could be sent for a DH cert, even if we
- * have not asked for it :-) */
- ret=ssl3_get_client_certificate(s);
- if (ret <= 0) goto end;
+ if (s->s3->tmp.cert_request)
+ {
+ ret=ssl3_get_client_certificate(s);
+ if (ret <= 0) goto end;
+ }
s->init_num=0;
s->state=SSL3_ST_SR_KEY_EXCH_A;
}
@@ -838,6 +839,9 @@
}
/* TLS does not mind if there is extra stuff */
+#if 0 /* SSL 3.0 does not mind either, so we should disable this test
+ * (was enabled in 0.9.6d through 0.9.6j and 0.9.7 through 0.9.7b,
+ * in earlier SSLeay/OpenSSL releases this test existed but was buggy) */
if (s->version == SSL3_VERSION)
{
if (p < (d+n))
@@ -849,6 +853,7 @@
goto f_err;
}
}
+#endif
/* Given s->session->ciphers and SSL_get_ciphers, we must
* pick a cipher */
@@ -1346,6 +1351,7 @@
s->init_num += 4;
#endif