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.7
retrieving revision 1.7.2.1
diff -u -p -r1.7 -r1.7.2.1
--- lib/libssl/src/crypto/x509/x509_vfy.c 12 May 2003 02:18:39 -0000 1.7
+++ lib/libssl/src/crypto/x509/x509_vfy.c 31 Oct 2003 00:13:15 -0000 1.7.2.1
@@ -674,7 +674,7 @@ static int internal_verify(X509_STORE_CT
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.14
retrieving revision 1.14.2.1
diff -u -p -r1.14 -r1.14.2.1
--- lib/libssl/src/ssl/s3_clnt.c 6 Aug 2003 21:08:06 -0000 1.14
+++ lib/libssl/src/ssl/s3_clnt.c 31 Oct 2003 00:13:15 -0000 1.14.2.1
@@ -1768,6 +1768,7 @@ static int ssl3_send_client_verify(SSL *
*(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.16
retrieving revision 1.16.2.1
diff -u -p -r1.16 -r1.16.2.1
--- lib/libssl/src/ssl/s3_srvr.c 12 May 2003 02:18:40 -0000 1.16
+++ lib/libssl/src/ssl/s3_srvr.c 31 Oct 2003 00:13:15 -0000 1.16.2.1
@@ -432,10 +432,11 @@ int ssl3_accept(SSL *s)
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;
}
@@ -845,6 +846,9 @@ static int ssl3_get_client_hello(SSL *s)
}
/* 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))
@@ -856,6 +860,7 @@ static int ssl3_get_client_hello(SSL *s)
goto f_err;
}
}
+#endif
/* Given s->session->ciphers and SSL_get_ciphers, we must
* pick a cipher */
@@ -1353,6 +1358,7 @@ static int ssl3_send_certificate_request
s->init_num += 4;
#endif