s3_both.c (72613) | s3_both.c (89837) |
---|---|
1/* ssl/s3_both.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 369 unchanged lines hidden (view full) --- 378 skip_message = 0; 379 if (!s->server) 380 if (p[0] == SSL3_MT_HELLO_REQUEST) 381 /* The server may always send 'Hello Request' messages -- 382 * we are doing a handshake anyway now, so ignore them 383 * if their format is correct. Does not count for 384 * 'Finished' MAC. */ 385 if (p[1] == 0 && p[2] == 0 &&p[3] == 0) | 1/* ssl/s3_both.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 369 unchanged lines hidden (view full) --- 378 skip_message = 0; 379 if (!s->server) 380 if (p[0] == SSL3_MT_HELLO_REQUEST) 381 /* The server may always send 'Hello Request' messages -- 382 * we are doing a handshake anyway now, so ignore them 383 * if their format is correct. Does not count for 384 * 'Finished' MAC. */ 385 if (p[1] == 0 && p[2] == 0 &&p[3] == 0) |
386 { 387 s->init_num = 0; |
|
386 skip_message = 1; | 388 skip_message = 1; |
389 } 390 |
|
387 } 388 while (skip_message); 389 390 /* s->init_num == 4 */ 391 392 if ((mt >= 0) && (*p != mt)) 393 { 394 al=SSL_AD_UNEXPECTED_MESSAGE; --- 32 unchanged lines hidden (view full) --- 427 s->state=stn; 428 429 s->init_num=0; 430 } 431 432 /* next state (stn) */ 433 p=(unsigned char *)s->init_buf->data; 434 n=s->s3->tmp.message_size; | 391 } 392 while (skip_message); 393 394 /* s->init_num == 4 */ 395 396 if ((mt >= 0) && (*p != mt)) 397 { 398 al=SSL_AD_UNEXPECTED_MESSAGE; --- 32 unchanged lines hidden (view full) --- 431 s->state=stn; 432 433 s->init_num=0; 434 } 435 436 /* next state (stn) */ 437 p=(unsigned char *)s->init_buf->data; 438 n=s->s3->tmp.message_size; |
439 n -= s->init_num; |
|
435 while (n > 0) 436 { 437 i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n,0); 438 if (i <= 0) 439 { 440 s->rwstate=SSL_READING; 441 *ok = 0; 442 return i; --- 146 unchanged lines hidden --- | 440 while (n > 0) 441 { 442 i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n,0); 443 if (i <= 0) 444 { 445 s->rwstate=SSL_READING; 446 *ok = 0; 447 return i; --- 146 unchanged lines hidden --- |