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/s2_srvr.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/s2_srvr.c')
-rw-r--r-- | ssl/s2_srvr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 8580ac6a8d..814e38f480 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -155,6 +155,7 @@ SSL *s; case SSL_ST_BEFORE|SSL_ST_ACCEPT: case SSL_ST_OK|SSL_ST_ACCEPT: + s->server=1; if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); s->version=SSL2_VERSION; @@ -168,7 +169,7 @@ SSL *s; { ret= -1; goto end; } s->init_buf=buf; s->init_num=0; - s->ctx->sess_accept++; + s->ctx->stats.sess_accept++; s->handshake_func=ssl2_accept; s->state=SSL2_ST_GET_CLIENT_HELLO_A; BREAK; @@ -295,13 +296,14 @@ SSL *s; case SSL_ST_OK: BUF_MEM_free(s->init_buf); + ssl_free_wbio_buffer(s); s->init_buf=NULL; s->init_num=0; /* ERR_clear_error();*/ ssl_update_cache(s,SSL_SESS_CACHE_SERVER); - s->ctx->sess_accept_good++; + s->ctx->stats.sess_accept_good++; /* s->server=1; */ ret=1; @@ -336,9 +338,6 @@ static int get_client_master_key(s) SSL *s; { int export,i,n,keya,ek; -#if 0 - int error=0; -#endif unsigned char *p; SSL_CIPHER *cp; EVP_CIPHER *c; @@ -404,7 +403,7 @@ SSL *s; export=(s->session->cipher->algorithms & SSL_EXP)?1:0; - if (!ssl_cipher_get_evp(s->session->cipher,&c,&md)) + if (!ssl_cipher_get_evp(s->session,&c,&md,NULL)) { ssl2_return_error(s,SSL2_PE_NO_CIPHER); SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS); |