s3_clnt.c (246772) | s3_clnt.c (261037) |
---|---|
1/* ssl/s3_clnt.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 * --- 641 unchanged lines hidden (view full) --- 650 } 651 652 653int ssl3_client_hello(SSL *s) 654 { 655 unsigned char *buf; 656 unsigned char *p,*d; 657 int i; | 1/* ssl/s3_clnt.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 * --- 641 unchanged lines hidden (view full) --- 650 } 651 652 653int ssl3_client_hello(SSL *s) 654 { 655 unsigned char *buf; 656 unsigned char *p,*d; 657 int i; |
658 unsigned long Time,l; | 658 unsigned long l; |
659#ifndef OPENSSL_NO_COMP 660 int j; 661 SSL_COMP *comp; 662#endif 663 664 buf=(unsigned char *)s->init_buf->data; 665 if (s->state == SSL3_ST_CW_CLNT_HELLO_A) 666 { --- 8 unchanged lines hidden (view full) --- 675 (sess->not_resumable)) 676 { 677 if (!ssl_get_new_session(s,0)) 678 goto err; 679 } 680 /* else use the pre-loaded session */ 681 682 p=s->s3->client_random; | 659#ifndef OPENSSL_NO_COMP 660 int j; 661 SSL_COMP *comp; 662#endif 663 664 buf=(unsigned char *)s->init_buf->data; 665 if (s->state == SSL3_ST_CW_CLNT_HELLO_A) 666 { --- 8 unchanged lines hidden (view full) --- 675 (sess->not_resumable)) 676 { 677 if (!ssl_get_new_session(s,0)) 678 goto err; 679 } 680 /* else use the pre-loaded session */ 681 682 p=s->s3->client_random; |
683 Time=(unsigned long)time(NULL); /* Time */ 684 l2n(Time,p); 685 if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) | 683 684 if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0) |
686 goto err; 687 688 /* Do the message type and length last */ 689 d=p= &(buf[4]); 690 691 /* version indicates the negotiated version: for example from 692 * an SSLv2/v3 compatible client hello). The client_version 693 * field is the maximum version we permit and it is also --- 2680 unchanged lines hidden --- | 685 goto err; 686 687 /* Do the message type and length last */ 688 d=p= &(buf[4]); 689 690 /* version indicates the negotiated version: for example from 691 * an SSLv2/v3 compatible client hello). The client_version 692 * field is the maximum version we permit and it is also --- 2680 unchanged lines hidden --- |