~ubuntu-branches/ubuntu/hardy/openssl/hardy-security

« back to all changes in this revision

Viewing changes to ssl/s3_both.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2010-08-12 08:35:55 UTC
  • Revision ID: james.westby@ubuntu.com-20100812083555-pbvncwa9ok60q30i
Tags: 0.9.8g-4ubuntu3.10
* SECURITY UPDATE: TLS renegotiation flaw (LP: #616759)
  - apps/{s_cb,s_client,s_server}.c, doc/ssl/SSL_CTX_set_options.pod,
    ssl/{d1_both,d1_clnt,d1_srvr,s3_both,s3_clnt,s3_pkt,s3_srvr,ssl_err,
    ssl_lib,t1_lib,t1_reneg}.c, ssl/Makefile, ssl/{ssl3,ssl,ssl_locl,
    tls1}.h: backport rfc5746 support from openssl 0.9.8m.
  - CVE-2009-3555
* Enable tlsext, and backport some patches from jaunty now that tlsext is
  enabled.
  - Fix a problem with tlsext preventing firefox 3 from connection.
  - Don't add extentions to ssl v3 connections. It breaks with some
    other software.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
                p+=i;
169
169
                l=i;
170
170
 
 
171
                /* Copy the finished so we can use it for
 
172
                   renegotiation checks */
 
173
                if(s->type == SSL_ST_CONNECT)
 
174
                        {
 
175
                         OPENSSL_assert(i <= EVP_MAX_MD_SIZE);
 
176
                         memcpy(s->s3->previous_client_finished, 
 
177
                             s->s3->tmp.finish_md, i);
 
178
                         s->s3->previous_client_finished_len=i;
 
179
                        }
 
180
                else
 
181
                        {
 
182
                        OPENSSL_assert(i <= EVP_MAX_MD_SIZE);
 
183
                        memcpy(s->s3->previous_server_finished, 
 
184
                            s->s3->tmp.finish_md, i);
 
185
                        s->s3->previous_server_finished_len=i;
 
186
                        }
 
187
 
171
188
#ifdef OPENSSL_SYS_WIN16
172
189
                /* MSVC 1.5 does not clear the top bytes of the word unless
173
190
                 * I do this.
232
249
                goto f_err;
233
250
                }
234
251
 
 
252
        /* Copy the finished so we can use it for
 
253
           renegotiation checks */
 
254
        if(s->type == SSL_ST_ACCEPT)
 
255
                {
 
256
                OPENSSL_assert(i <= EVP_MAX_MD_SIZE);
 
257
                memcpy(s->s3->previous_client_finished, 
 
258
                    s->s3->tmp.peer_finish_md, i);
 
259
                s->s3->previous_client_finished_len=i;
 
260
                }
 
261
        else
 
262
                {
 
263
                OPENSSL_assert(i <= EVP_MAX_MD_SIZE);
 
264
                memcpy(s->s3->previous_server_finished, 
 
265
                    s->s3->tmp.peer_finish_md, i);
 
266
                s->s3->previous_server_finished_len=i;
 
267
                }
 
268
 
235
269
        return(1);
236
270
f_err:
237
271
        ssl3_send_alert(s,SSL3_AL_FATAL,al);