mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 12:37:35 +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
104
testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA
vendored
104
testdata/Client-TLSv12-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 03 00 59 02 00 00 55 03 03 e1 64 a4 cd 65 |....Y...U...d..e|
|
||||
00000010 5a 19 5f 07 68 cb af f2 74 76 a2 99 18 e4 9e 00 |Z._.h...tv......|
|
||||
00000020 6a 72 6b 84 dd 1c ec cd 64 45 34 20 96 c3 54 88 |jrk.....dE4 ..T.|
|
||||
00000030 00 ec aa 32 95 2c ad 08 47 64 fd 2e d4 1f 8e 5e |...2.,..Gd.....^|
|
||||
00000040 ec 39 aa ba 6a 3c 8c c7 a6 63 55 8e c0 09 00 00 |.9..j<...cU.....|
|
||||
00000000 16 03 03 00 59 02 00 00 55 03 03 6f 2d af 69 fa |....Y...U..o-.i.|
|
||||
00000010 96 5a 48 db 6f b1 3e 33 02 be 0a 40 f8 f3 9d 65 |.ZH.o.>3...@...e|
|
||||
00000020 98 04 63 87 ce c9 da 8c c8 40 fd 20 cc 2b 8c 8f |..c......@. .+..|
|
||||
00000030 79 d3 b3 6e b9 8e a6 a3 e1 3b 35 f8 91 63 57 90 |y..n.....;5..cW.|
|
||||
00000040 21 70 93 9e 17 98 a5 7b 18 37 2f 8e c0 09 00 00 |!p.....{.7/.....|
|
||||
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
|
||||
00000060 03 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,24 +48,23 @@
|
|||
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 03 00 d8 0c 00 00 d4 03 00 17 41 04 bb |*............A..|
|
||||
00000280 6d 5c 62 98 a7 6c bd f1 9b 4b 09 16 31 59 6a 51 |m\b..l...K..1YjQ|
|
||||
00000290 83 c8 9f 75 9c f8 09 b0 ee 39 01 e3 7a 25 9d 66 |...u.....9..z%.f|
|
||||
000002a0 fe 14 14 15 45 1b 51 a4 47 fe 1e 58 01 28 96 13 |....E.Q.G..X.(..|
|
||||
000002b0 2a 0e 0b 40 b2 22 db 2f e6 f4 88 0a 58 92 10 04 |*..@."./....X...|
|
||||
000002c0 03 00 8b 30 81 88 02 42 01 13 f5 38 52 04 f7 3b |...0...B...8R..;|
|
||||
000002d0 55 96 ef 39 77 be 4f 85 07 18 e9 47 49 b4 bb 57 |U..9w.O....GI..W|
|
||||
000002e0 c9 c0 93 2e 9e b2 5e 3f 14 ce 43 f0 93 b5 a4 66 |......^?..C....f|
|
||||
000002f0 8c fe 3a 06 fc a7 bb 9d 87 46 b8 20 1f 0a 31 c6 |..:......F. ..1.|
|
||||
00000300 80 b0 2d fa e5 06 5f 78 b2 da 02 42 01 c0 bd 12 |..-..._x...B....|
|
||||
00000310 5b ec 79 dd bf a4 54 f1 3b a8 b8 9a 50 ac a9 7c |[.y...T.;...P..||
|
||||
00000320 d2 a6 b5 dd 84 ee dd eb 3e c7 52 1c 65 ac 1e 37 |........>.R.e..7|
|
||||
00000330 4f a8 87 fa 05 8a a4 69 c9 59 53 65 ee 8e 4c 1b |O......i.YSe..L.|
|
||||
00000340 6c d0 88 b8 65 de 85 f8 fe f9 27 96 b8 c0 16 03 |l...e.....'.....|
|
||||
00000350 03 00 2e 0d 00 00 26 03 01 02 40 00 1e 06 01 06 |......&...@.....|
|
||||
00000360 02 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 |................|
|
||||
00000370 01 03 02 03 03 02 01 02 02 02 03 00 00 0e 00 00 |................|
|
||||
00000380 00 |.|
|
||||
00000270 2a 16 03 03 00 d7 0c 00 00 d3 03 00 17 41 04 ec |*............A..|
|
||||
00000280 19 dd 2a 42 f5 3b 56 da f8 35 65 29 79 02 19 bb |..*B.;V..5e)y...|
|
||||
00000290 82 b4 da 2e b0 58 6b 98 9d d4 03 18 fb 7e dd 25 |.....Xk......~.%|
|
||||
000002a0 e1 ae 6e c4 28 ff 20 5a d6 75 0a 64 4f ad 0a c0 |..n.(. Z.u.dO...|
|
||||
000002b0 40 cd 4a c6 28 0b f0 26 36 ea 7d e4 68 67 ca 04 |@.J.(..&6.}.hg..|
|
||||
000002c0 03 00 8a 30 81 87 02 41 6a 32 0c 87 22 e5 b3 c2 |...0...Aj2.."...|
|
||||
000002d0 38 85 95 8a ce 55 4d 99 8c 2f ef 68 f5 7c 65 3a |8....UM../.h.|e:|
|
||||
000002e0 5a 1a 52 12 02 af b5 7a 22 0e 0a 6a ad 6d 81 21 |Z.R....z"..j.m.!|
|
||||
000002f0 21 39 d1 4e f0 cc d9 8b 11 b6 44 46 75 17 58 71 |!9.N......DFu.Xq|
|
||||
00000300 de 86 2d ae f7 34 a3 2d b3 02 42 00 fb ff 3b 91 |..-..4.-..B...;.|
|
||||
00000310 dd 84 ba 74 c6 f6 43 97 de a3 70 10 00 1e 18 29 |...t..C...p....)|
|
||||
00000320 3f 99 a8 cc 22 d9 9f d7 e6 d7 19 16 19 68 52 f8 |?..."........hR.|
|
||||
00000330 3a 55 b7 5b 4b fa a6 f2 4f f7 ce 0e 1e 86 a1 b7 |:U.[K...O.......|
|
||||
00000340 e0 c1 6e bd 2b 16 20 4e 6b a5 e7 20 14 16 03 03 |..n.+. Nk.. ....|
|
||||
00000350 00 2e 0d 00 00 26 03 01 02 40 00 1e 06 01 06 02 |.....&...@......|
|
||||
00000360 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 01 |................|
|
||||
00000370 03 02 03 03 02 01 02 02 02 03 00 00 0e 00 00 00 |................|
|
||||
>>> Flow 3 (client to server)
|
||||
00000000 16 03 03 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|
|
||||
|
@ -103,32 +103,32 @@
|
|||
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 03 00 93 0f |.h.A.Vk.Z.......|
|
||||
00000260 00 00 8f 04 03 00 8b 30 81 88 02 42 00 e9 db 80 |.......0...B....|
|
||||
00000270 e2 67 5d 00 21 88 67 99 7f df de 90 77 86 1e b7 |.g].!.g.....w...|
|
||||
00000280 28 b1 2d 08 8d 02 de 9a 29 2b ca b9 9c 48 ad bd |(.-.....)+...H..|
|
||||
00000290 58 16 68 ad a3 0f 08 4c 01 52 e7 54 97 7c 06 0a |X.h....L.R.T.|..|
|
||||
000002a0 9e c8 97 61 e6 a9 53 62 fb b1 e3 b1 d7 03 02 42 |...a..Sb.......B|
|
||||
000002b0 01 f3 99 af dc e6 69 af 1d fb d5 d0 63 bd d1 17 |......i.....c...|
|
||||
000002c0 d2 ca a5 10 97 1a 94 93 df c4 94 27 53 77 1a 9e |...........'Sw..|
|
||||
000002d0 9b a5 e6 dd 0d cf 49 46 4c 5b 83 a4 52 f2 8b d6 |......IFL[..R...|
|
||||
000002e0 b2 5f 40 e5 c3 d6 7f a2 2c 50 4d 4c 81 54 80 5b |._@.....,PML.T.[|
|
||||
000002f0 72 c7 14 03 03 00 01 01 16 03 03 00 40 00 00 00 |r...........@...|
|
||||
00000300 00 00 00 00 00 00 00 00 00 00 00 00 00 96 9f 5a |...............Z|
|
||||
00000310 9c e3 d0 6c 5f 11 c4 cf e4 34 1a 54 7e dc ec 1d |...l_....4.T~...|
|
||||
00000320 cd 08 eb 5c b4 32 1b d0 e5 12 1f 7a e7 86 16 56 |...\.2.....z...V|
|
||||
00000330 a7 10 20 e1 59 31 65 63 12 7d 45 2d 2a |.. .Y1ec.}E-*|
|
||||
00000250 b5 68 1a 41 03 56 6b dc 5a 89 16 03 03 00 91 0f |.h.A.Vk.Z.......|
|
||||
00000260 00 00 8d 04 03 00 89 30 81 86 02 41 2e 15 7c e7 |.......0...A..|.|
|
||||
00000270 f3 7c 50 ee d1 d9 3c 7a 12 e2 e0 94 9c 2a cf 7b |.|P...<z.....*.{|
|
||||
00000280 d3 4a 1e d1 5a 4a be 62 da d2 88 a2 36 04 51 67 |.J..ZJ.b....6.Qg|
|
||||
00000290 88 61 2d ee 87 f8 9b d0 cb b8 a6 80 55 0c 61 45 |.a-.........U.aE|
|
||||
000002a0 6c 2a f8 01 cb 38 7a 09 e1 0a 52 0f 7a 02 41 3f |l*...8z...R.z.A?|
|
||||
000002b0 ae 8e 30 b9 2e c2 47 54 e4 4c bd e9 c0 c1 3d 10 |..0...GT.L....=.|
|
||||
000002c0 4b 95 32 ca 0d 3e 83 f6 9c 64 db 37 21 17 b4 9a |K.2..>...d.7!...|
|
||||
000002d0 34 09 2a ba 2f 80 cf c1 dd 3f 2f 50 02 bf ce a8 |4.*./....?/P....|
|
||||
000002e0 e5 f6 cc 61 76 58 4d d1 1d 26 e1 82 66 69 ef 55 |...avXM..&..fi.U|
|
||||
000002f0 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....|
|
||||
00000300 00 00 00 00 00 00 00 00 00 00 00 4c 18 de 1b ca |...........L....|
|
||||
00000310 a6 e5 8b a1 69 0f 39 f5 85 61 e5 b9 44 12 03 76 |....i.9..a..D..v|
|
||||
00000320 fc 9b 73 b7 53 1c 1c 82 84 28 98 7e 8e 1f c2 1b |..s.S....(.~....|
|
||||
00000330 d1 e3 aa 19 33 f6 3c 69 3b 66 c0 |....3.<i;f.|
|
||||
>>> Flow 4 (server to client)
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 54 bd b1 39 e6 |..........@T..9.|
|
||||
00000010 a7 d0 76 5e 7e 91 0d 81 d1 c6 82 05 79 90 24 fc |..v^~.......y.$.|
|
||||
00000020 26 b7 ec e6 b8 72 05 59 bd 00 99 f7 dd f4 44 1e |&....r.Y......D.|
|
||||
00000030 79 4d 6d a1 22 4a e3 2c 41 05 ec 5a f7 32 17 ff |yMm."J.,A..Z.2..|
|
||||
00000040 d3 1b ee 21 71 98 99 b7 85 34 b3 |...!q....4.|
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 b8 46 3c e2 4c |..........@.F<.L|
|
||||
00000010 63 30 a7 77 0f 9e 0a 89 0b 47 62 a6 6b e2 75 48 |c0.w.....Gb.k.uH|
|
||||
00000020 7f df a7 f0 19 9e 79 ed df fb be 19 f3 11 29 e9 |......y.......).|
|
||||
00000030 db 32 05 1c 7d a6 09 c6 d3 7b 53 76 6b 4a b7 80 |.2..}....{SvkJ..|
|
||||
00000040 03 33 7d 13 fb 17 51 e1 ca 8a 2e |.3}...Q....|
|
||||
>>> Flow 5 (client to server)
|
||||
00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
|
||||
00000010 00 00 00 00 00 b9 81 3f 48 14 95 9b 39 85 2a 9e |.......?H...9.*.|
|
||||
00000020 44 ec bb cf c2 29 a9 44 f7 8a 6b 3f 92 13 dd 0e |D....).D..k?....|
|
||||
00000030 c6 6b a1 51 79 15 03 03 00 30 00 00 00 00 00 00 |.k.Qy....0......|
|
||||
00000040 00 00 00 00 00 00 00 00 00 00 1c 93 91 23 12 11 |.............#..|
|
||||
00000050 cc 30 fb 22 9e 23 b7 60 8a 3d 4c e6 52 2b 3e 6b |.0.".#.`.=L.R+>k|
|
||||
00000060 8e 47 91 b1 68 50 07 8a d1 6f |.G..hP...o|
|
||||
00000010 00 00 00 00 00 1b 3b d7 04 0d 4b 39 bd 4f 92 e4 |......;...K9.O..|
|
||||
00000020 1a c4 bc c8 5a 71 f7 5b 1d 23 55 fb 6e 96 58 09 |....Zq.[.#U.n.X.|
|
||||
00000030 d2 eb 03 86 dd 15 03 03 00 30 00 00 00 00 00 00 |.........0......|
|
||||
00000040 00 00 00 00 00 00 00 00 00 00 f1 99 7b 4c 35 1c |............{L5.|
|
||||
00000050 4b 2d c4 24 d8 1e 7f c9 23 00 ac 18 53 23 82 3f |K-.$....#...S#.?|
|
||||
00000060 0a d8 4d f3 04 7a 6f 2f 89 2c |..M..zo/.,|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue