| OLD | NEW |
| 1 /* ssl/s23_clnt.c */ | 1 /* ssl/s23_clnt.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 /* number of bytes to write */ | 459 /* number of bytes to write */ |
| 460 s->init_num=i+2; | 460 s->init_num=i+2; |
| 461 s->init_off=0; | 461 s->init_off=0; |
| 462 | 462 |
| 463 ssl3_finish_mac(s,&(buf[2]),i); | 463 ssl3_finish_mac(s,&(buf[2]),i); |
| 464 } | 464 } |
| 465 else | 465 else |
| 466 { | 466 { |
| 467 /* create Client Hello in SSL 3.0/TLS 1.0 format */ | 467 /* create Client Hello in SSL 3.0/TLS 1.0 format */ |
| 468 | 468 |
| 469 » » » /* do the record header (5 bytes) and handshake message
header (4 bytes) last */ | 469 » » » /* do the record header (5 bytes) and handshake message |
| 470 » » » * header (4 bytes) last. Note: the code to add the |
| 471 » » » * padding extension in t1_lib.c depends on the size of |
| 472 » » » * this prefix. */ |
| 470 d = p = &(buf[9]); | 473 d = p = &(buf[9]); |
| 471 | 474 |
| 472 *(p++) = version_major; | 475 *(p++) = version_major; |
| 473 *(p++) = version_minor; | 476 *(p++) = version_minor; |
| 474 | 477 |
| 475 /* Random stuff */ | 478 /* Random stuff */ |
| 476 memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); | 479 memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); |
| 477 p += SSL3_RANDOM_SIZE; | 480 p += SSL3_RANDOM_SIZE; |
| 478 | 481 |
| 479 /* Session ID (zero since there is no reuse) */ | 482 /* Session ID (zero since there is no reuse) */ |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_SESSION_MAY_NOT_BE_CRE
ATED); | 780 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_SESSION_MAY_NOT_BE_CRE
ATED); |
| 778 goto err; | 781 goto err; |
| 779 } | 782 } |
| 780 if (!ssl_get_new_session(s,0)) | 783 if (!ssl_get_new_session(s,0)) |
| 781 goto err; | 784 goto err; |
| 782 | 785 |
| 783 return(SSL_connect(s)); | 786 return(SSL_connect(s)); |
| 784 err: | 787 err: |
| 785 return(-1); | 788 return(-1); |
| 786 } | 789 } |
| OLD | NEW |