mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
crypto/tls: add support for Certificate Transparency
This change adds support for serving and receiving Signed Certificate Timestamps as described in RFC 6962. The server is now capable of serving SCTs listed in the Certificate structure. The client now asks for SCTs and, if any are received, they are exposed in the ConnectionState structure. Fixes #10201 Change-Id: Ib3adae98cb4f173bc85cec04d2bdd3aa0fec70bb Reviewed-on: https://go-review.googlesource.com/8988 Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Jonathan Rudenberg <jonathan@titanous.com>
This commit is contained in:
parent
06b29738e8
commit
cf04082452
31 changed files with 1106 additions and 779 deletions
97
testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA
vendored
97
testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA
vendored
|
@ -1,18 +1,19 @@
|
|||
>>> Flow 1 (client to server)
|
||||
00000000 16 03 01 00 79 01 00 00 75 03 03 00 00 00 00 00 |....y...u.......|
|
||||
00000000 16 03 01 00 7d 01 00 00 79 03 03 00 00 00 00 00 |....}...y.......|
|
||||
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
||||
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 1e c0 2f |.............../|
|
||||
00000030 c0 2b c0 30 c0 2c c0 11 c0 07 c0 13 c0 09 c0 14 |.+.0.,..........|
|
||||
00000040 c0 0a 00 05 00 2f 00 35 c0 12 00 0a 01 00 00 2e |...../.5........|
|
||||
00000040 c0 0a 00 05 00 2f 00 35 c0 12 00 0a 01 00 00 32 |...../.5.......2|
|
||||
00000050 00 05 00 05 01 00 00 00 00 00 0a 00 08 00 06 00 |................|
|
||||
00000060 17 00 18 00 19 00 0b 00 02 01 00 00 0d 00 0a 00 |................|
|
||||
00000070 08 04 01 04 03 02 01 02 03 ff 01 00 01 00 |..............|
|
||||
00000070 08 04 01 04 03 02 01 02 03 ff 01 00 01 00 00 12 |................|
|
||||
00000080 00 00 |..|
|
||||
>>> Flow 2 (server to client)
|
||||
00000000 16 03 01 00 59 02 00 00 55 03 01 43 60 d4 9a c4 |....Y...U..C`...|
|
||||
00000010 28 6c b9 56 de 43 c6 e4 05 f5 ab 71 87 ef ae b8 |(l.V.C.....q....|
|
||||
00000020 cf da 13 b5 98 b7 ab cc 35 44 48 20 2c 7f 10 60 |........5DH ,..`|
|
||||
00000030 98 a8 13 4d a8 7c d6 45 48 aa c5 aa f2 f7 bb 98 |...M.|.EH.......|
|
||||
00000040 53 6e 5d 3f 56 de 17 ba c9 a8 d1 81 c0 09 00 00 |Sn]?V...........|
|
||||
00000000 16 03 01 00 59 02 00 00 55 03 01 78 c1 5c b4 a6 |....Y...U..x.\..|
|
||||
00000010 e8 72 33 c9 e2 c9 b2 da 12 9d 78 60 08 ae cd 37 |.r3.......x`...7|
|
||||
00000020 33 9a 39 0b d4 fb cb 69 db f0 35 20 4e 95 ee 5e |3.9....i..5 N..^|
|
||||
00000030 00 32 18 0d cf 52 7f 08 0d 8c b7 21 36 8a f0 2f |.2...R.....!6../|
|
||||
00000040 22 b8 60 4c b7 2f 5a 7a 02 11 9d ce c0 09 00 00 |".`L./Zz........|
|
||||
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
|
||||
00000060 01 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
|
||||
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
|
||||
|
@ -47,21 +48,21 @@
|
|||
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
|
||||
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
|
||||
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
|
||||
00000270 2a 16 03 01 00 d4 0c 00 00 d0 03 00 17 41 04 ef |*............A..|
|
||||
00000280 89 a9 4f 05 2f ee ee c9 cb 73 d0 57 cc c9 45 ca |..O./....s.W..E.|
|
||||
00000290 d8 61 4d 0d 5b cf 83 c1 19 bd 6d a7 49 de ba 6c |.aM.[.....m.I..l|
|
||||
000002a0 63 b5 88 c9 4d a8 44 9f f2 ec 3c 88 d6 ec 20 f3 |c...M.D...<... .|
|
||||
000002b0 6f 25 cd 99 0a 42 71 19 67 6d dd 65 6a 52 f8 00 |o%...Bq.gm.ejR..|
|
||||
000002c0 89 30 81 86 02 41 42 4f 70 eb fa 2a bf 06 0f 16 |.0...ABOp..*....|
|
||||
000002d0 62 d8 25 d5 d4 c4 bb 2e d1 f9 84 3b a0 57 78 7f |b.%........;.Wx.|
|
||||
000002e0 fe 29 50 49 e1 f0 a1 c6 1f 87 98 7f d5 63 b9 72 |.)PI.........c.r|
|
||||
000002f0 f5 2f 70 a8 bc 5f 45 22 57 07 99 e1 f8 51 30 b0 |./p.._E"W....Q0.|
|
||||
00000300 2f 6e 6d 8c b5 4a 34 02 41 05 86 7d e4 16 b2 bf |/nm..J4.A..}....|
|
||||
00000310 70 de 5a 69 43 6e e2 ec a2 4f 97 b0 ae 99 07 08 |p.ZiCn...O......|
|
||||
00000320 32 d2 9d f4 56 80 71 d7 96 94 36 59 b5 95 7f 10 |2...V.q...6Y....|
|
||||
00000330 8a aa a5 90 db cc a3 47 02 53 b1 9e 2d c7 db bc |.......G.S..-...|
|
||||
00000340 58 1d b5 01 07 9c 9c 74 b5 a7 16 03 01 00 0e 0d |X......t........|
|
||||
00000350 00 00 06 03 01 02 40 00 00 0e 00 00 00 |......@......|
|
||||
00000270 2a 16 03 01 00 d6 0c 00 00 d2 03 00 17 41 04 66 |*............A.f|
|
||||
00000280 aa 89 a3 0e 62 af 7e 8f 86 9e 91 b6 54 c9 4d 2d |....b.~.....T.M-|
|
||||
00000290 06 2c 95 57 8b 9c 95 e5 93 08 c7 8e 44 43 14 ef |.,.W........DC..|
|
||||
000002a0 d7 de f4 89 d4 d3 53 27 36 57 d2 25 35 b7 20 fc |......S'6W.%5. .|
|
||||
000002b0 7b 1e d5 01 af dc 94 3d 69 ed 3e c9 97 61 53 00 |{......=i.>..aS.|
|
||||
000002c0 8b 30 81 88 02 42 01 15 d3 cf d0 80 98 16 cd ff |.0...B..........|
|
||||
000002d0 7e 40 dc 09 06 d4 38 3b 9c 3c c1 d1 c6 eb 4c 94 |~@....8;.<....L.|
|
||||
000002e0 49 9c f8 9f c4 1f f3 23 ae 20 77 b1 47 c3 f7 85 |I......#. w.G...|
|
||||
000002f0 94 0c a4 d0 d1 47 48 35 e6 a7 18 d5 84 21 8a f2 |.....GH5.....!..|
|
||||
00000300 7f af d3 1c a3 e9 76 e1 02 42 00 81 ef 3d 55 ea |......v..B...=U.|
|
||||
00000310 7e 38 3a 11 44 43 98 1e 0f c8 8c 71 8b 2d 97 6d |~8:.DC.....q.-.m|
|
||||
00000320 44 dc 86 b3 02 34 01 d5 8c ce 81 b4 6e 11 c3 ed |D....4......n...|
|
||||
00000330 66 9c ba 1d f4 51 db 8f 4a 9b 43 52 c6 99 aa 06 |f....Q..J.CR....|
|
||||
00000340 1b 6d d4 f6 a5 26 d8 86 8e 92 c8 49 16 03 01 00 |.m...&.....I....|
|
||||
00000350 0e 0d 00 00 06 03 01 02 40 00 00 0e 00 00 00 |........@......|
|
||||
>>> Flow 3 (client to server)
|
||||
00000000 16 03 01 02 0a 0b 00 02 06 00 02 03 00 02 00 30 |...............0|
|
||||
00000010 82 01 fc 30 82 01 5e 02 09 00 9a 30 84 6c 26 35 |...0..^....0.l&5|
|
||||
|
@ -100,30 +101,30 @@
|
|||
00000220 51 88 35 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 |Q.5uq..T[....g..|
|
||||
00000230 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 |$ >.V...(^.+-O..|
|
||||
00000240 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 |..lK[.V.2B.X..I.|
|
||||
00000250 b5 68 1a 41 03 56 6b dc 5a 89 16 03 01 00 90 0f |.h.A.Vk.Z.......|
|
||||
00000260 00 00 8c 00 8a 30 81 87 02 42 01 0f 51 63 8f 2e |.....0...B..Qc..|
|
||||
00000270 fa 3a 3a 15 a9 4b 7f 04 c9 23 73 be 44 f5 28 37 |.::..K...#s.D.(7|
|
||||
00000280 2c 00 34 20 86 e6 94 00 bf 11 40 ec de a9 54 03 |,.4 ......@...T.|
|
||||
00000290 dc 9d 19 67 39 22 5e c4 55 3b f4 b6 9a a8 4f 6e |...g9"^.U;....On|
|
||||
000002a0 21 20 f0 9a 9a 10 a8 01 3a 20 ac 8b 02 41 34 ad |! ......: ...A4.|
|
||||
000002b0 89 da ec cc 8b b7 d7 5a 6c fe 6f 13 fa 58 40 2e |.......Zl.o..X@.|
|
||||
000002c0 a6 bf 32 69 97 a5 21 44 7c 3d d2 51 b3 b3 bb 9c |..2i..!D|=.Q....|
|
||||
000002d0 ed fa 5d bd 09 f3 c0 71 ee 3d 98 24 13 e1 e2 c8 |..]....q.=.$....|
|
||||
000002e0 e7 75 fc ac c3 61 9a f3 47 b2 7c 97 01 99 2d 14 |.u...a..G.|...-.|
|
||||
000002f0 03 01 00 01 01 16 03 01 00 30 d7 d1 c3 57 a3 f8 |.........0...W..|
|
||||
00000300 71 eb 97 9d a8 ac 15 88 f4 b4 f7 e6 8c 2e eb fe |q...............|
|
||||
00000310 25 d1 77 82 20 06 d1 36 20 3d bc 82 ab 30 4d 85 |%.w. ..6 =...0M.|
|
||||
00000320 1b 7b c2 9e 60 8f 7e 05 73 3e |.{..`.~.s>|
|
||||
00000250 b5 68 1a 41 03 56 6b dc 5a 89 16 03 01 00 91 0f |.h.A.Vk.Z.......|
|
||||
00000260 00 00 8d 00 8b 30 81 88 02 42 00 8d 68 bb 44 5f |.....0...B..h.D_|
|
||||
00000270 bb 5e 3b 58 02 e2 39 8c be f0 0e 4d 9b 0a a2 d5 |.^;X..9....M....|
|
||||
00000280 8d 36 e9 ed d6 60 22 59 a5 5d 91 11 dc e0 49 d8 |.6...`"Y.]....I.|
|
||||
00000290 5c 40 63 78 7f 79 57 cd da 35 d5 54 a8 92 2d 23 |\@cx.yW..5.T..-#|
|
||||
000002a0 95 d8 df d1 e3 af 69 46 ac b9 b8 e4 02 42 01 35 |......iF.....B.5|
|
||||
000002b0 12 86 8a 00 e2 f6 ee 2c e0 67 96 66 3d aa 4e 55 |.......,.g.f=.NU|
|
||||
000002c0 f2 70 ff de 6a 3a e1 ed 4d 16 45 09 78 7d ac 65 |.p..j:..M.E.x}.e|
|
||||
000002d0 03 f5 f6 57 82 0d 9f 93 cb 8b 18 39 74 81 c8 4d |...W.......9t..M|
|
||||
000002e0 e5 c3 1c 17 f1 0b 80 a0 b0 91 95 5b 29 d7 94 ed |...........[)...|
|
||||
000002f0 14 03 01 00 01 01 16 03 01 00 30 6c a7 aa 9c 49 |..........0l...I|
|
||||
00000300 77 68 e7 da ea d6 3b b7 ba cc fe e9 9c 03 68 53 |wh....;.......hS|
|
||||
00000310 d5 88 4c 48 b3 1d a3 a3 9c 7a e6 78 3d ab ad 7c |..LH.....z.x=..||
|
||||
00000320 66 f4 6e 3a d6 30 77 93 54 dd c2 |f.n:.0w.T..|
|
||||
>>> Flow 4 (server to client)
|
||||
00000000 14 03 01 00 01 01 16 03 01 00 30 7a 5e 9e 4b 7d |..........0z^.K}|
|
||||
00000010 44 8f 70 5f fd a9 50 a9 d8 52 cf 89 f9 b0 08 ea |D.p_..P..R......|
|
||||
00000020 bb a2 80 44 73 09 da 81 98 33 b1 44 88 0c ef e3 |...Ds....3.D....|
|
||||
00000030 c6 8b 2f 28 9b e1 f7 59 26 9c 54 |../(...Y&.T|
|
||||
00000000 14 03 01 00 01 01 16 03 01 00 30 7a 13 14 04 f6 |..........0z....|
|
||||
00000010 ea 6b 40 87 60 bd 5a bc e8 15 5a ec 85 50 aa e4 |.k@.`.Z...Z..P..|
|
||||
00000020 81 09 3d 0b 07 1d 58 6f d2 25 d6 62 7c c1 5e d2 |..=...Xo.%.b|.^.|
|
||||
00000030 cc 2f e3 36 3d 47 e4 d3 6b f9 3d |./.6=G..k.=|
|
||||
>>> Flow 5 (client to server)
|
||||
00000000 17 03 01 00 20 f1 61 1b 1f 1e 91 85 c1 ce 93 38 |.... .a........8|
|
||||
00000010 6b d0 ee c5 2e 00 f0 42 e3 a9 f0 82 92 a6 9b df |k......B........|
|
||||
00000020 ac 3c e3 18 aa 17 03 01 00 20 2a 72 5b 1a 57 10 |.<....... *r[.W.|
|
||||
00000030 cb 64 c4 5f b2 2d f9 03 41 ca 8d 72 93 f7 ae 19 |.d._.-..A..r....|
|
||||
00000040 37 3a 8c d5 f5 ad d8 83 20 9c 15 03 01 00 20 f9 |7:...... ..... .|
|
||||
00000050 53 1a 9f 34 27 91 f1 3f 7c 33 eb 1f 5d 0e bc 89 |S..4'..?|3..]...|
|
||||
00000060 5e 08 20 9e 5c e4 a0 70 8d 03 63 c6 9a 62 14 |^. .\..p..c..b.|
|
||||
00000000 17 03 01 00 20 1c df c9 6f 16 a4 ff c3 e5 e9 0e |.... ...o.......|
|
||||
00000010 0a 9e 2e 5d 9a f6 4e aa 9b 94 6c 3d f7 f8 a8 ad |...]..N...l=....|
|
||||
00000020 3c b8 92 73 0f 17 03 01 00 20 2f 4a 97 67 eb 8b |<..s..... /J.g..|
|
||||
00000030 db cc 1c 5d 21 60 e7 40 25 13 e2 e4 48 4a 65 ff |...]!`.@%...HJe.|
|
||||
00000040 bd 11 84 2f dd 45 09 ea 6f ae 15 03 01 00 20 94 |.../.E..o..... .|
|
||||
00000050 2a 18 8a b0 34 d2 ca 69 65 ac ae 3b 8b e5 3a cd |*...4..ie..;..:.|
|
||||
00000060 99 94 ef bb b4 31 b4 7e d7 81 a3 03 52 3b 25 |.....1.~....R;%|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue