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

Side by Side Diff: patches.chromium/0008-paddingext.patch

Issue 112933006: OpenSSL: add support for the TLS padding extension. Base URL: https://chromium.googlesource.com/chromium/deps/openssl.git@master
Patch Set: ... 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
« openssl/ssl/t1_lib.c ('K') | « openssl/ssl/tls1.h ('k') | no next file » | 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/openssl.config android-openssl-lhash2/openssl.co nfig
2 --- android-openssl.orig/openssl.config 2013-11-05 14:11:10.833326408 -0500
3 +++ android-openssl-lhash2/openssl.config 2013-11-05 14:38:31.187575574 -0 500
4 @@ -1015,6 +1015,7 @@
5 use_aead_for_aes_gcm.patch \
6 chacha20poly1305.patch \
7 neon_runtime.patch \
8 +paddingext.patch \
9 "
10
11 OPENSSL_PATCHES_progs_SOURCES="\
12 diff -burN android-openssl-foo/patches/paddingext.patch android-openssl/patches/ paddingext.patch
13 --- android-openssl-foo/patches/paddingext.patch 1969-12-31 19:00:00.0000 00000 -0500
14 +++ android-openssl/patches/paddingext.patch 2013-11-05 14:14:34.631283497 -0 500
15 @@ -0,0 +1,65 @@
16 +From 61a9671951205d66382556b2502993ffc9201f59 Mon Sep 17 00:00:00 2001
17 +From: Adam Langley <agl@chromium.org>
18 +Date: Wed, 11 Dec 2013 16:25:17 -0500
19 +Subject: [PATCH 57/57] Add padding extension.
20 +
21 +This change adds a padding extension, when needed, in order to work
22 +around bugs in F5 terminators.
23 +---
24 + ssl/t1_lib.c | 20 ++++++++++++++++++++
25 + ssl/tls1.h | 4 ++++
26 + 2 files changed, 24 insertions(+)
27 +
28 +diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
29 +index 5578056..f9ad9d9 100644
30 +--- a/ssl/t1_lib.c
31 ++++ b/ssl/t1_lib.c
32 +@@ -695,6 +695,31 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
33 + }
34 + #endif
35 +
36 ++ /* Add padding to workaround bugs in F5 terminators.
37 ++ * See https://tools.ietf.org/html/draft-agl-tls-padding-02 */
38 ++ {
39 ++ int hlen = ret - (unsigned char *)s->init_buf->data;
40 ++ /* The code in s23_clnt.c to build ClientHello messages includes the
41 ++ * 5-byte record header in the buffer, while the code in s3_clnt.c does
42 ++ * not. */
43 ++ if (s->state == SSL23_ST_CW_CLNT_HELLO_A)
44 ++ hlen -= 5;
45 ++ if (hlen > 0xff && hlen < 0x200)
46 ++ {
47 ++ hlen = 0x200 - hlen;
48 ++ if (hlen >= 4)
49 ++ hlen -= 4;
50 ++ else
51 ++ hlen = 0;
52 ++
53 ++ s2n(TLSEXT_TYPE_padding, ret);
54 ++ s2n(hlen, ret);
55 ++ memset(ret, 0, hlen);
56 ++ ret += hlen;
57 ++ }
58 ++ }
59 ++
60 ++
61 + if ((extdatalen = ret-p-2)== 0)
62 + return p;
63 +
64 +diff --git a/ssl/tls1.h b/ssl/tls1.h
65 +index ecf5da7..df8f482 100644
66 +--- a/ssl/tls1.h
67 ++++ b/ssl/tls1.h
68 +@@ -255,6 +255,10 @@ extern "C" {
69 + #define TLSEXT_TYPE_channel_id 30031
70 + #define TLSEXT_TYPE_channel_id_new 30032
71 +
72 ++/* See https://tools.ietf.org/html/draft-agl-tls-padding-02
73 ++ * Number not yet IANA assigned. */
74 ++#define TLSEXT_TYPE_padding 35655
75 ++
76 + /* NameType value from RFC 3546 */
77 + #define TLSEXT_NAMETYPE_host_name 0
78 + /* status request value from RFC 3546 */
79 +--
80 +1.8.5.1
OLDNEW
« openssl/ssl/t1_lib.c ('K') | « openssl/ssl/tls1.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698