Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: openssl/ssl/s3_clnt.c

Issue 112933006: OpenSSL: add support for the TLS padding extension. Base URL: https://chromium.googlesource.com/chromium/deps/openssl.git@master
Patch Set: Add comments at ClientHello construction sites Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « openssl/ssl/s23_clnt.c ('k') | openssl/ssl/t1_lib.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* ssl/s3_clnt.c */ 1 /* ssl/s3_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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 goto err; 750 goto err;
751 } 751 }
752 /* else use the pre-loaded session */ 752 /* else use the pre-loaded session */
753 753
754 p=s->s3->client_random; 754 p=s->s3->client_random;
755 Time=(unsigned long)time(NULL); /* Time */ 755 Time=(unsigned long)time(NULL); /* Time */
756 l2n(Time,p); 756 l2n(Time,p);
757 if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) 757 if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
758 goto err; 758 goto err;
759 759
760 » » /* Do the message type and length last */ 760 » » /* Do the message type and length last.
761 » » * Note: the code to add the padding extension in t1_lib.c
762 » » * depends on the size of this prefix. */
761 d=p= &(buf[4]); 763 d=p= &(buf[4]);
762 764
763 /* version indicates the negotiated version: for example from 765 /* version indicates the negotiated version: for example from
764 * an SSLv2/v3 compatible client hello). The client_version 766 * an SSLv2/v3 compatible client hello). The client_version
765 * field is the maximum version we permit and it is also 767 * field is the maximum version we permit and it is also
766 * used in RSA encrypted premaster secrets. Some servers can 768 * used in RSA encrypted premaster secrets. Some servers can
767 * choke if we initially report a higher version then 769 * choke if we initially report a higher version then
768 * renegotiate to a lower one in the premaster secret. This 770 * renegotiate to a lower one in the premaster secret. This
769 * didn't happen with TLS 1.0 as most servers supported it 771 * didn't happen with TLS 1.0 as most servers supported it
770 * but it can with TLS 1.1 or later if the server only supports 772 * but it can with TLS 1.1 or later if the server only supports
(...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
3568 SSL_get_client_CA_list(s), 3570 SSL_get_client_CA_list(s),
3569 px509, ppkey, NULL, NULL, NULL); 3571 px509, ppkey, NULL, NULL, NULL);
3570 if (i != 0) 3572 if (i != 0)
3571 return i; 3573 return i;
3572 } 3574 }
3573 #endif 3575 #endif
3574 if (s->ctx->client_cert_cb) 3576 if (s->ctx->client_cert_cb)
3575 i = s->ctx->client_cert_cb(s,px509,ppkey); 3577 i = s->ctx->client_cert_cb(s,px509,ppkey);
3576 return i; 3578 return i;
3577 } 3579 }
OLDNEW
« no previous file with comments | « openssl/ssl/s23_clnt.c ('k') | openssl/ssl/t1_lib.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698