Only accept a client certificate if the server requests

one, as required by SSL/TLS specs.
This commit is contained in:
Dr. Stephen Henson
2003-09-03 23:42:17 +00:00
parent 3b07c32fe7
commit 33ed371ec9
2 changed files with 10 additions and 4 deletions

View File

@@ -431,10 +431,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;
}