diff options
author | Mark J. Cox <mark@openssl.org> | 1999-02-16 09:22:21 +0000 |
---|---|---|
committer | Mark J. Cox <mark@openssl.org> | 1999-02-16 09:22:21 +0000 |
commit | 413c4f45ed0508d2242638696b7665f499d68265 (patch) | |
tree | 5a5e667f7fc9cb548ab3b24dd02fff78e1b8f282 /ssl/s23_clnt.c | |
parent | a8236c8c322101c273d14c62282f264555e147c4 (diff) |
Updates to the new SSL compression code
[Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)]
Fix so that the version number in the master secret, when passed
via RSA, checks that if TLS was proposed, but we roll back to SSLv3
(because the server will not accept higher), that the version number
is 0x03,0x01, not 0x03,0x00
[Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)]
Submitted by:
Reviewed by:
PR:
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r-- | ssl/s23_clnt.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 1b4c06838b..c0948fd2da 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -136,6 +136,13 @@ SSL *s; case SSL_ST_BEFORE|SSL_ST_CONNECT: case SSL_ST_OK|SSL_ST_CONNECT: + if (s->session != NULL) + { + SSLerr(SSL_F_SSL23_CONNECT,SSL_R_SSL23_DOING_SESSION_ID_REUSE); + ret= -1; + goto end; + } + s->server=0; if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); /* s->version=TLS1_VERSION; */ @@ -161,7 +168,7 @@ SSL *s; ssl3_init_finished_mac(s); s->state=SSL23_ST_CW_CLNT_HELLO_A; - s->ctx->sess_connect++; + s->ctx->stats.sess_connect++; s->init_num=0; break; @@ -238,16 +245,19 @@ SSL *s; { *(d++)=TLS1_VERSION_MAJOR; *(d++)=TLS1_VERSION_MINOR; + s->client_version=TLS1_VERSION; } else if (!(s->options & SSL_OP_NO_SSLv3)) { *(d++)=SSL3_VERSION_MAJOR; *(d++)=SSL3_VERSION_MINOR; + s->client_version=SSL3_VERSION; } else if (!(s->options & SSL_OP_NO_SSLv2)) { *(d++)=SSL2_VERSION_MAJOR; *(d++)=SSL2_VERSION_MINOR; + s->client_version=SSL2_VERSION; } else { |