~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to ssl/s3_pkt.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
753
753
                        s->rwstate=SSL_NOTHING;
754
754
                        return(s->s3->wpend_ret);
755
755
                        }
756
 
                else if (i <= 0)
 
756
                else if (i <= 0) {
 
757
                        if (s->version == DTLS1_VERSION ||
 
758
                            s->version == DTLS1_BAD_VER) {
 
759
                                /* For DTLS, just drop it. That's kind of the whole
 
760
                                   point in using a datagram service */
 
761
                                s->s3->wbuf.left = 0;
 
762
                        }
757
763
                        return(i);
 
764
                }
758
765
                s->s3->wbuf.offset+=i;
759
766
                s->s3->wbuf.left-=i;
760
767
                }
1225
1232
 
1226
1233
        if (s->s3->tmp.key_block == NULL)
1227
1234
                {
 
1235
                if (s->session == NULL) 
 
1236
                        {
 
1237
                        /* might happen if dtls1_read_bytes() calls this */
 
1238
                        SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY);
 
1239
                        return (0);
 
1240
                        }
 
1241
 
1228
1242
                s->session->cipher=s->s3->tmp.new_cipher;
1229
1243
                if (!s->method->ssl3_enc->setup_key_block(s)) return(0);
1230
1244
                }