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

Side by Side Diff: openssl/patches/reduce_client_hello_size.patch

Issue 2072073002: Delete bundled copy of OpenSSL and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/openssl@master
Patch Set: Delete bundled copy of OpenSSL and replace with README. Created 4 years, 6 months 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/patches/progs.patch ('k') | openssl/patches/testssl.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff -burN android-openssl.orig/ssl/t1_lib.c android-openssl/ssl/t1_lib.c
2 --- android-openssl.orig/ssl/t1_lib.c 2013-06-21 14:24:45.338681810 -0700
3 +++ android-openssl/ssl/t1_lib.c 2013-06-21 14:34:07.977205221 -0700
4 @@ -202,33 +202,14 @@
5 NID_secp521r1 /* secp521r1 (25) */
6 };
7
8 +/* We support only the elliptic curves that are also supported by NSS
9 + * to improve compatibility with sites that don't accept large ClientHellos.
10 + */
11 static int pref_list[] =
12 {
13 - NID_sect571r1, /* sect571r1 (14) */
14 - NID_sect571k1, /* sect571k1 (13) */
15 NID_secp521r1, /* secp521r1 (25) */
16 - NID_sect409k1, /* sect409k1 (11) */
17 - NID_sect409r1, /* sect409r1 (12) */
18 NID_secp384r1, /* secp384r1 (24) */
19 - NID_sect283k1, /* sect283k1 (9) */
20 - NID_sect283r1, /* sect283r1 (10) */
21 - NID_secp256k1, /* secp256k1 (22) */
22 NID_X9_62_prime256v1, /* secp256r1 (23) */
23 - NID_sect239k1, /* sect239k1 (8) */
24 - NID_sect233k1, /* sect233k1 (6) */
25 - NID_sect233r1, /* sect233r1 (7) */
26 - NID_secp224k1, /* secp224k1 (20) */
27 - NID_secp224r1, /* secp224r1 (21) */
28 - NID_sect193r1, /* sect193r1 (4) */
29 - NID_sect193r2, /* sect193r2 (5) */
30 - NID_secp192k1, /* secp192k1 (18) */
31 - NID_X9_62_prime192v1, /* secp192r1 (19) */
32 - NID_sect163k1, /* sect163k1 (1) */
33 - NID_sect163r1, /* sect163r1 (2) */
34 - NID_sect163r2, /* sect163r2 (3) */
35 - NID_secp160k1, /* secp160k1 (15) */
36 - NID_secp160r1, /* secp160r1 (16) */
37 - NID_secp160r2, /* secp160r2 (17) */
38 };
39
40 int tls1_ec_curve_id2nid(int curve_id)
41 @@ -1703,17 +1684,18 @@
42 if (using_ecc)
43 {
44 if (s->tlsext_ecpointformatlist != NULL) OPENSSL_free(s->tlsext_ ecpointformatlist);
45 - if ((s->tlsext_ecpointformatlist = OPENSSL_malloc(3)) == NULL)
46 + /* To save an additional 2 bytes in the ClientHello, we only adv ertise support
47 + * for the only EC Point Format that NSS supports (instead of al l 3).
48 + */
49 + if ((s->tlsext_ecpointformatlist = OPENSSL_malloc(1)) == NULL)
50 {
51 SSLerr(SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT,ERR_R_MALLOC _FAILURE);
52 return -1;
53 }
54 - s->tlsext_ecpointformatlist_length = 3;
55 + s->tlsext_ecpointformatlist_length = 1;
56 s->tlsext_ecpointformatlist[0] = TLSEXT_ECPOINTFORMAT_uncompress ed;
57 - s->tlsext_ecpointformatlist[1] = TLSEXT_ECPOINTFORMAT_ansiX962_c ompressed_prime;
58 - s->tlsext_ecpointformatlist[2] = TLSEXT_ECPOINTFORMAT_ansiX962_c ompressed_char2;
59
60 - /* we support all named elliptic curves in draft-ietf-tls-ecc-12 */
61 + /* we only advertise support for elliptic curves in NSA Suite B */
62 if (s->tlsext_ellipticcurvelist != NULL) OPENSSL_free(s->tlsext_ ellipticcurvelist);
63 s->tlsext_ellipticcurvelist_length = sizeof(pref_list)/sizeof(pr ef_list[0]) * 2;
64 if ((s->tlsext_ellipticcurvelist = OPENSSL_malloc(s->tlsext_elli pticcurvelist_length)) == NULL)
OLDNEW
« no previous file with comments | « openssl/patches/progs.patch ('k') | openssl/patches/testssl.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698