s3_pkt.c (246772) | s3_pkt.c (261037) |
---|---|
1/* ssl/s3_pkt.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 * --- 321 unchanged lines hidden (view full) --- 330#endif 331 332 /* Lets check version */ 333 if (!s->first_packet) 334 { 335 if (version != s->version) 336 { 337 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); | 1/* ssl/s3_pkt.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 * --- 321 unchanged lines hidden (view full) --- 330#endif 331 332 /* Lets check version */ 333 if (!s->first_packet) 334 { 335 if (version != s->version) 336 { 337 SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); |
338 if ((s->version & 0xFF00) == (version & 0xFF00)) | 338 if ((s->version & 0xFF00) == (version & 0xFF00) && !s->enc_write_ctx && !s->write_hash) |
339 /* Send back error using their minor version number :-) */ 340 s->version = (unsigned short)version; 341 al=SSL_AD_PROTOCOL_VERSION; 342 goto f_err; 343 } 344 } 345 346 if ((version>>8) != SSL3_VERSION_MAJOR) --- 1107 unchanged lines hidden (view full) --- 1454 slen=s->method->ssl3_enc->server_finished_label_len; 1455 } 1456 else 1457 { 1458 sender=s->method->ssl3_enc->client_finished_label; 1459 slen=s->method->ssl3_enc->client_finished_label_len; 1460 } 1461 | 339 /* Send back error using their minor version number :-) */ 340 s->version = (unsigned short)version; 341 al=SSL_AD_PROTOCOL_VERSION; 342 goto f_err; 343 } 344 } 345 346 if ((version>>8) != SSL3_VERSION_MAJOR) --- 1107 unchanged lines hidden (view full) --- 1454 slen=s->method->ssl3_enc->server_finished_label_len; 1455 } 1456 else 1457 { 1458 sender=s->method->ssl3_enc->client_finished_label; 1459 slen=s->method->ssl3_enc->client_finished_label_len; 1460 } 1461 |
1462 s->s3->tmp.peer_finish_md_len = s->method->ssl3_enc->final_finish_mac(s, | 1462 i = s->method->ssl3_enc->final_finish_mac(s, |
1463 sender,slen,s->s3->tmp.peer_finish_md); | 1463 sender,slen,s->s3->tmp.peer_finish_md); |
1464 if (i == 0) 1465 { 1466 SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR); 1467 return 0; 1468 } 1469 s->s3->tmp.peer_finish_md_len = i; |
|
1464 1465 return(1); 1466 } 1467 1468int ssl3_send_alert(SSL *s, int level, int desc) 1469 { 1470 /* Map tls/ssl alert value to correct one */ 1471 desc=s->method->ssl3_enc->alert_value(desc); --- 52 unchanged lines hidden --- | 1470 1471 return(1); 1472 } 1473 1474int ssl3_send_alert(SSL *s, int level, int desc) 1475 { 1476 /* Map tls/ssl alert value to correct one */ 1477 desc=s->method->ssl3_enc->alert_value(desc); --- 52 unchanged lines hidden --- |