upstream: github.com/mirleft/ocaml-tls
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-tls: remove deleted tests/ directory and reorganize fuzz test

- Remove old tests/ directory (replaced by test/ with proper structure)
- Move fuzz.ml to eio/tests/fuzz/ subdirectory with its own dune file
- Update eio/tests/dune to remove fuzz stanza (now in subdirectory)
- Add test_helpers dependency to fuzz test (provides Mock_rng, Mock_socket)
- Fix merlint e617 pattern matching for newer OCaml AST (Pconst_string)

+21 -17215
-19
eio/tests/dune
··· 14 14 (package tls-eio) 15 15 (package crypto-rng) 16 16 (package eio_main))) 17 - 18 - ; "dune runtest" just does a quick run with random inputs. 19 - ; 20 - ; To run with afl-fuzz instead (make sure you have a compiler with the afl option on!): 21 - ; 22 - ; dune runtest 23 - ; mkdir input 24 - ; echo hi > input/foo 25 - ; cp certificates/server.{key,pem} . 26 - ; afl-fuzz -m 1000 -i input -o output ./_build/default/eio/tests/fuzz.exe @@ 27 - 28 - (test 29 - (package tls-eio) 30 - (libraries crowbar tls-eio eio.mock logs logs.fmt crypto-rng test_helpers) 31 - (modules fuzz) 32 - (deps server.pem server.key) 33 - (name fuzz) 34 - (action 35 - (run %{test} --repeat 200)))
eio/tests/fuzz.ml eio/tests/fuzz/fuzz.ml
+21
eio/tests/fuzz/dune
··· 1 + ; "dune runtest" just does a quick run with random inputs. 2 + ; 3 + ; To run with afl-fuzz instead (make sure you have a compiler with the afl option on!): 4 + ; 5 + ; dune runtest 6 + ; mkdir input 7 + ; echo hi > input/foo 8 + ; cp certificates/server.{key,pem} . 9 + ; afl-fuzz -m 1000 -i input -o output ./_build/default/eio/tests/fuzz.exe @@ 10 + 11 + (copy_files ../../../certificates/*.key) 12 + 13 + (copy_files ../../../certificates/*.pem) 14 + 15 + (test 16 + (package tls-eio) 17 + (libraries crowbar tls-eio eio.mock logs logs.fmt crypto-rng test_helpers) 18 + (deps server.pem server.key) 19 + (name fuzz) 20 + (action 21 + (run %{test} --repeat 200)))
-6
tests/dh.pem
··· 1 - -----BEGIN DH PARAMETERS----- 2 - MIGHAoGBAPmqFdDJzIT7OkV3ilTUbNK/vi8uosLWRg6BPoS3JdyUYchJgrXTX1wn 3 - YDOMD64s+5mONvFY4qOMBvdHgWYsppunnZT4UN18QkZeLuWslu12RiDUbI7HY5vY 4 - 0NX2NvKfBXVp0lChvM1v9s7N14ID3t7cXlfwu3IaAcs3jgc2ZR9TAgEC 5 - -----END DH PARAMETERS----- 6 -
-35
tests/dune
··· 1 - (library 2 - (name testlib) 3 - (modules testlib) 4 - (libraries tls alcotest crypto-rng.unix ohex domain-name) 5 - (optional)) 6 - 7 - (test 8 - (name test) 9 - (package tls) 10 - (modules 11 - test 12 - unittests 13 - readertests 14 - readerwritertests 15 - writertests 16 - key_derivation) 17 - (libraries 18 - tls 19 - testlib 20 - crypto-rng.unix 21 - alcotest 22 - ohex 23 - digestif 24 - kdf.hkdf 25 - crypto 26 - crypto-ec 27 - crypto-pk 28 - x509 29 - logs.fmt 30 - fmt.tty)) 31 - 32 - (executable 33 - (name feedback) 34 - (modules feedback) 35 - (libraries tls x509 testlib cmdliner fmt.cli logs.fmt fmt.tty logs.cli))
-121
tests/feedback.ml
··· 1 - module Flow = struct 2 - let rewrap_st = function `S _, st -> `S st | `C _, st -> `C st 3 - let unwrap_st = function `S st -> st | `C st -> st 4 - 5 - let can_handle_appdata st = 6 - not (Tls.Engine.handshake_in_progress (unwrap_st st)) 7 - 8 - let send_application_data state data = 9 - match Tls.Engine.send_application_data (unwrap_st state) data with 10 - | None -> None 11 - | Some (st', cs) -> Some (rewrap_st (state, st'), cs) 12 - 13 - let handle_tls ~tag state msg = 14 - let st, descr = 15 - match state with `S st -> (st, "server") | `C st -> (st, "client") 16 - in 17 - match msg with 18 - | None -> (state, None, None) 19 - | Some msg -> ( 20 - match Tls.Engine.handle_tls st msg with 21 - | Ok (_, Some `Eof, _, _) -> failwith "received eof" 22 - | Ok (st', _eof, `Response (Some ans), `Data appdata) -> 23 - (rewrap_st (state, st'), Some ans, appdata) 24 - | Ok (st', _eof, `Response None, `Data appdata) -> 25 - (rewrap_st (state, st'), None, appdata) 26 - | Error (a, _) -> 27 - failwith 28 - @@ Printf.sprintf "[%s] %s error: %s" tag descr 29 - (Tls.Engine.string_of_failure a)) 30 - end 31 - 32 - let loop_chatter ~certificate ~loops ~size = 33 - Printf.eprintf "Looping %d times, %d bytes.\n%!" loops size; 34 - 35 - let message = Crypto_rng.generate size 36 - and server = 37 - Tls.( 38 - Engine.server 39 - (Result.get_ok (Config.server ~certificates:(`Single certificate) ()))) 40 - and client, init = 41 - let authenticator ?ip:_ ~host:_ _ = Ok None in 42 - Tls.(Engine.client @@ Result.get_ok (Config.client ~authenticator ())) 43 - in 44 - Testlib.time @@ fun () -> 45 - let rec handshake srv cli cli_msg = 46 - let tag = "handshake" in 47 - let srv, ans, _ = Flow.handle_tls ~tag srv cli_msg in 48 - let cli, ans, _ = Flow.handle_tls ~tag cli ans in 49 - if Flow.can_handle_appdata cli && Flow.can_handle_appdata srv then (srv, cli) 50 - else handshake srv cli ans 51 - and chat srv cli data = function 52 - | 0 -> data 53 - | n -> 54 - let tag = "chat" in 55 - let simplex sender recv data = 56 - match Flow.send_application_data sender [ data ] with 57 - | None -> failwith @@ "can't send" 58 - | Some (sender', msg) -> ( 59 - match Flow.handle_tls ~tag recv (Some msg) with 60 - | recv', _, Some data' -> (sender', recv', data') 61 - | _, _, None -> failwith "expected data") 62 - in 63 - let cli, srv, data1 = simplex cli srv data in 64 - let srv, cli, data2 = simplex srv cli data1 in 65 - chat srv cli data2 (pred n) 66 - in 67 - let srv, cli = handshake (`S server) (`C client) (Some init) in 68 - let message' = chat srv cli message loops in 69 - if String.equal message message' then Ok () 70 - else Error "the message got corrupted :(" 71 - 72 - let string_of_file file = 73 - try 74 - let fh = open_in file in 75 - let content = really_input_string fh (in_channel_length fh) in 76 - close_in_noerr fh; 77 - content 78 - with _ -> invalid_arg "Error reading file" 79 - 80 - let load_priv () = 81 - let cert, key = 82 - if Sys.file_exists "./certificates/server.pem" then 83 - ("./certificates/server.pem", "./certificates/server.key") 84 - else ("server.pem", "server.key") 85 - in 86 - let cs1 = string_of_file cert and cs2 = string_of_file key in 87 - match 88 - (X509.Certificate.decode_pem_multiple cs1, X509.Private_key.decode_pem cs2) 89 - with 90 - | Ok certs, Ok key -> (certs, key) 91 - | Error (`Msg m), _ -> failwith ("can't parse certificates " ^ m) 92 - | _, Error (`Msg m) -> failwith ("can't parse private key " ^ m) 93 - 94 - let jump () loops size = 95 - let certificate = load_priv () in 96 - loop_chatter ~certificate ~loops ~size 97 - 98 - let setup_log style_renderer level = 99 - Fmt_tty.setup_std_outputs ?style_renderer (); 100 - Logs.set_level level; 101 - Logs.set_reporter (Logs_fmt.reporter ~dst:Format.std_formatter ()) 102 - 103 - open Cmdliner 104 - 105 - let setup_log = 106 - Term.(const setup_log $ Fmt_cli.style_renderer () $ Logs_cli.level ()) 107 - 108 - let loops = 109 - let doc = "Number of loops to take" in 110 - Arg.(value & opt int 10 & info ~docv:"LOOPS" ~doc [ "loops" ]) 111 - 112 - let size = 113 - let doc = "Bytes to exchange" in 114 - Arg.(value & opt int 1024 & info ~docv:"SIZE" ~doc [ "size" ]) 115 - 116 - let cmd = 117 - let term = Term.(const jump $ setup_log $ loops $ size) 118 - and info = Cmd.info "feedback" ~version:"%%VERSION_NUM%%" in 119 - Cmd.v info term 120 - 121 - let () = exit (Cmd.eval_result cmd)
-89
tests/interop-mbedtls-client2.sh
··· 1 - #!/bin/sh 2 - 3 - port=4455 4 - polarssl="/opt/bin/mbedtls_ssl_client2 auth_mode=none server_port=" 5 - 6 - extra_args="" 7 - statfile="/tmp/test_server.status" 8 - 9 - testit () { 10 - /bin/sh -c "cd .. && ./_build/default/lwt/examples/test_server.exe $port > /dev/null && echo foo > $statfile" & 11 - 12 - sleep 0.3 13 - 14 - $polarssl$port $extra_args 2> /dev/null > /dev/null 15 - 16 - sleep 0.3 17 - 18 - if [ -e $statfile ]; then 19 - result=$(cat $statfile) 20 - if [ $result = "foo" ]; then 21 - echo "success with $extra_args" 22 - else 23 - echo "failure with $polarssl$port $extra_args (statfile there)" 24 - exit 1 25 - fi 26 - rm $statfile 27 - else 28 - echo "failure with $polarssl$port $extra_args" 29 - exit 1 30 - fi 31 - sleep 0.3 32 - port=$(expr $port + 1) 33 - } 34 - 35 - testit 36 - 37 - extra_args="force_version=tls1" 38 - testit 39 - 40 - extra_args="force_version=tls1_1" 41 - testit 42 - 43 - extra_args="force_version=tls1_2" 44 - testit 45 - 46 - ciphers=" 47 - TLS-DHE-RSA-WITH-AES-256-CBC-SHA 48 - TLS-DHE-RSA-WITH-AES-128-CBC-SHA 49 - TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA 50 - TLS-RSA-WITH-AES-256-CBC-SHA 51 - TLS-RSA-WITH-AES-128-CBC-SHA 52 - TLS-RSA-WITH-3DES-EDE-CBC-SHA 53 - TLS-RSA-WITH-RC4-128-SHA 54 - TLS-RSA-WITH-RC4-128-MD5" 55 - 56 - for i in $ciphers; do 57 - extra_args="force_ciphersuite=$i" 58 - testit 59 - 60 - extra_args="force_version=tls1 force_ciphersuite=$i" 61 - testit 62 - 63 - extra_args="force_version=tls1_1 force_ciphersuite=$i" 64 - testit 65 - 66 - extra_args="force_version=tls1_2 force_ciphersuite=$i" 67 - testit 68 - done 69 - 70 - tls12_ciphers=" 71 - TLS-DHE-RSA-WITH-AES-256-CCM 72 - TLS-DHE-RSA-WITH-AES-128-CCM 73 - TLS-DHE-RSA-WITH-AES-256-CBC-SHA256 74 - TLS-DHE-RSA-WITH-AES-128-CBC-SHA256 75 - TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 76 - TLS-DHE-RSA-WITH-AES-128-GCM-SHA256 77 - TLS-RSA-WITH-AES-256-CCM 78 - TLS-RSA-WITH-AES-128-CCM 79 - TLS-RSA-WITH-AES-256-CBC-SHA256 80 - TLS-RSA-WITH-AES-128-CBC-SHA256 81 - TLS-RSA-WITH-AES-256-GCM-SHA384 82 - TLS-RSA-WITH-AES-128-GCM-SHA256" 83 - for i in $tls12_ciphers; do 84 - extra_args="force_ciphersuite=$i" 85 - testit 86 - 87 - extra_args="force_version=tls1_2 force_ciphersuite=$i" 88 - testit 89 - done
-82
tests/interop-openssl-sclient.sh
··· 1 - #!/bin/sh 2 - 3 - port=4455 4 - s_client_args="s_client -quiet -connect 127.0.0.1:" 5 - 6 - extra_args="" 7 - statfile="/tmp/test_server.status" 8 - 9 - testit () { 10 - /bin/sh -c "cd ../ && ./_build/default/lwt/examples/test_server.exe $port > /dev/null && echo foo > $statfile" & 11 - 12 - sleep 0.3 13 - 14 - echo "GET /" | openssl $s_client_args$port $extra_args 2> /dev/null > /dev/null 15 - 16 - sleep 0.3 17 - 18 - if [ -e $statfile ]; then 19 - result=$(cat $statfile) 20 - if [ $result = "foo" ]; then 21 - echo "success with $extra_args" 22 - else 23 - echo "failure with openssl $s_client_args $extra_args (statfile there)" 24 - exit 1 25 - fi 26 - rm $statfile 27 - else 28 - echo "failure with openssl $s_client_args$port $extra_args (no statfile)" 29 - exit 1 30 - fi 31 - sleep 0.3 32 - port=$(expr $port + 1) 33 - } 34 - 35 - testit 36 - 37 - extra_args="-tls1" 38 - testit 39 - 40 - extra_args="-tls1_1" 41 - testit 42 - 43 - extra_args="-tls1_2" 44 - testit 45 - 46 - extra_args="-tls1_3" 47 - testit 48 - 49 - ciphers="DHE-RSA-AES256-SHA AES256-SHA DHE-RSA-AES128-SHA AES128-SHA ECDHE-RSA-AES256-SHA ECDHE-RSA-AES128-SHA ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-AES256-SHA" 50 - #OpenSSL <1.1.1: 51 - #EDH-RSA-DES-CBC3-SHA DES-CBC3-SHA 52 - for i in $ciphers; do 53 - extra_args="-cipher $i" 54 - testit 55 - 56 - extra_args="-tls1 -cipher $i" 57 - testit 58 - 59 - extra_args="-tls1_1 -cipher $i" 60 - testit 61 - 62 - extra_args="-tls1_2 -cipher $i" 63 - testit 64 - done 65 - 66 - tls12_ciphers="DHE-RSA-AES256-SHA256 AES256-SHA256 DHE-RSA-AES128-SHA256 AES128-SHA256 AES128-GCM-SHA256 DHE-RSA-AES128-GCM-SHA256 AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-CHACHA20-POLY1305 DHE-RSA-CHACHA20-POLY1305 ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-CHACHA20-POLY1305" 67 - for i in $tls12_ciphers; do 68 - extra_args="-cipher $i" 69 - testit 70 - 71 - extra_args="-tls1_2 -cipher $i" 72 - testit 73 - done 74 - 75 - tls13_ciphers="TLS_AES_256_GCM_SHA384 TLS_AES_128_GCM_SHA256 TLS_CHACHA20_POLY1305_SHA256" 76 - for i in $tls13_ciphers; do 77 - extra_args="-ciphersuites $i" 78 - testit 79 - 80 - extra_args="-tls1_3 -ciphersuites $i" 81 - testit 82 - done
-124
tests/interop-openssl-sserver.sh
··· 1 - #!/bin/sh 2 - 3 - s_server_args="s_server -quiet -key ../certificates/server.key -cert ../certificates/server.pem -www -dhparam dh.pem " 4 - 5 - pidfile='/tmp/openssl.pid' 6 - 7 - extra_args="" 8 - 9 - testit () { 10 - /bin/sh -c "echo \$\$ > $pidfile && exec openssl $s_server_args $extra_args" & 11 - 12 - sleep 0.3 13 - 14 - ../_build/default/lwt/examples/test_client.exe > /dev/null 15 - 16 - if [ $? -eq 0 ]; then 17 - echo "success with $extra_args" 18 - else 19 - echo "failure with openssl $s_server_args $extra_args" 20 - exit 1 21 - fi 22 - cat $pidfile | xargs kill 23 - rm $pidfile 24 - sleep 0.5 25 - } 26 - 27 - testit 28 - 29 - extra_args="-tls1" 30 - testit 31 - 32 - extra_args="-tls1_1" 33 - testit 34 - 35 - extra_args="-tls1_2" 36 - testit 37 - 38 - extra_args="-tls1_3" 39 - testit 40 - 41 - ciphers="DHE-RSA-AES256-SHA AES256-SHA DHE-RSA-AES128-SHA AES128-SHA ECDHE-RSA-AES256-SHA ECDHE-RSA-AES128-SHA" 42 - #OpenSSL <1.1.1: 43 - #EDH-RSA-DES-CBC3-SHA DES-CBC3-SHA 44 - for i in $ciphers; do 45 - extra_args="-cipher $i" 46 - testit 47 - 48 - extra_args="-tls1 -cipher $i" 49 - testit 50 - 51 - extra_args="-tls1_1 -cipher $i" 52 - testit 53 - 54 - extra_args="-tls1_2 -cipher $i" 55 - testit 56 - done 57 - 58 - tls12_ciphers="DHE-RSA-AES256-SHA256 AES256-SHA256 DHE-RSA-AES128-SHA256 AES128-SHA256 AES128-GCM-SHA256 DHE-RSA-AES128-GCM-SHA256 AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-CHACHA20-POLY1305 DHE-RSA-CHACHA20-POLY1305" 59 - for i in $tls12_ciphers; do 60 - extra_args="-cipher $i" 61 - testit 62 - 63 - extra_args="-tls1_2 -cipher $i" 64 - testit 65 - done 66 - 67 - tls13_ciphers="TLS_AES_256_GCM_SHA384 TLS_AES_128_GCM_SHA256 TLS_CHACHA20_POLY1305_SHA256" 68 - for i in $tls13_ciphers; do 69 - extra_args="-ciphersuites $i" 70 - testit 71 - 72 - extra_args="-tls1_3 -ciphersuites $i" 73 - testit 74 - done 75 - 76 - s_server_args="s_server -quiet -key ../certificates/server-ec.key -cert ../certificates/server-ec.pem -www -dhparam dh.pem " 77 - ec_ciphers="ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-AES256-SHA" 78 - ec_ciphers12="ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-CHACHA20-POLY1305" 79 - 80 - extra_args="" 81 - testit 82 - 83 - extra_args="-tls1" 84 - testit 85 - 86 - extra_args="-tls1_1" 87 - testit 88 - 89 - extra_args="-tls1_2" 90 - testit 91 - 92 - extra_args="-tls1_3" 93 - testit 94 - 95 - for i in $ec_ciphers; do 96 - extra_args="-cipher $i" 97 - testit 98 - 99 - extra_args="-tls1 -cipher $i" 100 - testit 101 - 102 - extra_args="-tls1_1 -cipher $i" 103 - testit 104 - 105 - extra_args="-tls1_2 -cipher $i" 106 - testit 107 - done 108 - 109 - for i in $ec_ciphers12; do 110 - extra_args="-cipher $i" 111 - testit 112 - 113 - extra_args="-tls1_2 -cipher $i" 114 - testit 115 - done 116 - 117 - tls13_ciphers="TLS_AES_256_GCM_SHA384 TLS_AES_128_GCM_SHA256 TLS_CHACHA20_POLY1305_SHA256" 118 - for i in $tls13_ciphers; do 119 - extra_args="-ciphersuites $i" 120 - testit 121 - 122 - extra_args="-tls1_3 -ciphersuites $i" 123 - testit 124 - done
-834
tests/key_derivation.ml
··· 1 - (* key derivation example trace taken from draft-ietf-tls-tls13-vectors-07 *) 2 - let cs = 3 - let module M = struct 4 - type t = string 5 - 6 - let pp = Ohex.pp_hexdump () 7 - let equal = String.equal 8 - end in 9 - (module M : Alcotest.TESTABLE with type t = M.t) 10 - 11 - let secret0 = 12 - Ohex.decode 13 - {| 14 - 33 ad 0a 1c 60 7e c0 3b 09 e6 cd 98 93 68 0c e2 15 - 10 ad f3 00 aa 1f 26 60 e1 b2 2e 10 f1 70 f9 2a 16 - |} 17 - 18 - let cipher = `AES_128_GCM_SHA256 19 - let hash = Tls.Ciphersuite.hash13 cipher 20 - let my_secret = ref None 21 - 22 - let extract_secret_early () = 23 - (* draft-ietf-tls-tls13-vectors-07 Sec 3*) 24 - let salt = "" and ikm = String.make 32 '\x00' in 25 - Alcotest.check cs __LOC__ secret0 (Hkdf.extract ~hash ~salt ikm); 26 - let t = Tls.Handshake_crypto13.(derive (empty cipher) ikm) in 27 - my_secret := Some t; 28 - Alcotest.check cs __LOC__ secret0 t.secret 29 - 30 - let expand0 = 31 - Ohex.decode 32 - {| 33 - 6f 26 15 a1 08 c7 02 c5 67 8f 54 fc 9d ba b6 97 34 - 16 c0 76 18 9c 48 25 0c eb ea c3 57 6c 36 11 ba 35 - |} 36 - 37 - let derive_hs_secret () = 38 - let module H = (val Digestif.module_of_hash' hash) in 39 - let hash_val = H.(to_raw_string (digest_string "")) in 40 - Alcotest.check cs __LOC__ expand0 41 - (Tls.Handshake_crypto13.derive_secret_no_hash hash secret0 ~ctx:hash_val 42 - "derived") 43 - 44 - let hs_secret = 45 - Ohex.decode 46 - {| 47 - 1d c8 26 e9 36 06 aa 6f dc 0a ad c1 2f 74 1b 01 48 - 04 6a a6 b9 9f 69 1e d2 21 a9 f0 ca 04 3f be ac 49 - |} 50 - 51 - (* TODO: ikm should be computed (ECDHE) from the key share in client hello (see 52 - below), and the private key written in the RFC. *) 53 - let ikm = 54 - Ohex.decode 55 - {| 56 - 8b d4 05 4f b5 5b 9d 63 fd fb ac f9 f0 4b 9f 0d 57 - 35 e6 d6 3f 53 75 63 ef d4 62 72 90 0f 89 49 2d 58 - |} 59 - 60 - let extract_handshake () = 61 - Alcotest.check cs __LOC__ hs_secret (Hkdf.extract ~hash ~salt:expand0 ikm); 62 - match !my_secret with 63 - | None -> Alcotest.fail "expected some secret" 64 - | Some t -> 65 - let t' = Tls.Handshake_crypto13.derive t ikm in 66 - my_secret := Some t'; 67 - Alcotest.check cs __LOC__ hs_secret t'.secret 68 - 69 - let ch = 70 - Ohex.decode 71 - {| 72 - 01 00 00 c0 03 03 cb 34 ec b1 e7 81 63 ba 1c 38 73 - c6 da cb 19 6a 6d ff a2 1a 8d 99 12 ec 18 a2 ef 74 - 62 83 02 4d ec e7 00 00 06 13 01 13 03 13 02 01 75 - 00 00 91 00 00 00 0b 00 09 00 00 06 73 65 72 76 76 - 65 72 ff 01 00 01 00 00 0a 00 14 00 12 00 1d 00 77 - 17 00 18 00 19 01 00 01 01 01 02 01 03 01 04 00 78 - 23 00 00 00 33 00 26 00 24 00 1d 00 20 99 38 1d 79 - e5 60 e4 bd 43 d2 3d 8e 43 5a 7d ba fe b3 c0 6e 80 - 51 c1 3c ae 4d 54 13 69 1e 52 9a af 2c 00 2b 00 81 - 03 02 03 04 00 0d 00 20 00 1e 04 03 05 03 06 03 82 - 02 03 08 04 08 05 08 06 04 01 05 01 06 01 02 01 83 - 04 02 05 02 06 02 02 02 00 2d 00 02 01 01 00 1c 84 - 00 02 40 01 85 - |} 86 - 87 - let sh = 88 - Ohex.decode 89 - {| 90 - 02 00 00 56 03 03 a6 af 06 a4 12 18 60 dc 5e 6e 91 - 60 24 9c d3 4c 95 93 0c 8a c5 cb 14 34 da c1 55 92 - 77 2e d3 e2 69 28 00 13 01 00 00 2e 00 33 00 24 93 - 00 1d 00 20 c9 82 88 76 11 20 95 fe 66 76 2b db 94 - f7 c6 72 e1 56 d6 cc 25 3b 83 3d f1 dd 69 b1 b0 95 - 4e 75 1f 0f 00 2b 00 02 03 04 96 - |} 97 - 98 - let c_hs_traffic_secret = 99 - Ohex.decode 100 - {| 101 - b3 ed db 12 6e 06 7f 35 a7 80 b3 ab f4 5e 2d 8f 102 - 3b 1a 95 07 38 f5 2e 96 00 74 6a 0e 27 a5 5a 21 103 - |} 104 - 105 - let read_handshake_key = 106 - Ohex.decode {| 107 - db fa a6 93 d1 76 2c 5b 66 6a f5 d9 50 25 8d 01 108 - |} 109 - 110 - let read_handshake_iv = Ohex.decode {| 111 - 5b d3 c7 1b 83 6e 0b 76 bb 73 26 5f 112 - |} 113 - 114 - let derive_c_hs_traffic () = 115 - let log = ch ^ sh in 116 - let hash_val = 117 - let module H = (val Digestif.module_of_hash' hash) in 118 - H.(to_raw_string (digest_string log)) 119 - in 120 - Alcotest.check cs __LOC__ c_hs_traffic_secret 121 - (Tls.Handshake_crypto13.derive_secret_no_hash hash hs_secret ~ctx:hash_val 122 - "c hs traffic"); 123 - match !my_secret with 124 - | None -> Alcotest.fail "expected my secret" 125 - | Some t -> 126 - let c_hs_traffic = 127 - Tls.Handshake_crypto13.derive_secret t "c hs traffic" log 128 - in 129 - Alcotest.check cs __LOC__ c_hs_traffic_secret c_hs_traffic; 130 - let key, iv = Tls.Handshake_crypto13.traffic_key cipher c_hs_traffic in 131 - Alcotest.check cs __LOC__ read_handshake_key key; 132 - Alcotest.check cs __LOC__ read_handshake_iv iv 133 - 134 - let derive_read_handshake_keys () = 135 - Alcotest.check cs __LOC__ read_handshake_key 136 - (Tls.Handshake_crypto13.derive_secret_no_hash hash c_hs_traffic_secret 137 - ~length:16 "key"); 138 - Alcotest.check cs __LOC__ read_handshake_iv 139 - (Tls.Handshake_crypto13.derive_secret_no_hash hash c_hs_traffic_secret 140 - ~length:12 "iv") 141 - 142 - let s_hs_traffic_secret = 143 - Ohex.decode 144 - {| 145 - b6 7b 7d 69 0c c1 6c 4e 75 e5 42 13 cb 2d 37 b4 146 - e9 c9 12 bc de d9 10 5d 42 be fd 59 d3 91 ad 38 147 - |} 148 - 149 - let write_handshake_key = 150 - Ohex.decode {| 151 - 3f ce 51 60 09 c2 17 27 d0 f2 e4 e8 6e e4 03 bc 152 - |} 153 - 154 - let write_handshake_iv = Ohex.decode {| 155 - 5d 31 3e b2 67 12 76 ee 13 00 0b 30 156 - |} 157 - 158 - let derive_s_hs_traffic () = 159 - let log = ch ^ sh in 160 - let hash_val = 161 - let module H = (val Digestif.module_of_hash' hash) in 162 - H.(to_raw_string (digest_string log)) 163 - in 164 - Alcotest.check cs __LOC__ s_hs_traffic_secret 165 - (Tls.Handshake_crypto13.derive_secret_no_hash hash hs_secret ~ctx:hash_val 166 - "s hs traffic"); 167 - match !my_secret with 168 - | None -> Alcotest.fail "expected my secret" 169 - | Some t -> 170 - let s_hs_traffic = 171 - Tls.Handshake_crypto13.derive_secret t "s hs traffic" log 172 - in 173 - Alcotest.check cs __LOC__ s_hs_traffic_secret s_hs_traffic; 174 - let key, iv = Tls.Handshake_crypto13.traffic_key cipher s_hs_traffic in 175 - Alcotest.check cs __LOC__ write_handshake_key key; 176 - Alcotest.check cs __LOC__ write_handshake_iv iv 177 - 178 - let derive_write_handshake_keys () = 179 - Alcotest.check cs __LOC__ write_handshake_key 180 - (Tls.Handshake_crypto13.derive_secret_no_hash hash s_hs_traffic_secret 181 - ~length:16 "key"); 182 - Alcotest.check cs __LOC__ write_handshake_iv 183 - (Tls.Handshake_crypto13.derive_secret_no_hash hash s_hs_traffic_secret 184 - ~length:12 "iv") 185 - 186 - let finished_expanded = 187 - Ohex.decode 188 - {| 189 - 00 8d 3b 66 f8 16 ea 55 9f 96 b5 37 e8 85 c3 1f 190 - c0 68 bf 49 2c 65 2f 01 f2 88 a1 d8 cd c1 9f c8 191 - |} 192 - 193 - let finished_key = 194 - Ohex.decode 195 - {| 196 - 9b 9b 14 1d 90 63 37 fb d2 cb dc e7 1d f4 de da 197 - 4a b4 2c 30 95 72 cb 7f ff ee 54 54 b7 8f 07 18 198 - |} 199 - 200 - let enc_ext = 201 - Ohex.decode 202 - {| 203 - 08 00 00 24 00 22 00 0a 00 14 00 12 00 1d 00 17 204 - 00 18 00 19 01 00 01 01 01 02 01 03 01 04 00 1c 205 - 00 02 40 01 00 00 00 00 206 - |} 207 - 208 - let cert = 209 - Ohex.decode 210 - {| 211 - 0b 00 01 b9 00 00 01 b5 00 01 b0 30 82 01 ac 30 212 - 82 01 15 a0 03 02 01 02 02 01 02 30 0d 06 09 2a 213 - 86 48 86 f7 0d 01 01 0b 05 00 30 0e 31 0c 30 0a 214 - 06 03 55 04 03 13 03 72 73 61 30 1e 17 0d 31 36 215 - 30 37 33 30 30 31 32 33 35 39 5a 17 0d 32 36 30 216 - 37 33 30 30 31 32 33 35 39 5a 30 0e 31 0c 30 0a 217 - 06 03 55 04 03 13 03 72 73 61 30 81 9f 30 0d 06 218 - 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 81 8d 00 219 - 30 81 89 02 81 81 00 b4 bb 49 8f 82 79 30 3d 98 220 - 08 36 39 9b 36 c6 98 8c 0c 68 de 55 e1 bd b8 26 221 - d3 90 1a 24 61 ea fd 2d e4 9a 91 d0 15 ab bc 9a 222 - 95 13 7a ce 6c 1a f1 9e aa 6a f9 8c 7c ed 43 12 223 - 09 98 e1 87 a8 0e e0 cc b0 52 4b 1b 01 8c 3e 0b 224 - 63 26 4d 44 9a 6d 38 e2 2a 5f da 43 08 46 74 80 225 - 30 53 0e f0 46 1c 8c a9 d9 ef bf ae 8e a6 d1 d0 226 - 3e 2b d1 93 ef f0 ab 9a 80 02 c4 74 28 a6 d3 5a 227 - 8d 88 d7 9f 7f 1e 3f 02 03 01 00 01 a3 1a 30 18 228 - 30 09 06 03 55 1d 13 04 02 30 00 30 0b 06 03 55 229 - 1d 0f 04 04 03 02 05 a0 30 0d 06 09 2a 86 48 86 230 - f7 0d 01 01 0b 05 00 03 81 81 00 85 aa d2 a0 e5 231 - b9 27 6b 90 8c 65 f7 3a 72 67 17 06 18 a5 4c 5f 232 - 8a 7b 33 7d 2d f7 a5 94 36 54 17 f2 ea e8 f8 a5 233 - 8c 8f 81 72 f9 31 9c f3 6b 7f d6 c5 5b 80 f2 1a 234 - 03 01 51 56 72 60 96 fd 33 5e 5e 67 f2 db f1 02 235 - 70 2e 60 8c ca e6 be c1 fc 63 a4 2a 99 be 5c 3e 236 - b7 10 7c 3c 54 e9 b9 eb 2b d5 20 3b 1c 3b 84 e0 237 - a8 b2 f7 59 40 9b a3 ea c9 d9 1d 40 2d cc 0c c8 238 - f8 96 12 29 ac 91 87 b4 2b 4d e1 00 00 239 - |} 240 - 241 - let cert_verify = 242 - Ohex.decode 243 - {| 244 - 0f 00 00 84 08 04 00 80 5a 74 7c 5d 88 fa 9b d2 245 - e5 5a b0 85 a6 10 15 b7 21 1f 82 4c d4 84 14 5a 246 - b3 ff 52 f1 fd a8 47 7b 0b 7a bc 90 db 78 e2 d3 247 - 3a 5c 14 1a 07 86 53 fa 6b ef 78 0c 5e a2 48 ee 248 - aa a7 85 c4 f3 94 ca b6 d3 0b be 8d 48 59 ee 51 249 - 1f 60 29 57 b1 54 11 ac 02 76 71 45 9e 46 44 5c 250 - 9e a5 8c 18 1e 81 8e 95 b8 c3 fb 0b f3 27 84 09 251 - d3 be 15 2a 3d a5 04 3e 06 3d da 65 cd f5 ae a2 252 - 0d 53 df ac d4 2f 74 f3 253 - |} 254 - 255 - let derive_finished () = 256 - let log = String.concat "" [ ch; sh; enc_ext; cert; cert_verify ] in 257 - Alcotest.check cs __LOC__ finished_expanded 258 - (Tls.Handshake_crypto13.derive_secret_no_hash hash s_hs_traffic_secret 259 - "finished"); 260 - let module H = (val Digestif.module_of_hash' hash) in 261 - let hash_val = H.(to_raw_string (digest_string log)) in 262 - Alcotest.check cs __LOC__ finished_key 263 - H.(to_raw_string (hmac_string ~key:finished_expanded hash_val)); 264 - match !my_secret with 265 - | None -> Alcotest.fail "expected some secret" 266 - | Some t -> 267 - let s_hs_traffic = 268 - Tls.Handshake_crypto13.derive_secret t "s hs traffic" (ch ^ sh) 269 - in 270 - Alcotest.check cs __LOC__ s_hs_traffic_secret s_hs_traffic; 271 - Alcotest.check cs __LOC__ finished_key 272 - (Tls.Handshake_crypto13.finished t.hash s_hs_traffic log) 273 - 274 - let finished = 275 - Ohex.decode 276 - {| 277 - 14 00 00 20 9b 9b 14 1d 90 63 37 fb d2 cb dc e7 278 - 1d f4 de da 4a b4 2c 30 95 72 cb 7f ff ee 54 54 279 - b7 8f 07 18 280 - |} 281 - 282 - let master = 283 - Ohex.decode 284 - {| 285 - 43 de 77 e0 c7 77 13 85 9a 94 4d b9 db 25 90 b5 286 - 31 90 a6 5b 3e e2 e4 f1 2d d7 a0 bb 7c e2 54 b4 287 - |} 288 - 289 - let derive_master () = 290 - let module H = (val Digestif.module_of_hash' hash) in 291 - let hash_val = H.(to_raw_string (digest_string "")) in 292 - Alcotest.check cs __LOC__ master 293 - (Tls.Handshake_crypto13.derive_secret_no_hash hash hs_secret ~ctx:hash_val 294 - "derived") 295 - 296 - let master_secret = 297 - Ohex.decode 298 - {| 299 - 18 df 06 84 3d 13 a0 8b f2 a4 49 84 4c 5f 8a 47 300 - 80 01 bc 4d 4c 62 79 84 d5 a4 1d a8 d0 40 29 19 301 - |} 302 - 303 - let extract_master () = 304 - Alcotest.check cs __LOC__ master_secret 305 - (Hkdf.extract ~hash ~salt:master (String.make 32 '\x00')); 306 - match !my_secret with 307 - | None -> Alcotest.fail "expected my secret" 308 - | Some t -> 309 - let t' = Tls.Handshake_crypto13.derive t (String.make 32 '\x00') in 310 - my_secret := Some t'; 311 - Alcotest.check cs __LOC__ master_secret t'.secret 312 - 313 - let c_ap_traffic = 314 - Ohex.decode 315 - {| 316 - 9e 40 64 6c e7 9a 7f 9d c0 5a f8 88 9b ce 65 52 317 - 87 5a fa 0b 06 df 00 87 f7 92 eb b7 c1 75 04 a5 318 - |} 319 - 320 - let s_ap_traffic = 321 - Ohex.decode 322 - {| 323 - a1 1a f9 f0 55 31 f8 56 ad 47 11 6b 45 a9 50 32 324 - 82 04 b4 f4 4b fb 6b 3a 4b 4f 1f 3f cb 63 16 43 325 - |} 326 - 327 - let exp_master = 328 - Ohex.decode 329 - {| 330 - fe 22 f8 81 17 6e da 18 eb 8f 44 52 9e 67 92 c5 331 - 0c 9a 3f 89 45 2f 68 d8 ae 31 1b 43 09 d3 cf 50 332 - |} 333 - 334 - let app_write_key = 335 - Ohex.decode {| 336 - 9f 02 28 3b 6c 9c 07 ef c2 6b b9 f2 ac 92 e3 56 337 - |} 338 - 339 - let app_write_iv = Ohex.decode {| 340 - cf 78 2b 88 dd 83 54 9a ad f1 e9 84 341 - |} 342 - 343 - let app_read_key = 344 - Ohex.decode {| 345 - 17 42 2d da 59 6e d5 d9 ac d8 90 e3 c6 3f 50 51 346 - |} 347 - 348 - let app_read_iv = Ohex.decode {| 349 - 5b 78 92 3d ee 08 57 90 33 e5 23 d9 350 - |} 351 - 352 - let derive_traffic_keys () = 353 - let log = String.concat "" [ ch; sh; enc_ext; cert; cert_verify; finished ] in 354 - let module H = (val Digestif.module_of_hash' hash) in 355 - let hash_val = H.(to_raw_string (digest_string log)) in 356 - Alcotest.check cs __LOC__ c_ap_traffic 357 - (Tls.Handshake_crypto13.derive_secret_no_hash hash master_secret 358 - ~ctx:hash_val "c ap traffic"); 359 - Alcotest.check cs __LOC__ s_ap_traffic 360 - (Tls.Handshake_crypto13.derive_secret_no_hash hash master_secret 361 - ~ctx:hash_val "s ap traffic"); 362 - Alcotest.check cs __LOC__ exp_master 363 - (Tls.Handshake_crypto13.derive_secret_no_hash hash master_secret 364 - ~ctx:hash_val "exp master"); 365 - match !my_secret with 366 - | None -> Alcotest.fail "expected some secret" 367 - | Some t -> 368 - let c_ap_traffic' = 369 - Tls.Handshake_crypto13.derive_secret t "c ap traffic" log 370 - in 371 - Alcotest.check cs __LOC__ c_ap_traffic c_ap_traffic'; 372 - let key, iv = Tls.Handshake_crypto13.traffic_key cipher c_ap_traffic' in 373 - Alcotest.check cs __LOC__ app_read_key key; 374 - Alcotest.check cs __LOC__ app_read_iv iv; 375 - let s_ap_traffic' = 376 - Tls.Handshake_crypto13.derive_secret t "s ap traffic" log 377 - in 378 - Alcotest.check cs __LOC__ s_ap_traffic s_ap_traffic'; 379 - let key, iv = Tls.Handshake_crypto13.traffic_key cipher s_ap_traffic' in 380 - Alcotest.check cs __LOC__ app_write_key key; 381 - Alcotest.check cs __LOC__ app_write_iv iv 382 - 383 - let appdata_write () = 384 - Alcotest.check cs __LOC__ app_write_key 385 - (Tls.Handshake_crypto13.derive_secret_no_hash hash s_ap_traffic ~length:16 386 - "key"); 387 - Alcotest.check cs __LOC__ app_write_iv 388 - (Tls.Handshake_crypto13.derive_secret_no_hash hash s_ap_traffic ~length:12 389 - "iv") 390 - 391 - let appdata_read () = 392 - Alcotest.check cs __LOC__ app_read_key 393 - (Tls.Handshake_crypto13.derive_secret_no_hash hash c_ap_traffic ~length:16 394 - "key"); 395 - Alcotest.check cs __LOC__ app_read_iv 396 - (Tls.Handshake_crypto13.derive_secret_no_hash hash c_ap_traffic ~length:12 397 - "iv") 398 - 399 - let server_payload = 400 - Ohex.decode 401 - {| 402 - 08 00 00 24 00 22 00 0a 00 14 00 12 00 1d 00 17 403 - 00 18 00 19 01 00 01 01 01 02 01 03 01 04 00 1c 404 - 00 02 40 01 00 00 00 00 0b 00 01 b9 00 00 01 b5 405 - 00 01 b0 30 82 01 ac 30 82 01 15 a0 03 02 01 02 406 - 02 01 02 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 407 - 05 00 30 0e 31 0c 30 0a 06 03 55 04 03 13 03 72 408 - 73 61 30 1e 17 0d 31 36 30 37 33 30 30 31 32 33 409 - 35 39 5a 17 0d 32 36 30 37 33 30 30 31 32 33 35 410 - 39 5a 30 0e 31 0c 30 0a 06 03 55 04 03 13 03 72 411 - 73 61 30 81 9f 30 0d 06 09 2a 86 48 86 f7 0d 01 412 - 01 01 05 00 03 81 8d 00 30 81 89 02 81 81 00 b4 413 - bb 49 8f 82 79 30 3d 98 08 36 39 9b 36 c6 98 8c 414 - 0c 68 de 55 e1 bd b8 26 d3 90 1a 24 61 ea fd 2d 415 - e4 9a 91 d0 15 ab bc 9a 95 13 7a ce 6c 1a f1 9e 416 - aa 6a f9 8c 7c ed 43 12 09 98 e1 87 a8 0e e0 cc 417 - b0 52 4b 1b 01 8c 3e 0b 63 26 4d 44 9a 6d 38 e2 418 - 2a 5f da 43 08 46 74 80 30 53 0e f0 46 1c 8c a9 419 - d9 ef bf ae 8e a6 d1 d0 3e 2b d1 93 ef f0 ab 9a 420 - 80 02 c4 74 28 a6 d3 5a 8d 88 d7 9f 7f 1e 3f 02 421 - 03 01 00 01 a3 1a 30 18 30 09 06 03 55 1d 13 04 422 - 02 30 00 30 0b 06 03 55 1d 0f 04 04 03 02 05 a0 423 - 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 424 - 81 81 00 85 aa d2 a0 e5 b9 27 6b 90 8c 65 f7 3a 425 - 72 67 17 06 18 a5 4c 5f 8a 7b 33 7d 2d f7 a5 94 426 - 36 54 17 f2 ea e8 f8 a5 8c 8f 81 72 f9 31 9c f3 427 - 6b 7f d6 c5 5b 80 f2 1a 03 01 51 56 72 60 96 fd 428 - 33 5e 5e 67 f2 db f1 02 70 2e 60 8c ca e6 be c1 429 - fc 63 a4 2a 99 be 5c 3e b7 10 7c 3c 54 e9 b9 eb 430 - 2b d5 20 3b 1c 3b 84 e0 a8 b2 f7 59 40 9b a3 ea 431 - c9 d9 1d 40 2d cc 0c c8 f8 96 12 29 ac 91 87 b4 432 - 2b 4d e1 00 00 0f 00 00 84 08 04 00 80 5a 74 7c 433 - 5d 88 fa 9b d2 e5 5a b0 85 a6 10 15 b7 21 1f 82 434 - 4c d4 84 14 5a b3 ff 52 f1 fd a8 47 7b 0b 7a bc 435 - 90 db 78 e2 d3 3a 5c 14 1a 07 86 53 fa 6b ef 78 436 - 0c 5e a2 48 ee aa a7 85 c4 f3 94 ca b6 d3 0b be 437 - 8d 48 59 ee 51 1f 60 29 57 b1 54 11 ac 02 76 71 438 - 45 9e 46 44 5c 9e a5 8c 18 1e 81 8e 95 b8 c3 fb 439 - 0b f3 27 84 09 d3 be 15 2a 3d a5 04 3e 06 3d da 440 - 65 cd f5 ae a2 0d 53 df ac d4 2f 74 f3 14 00 00 441 - 20 9b 9b 14 1d 90 63 37 fb d2 cb dc e7 1d f4 de 442 - da 4a b4 2c 30 95 72 cb 7f ff ee 54 54 b7 8f 07 443 - 18 444 - |} 445 - 446 - let payload_is_good () = 447 - Alcotest.check cs __LOC__ server_payload 448 - (String.concat "" [ enc_ext; cert; cert_verify; finished ]) 449 - 450 - let server_payload_processed = 451 - Ohex.decode 452 - {| 453 - 17 03 03 02 a2 d1 ff 33 4a 56 f5 bf f6 59 4a 07 454 - cc 87 b5 80 23 3f 50 0f 45 e4 89 e7 f3 3a f3 5e 455 - df 78 69 fc f4 0a a4 0a a2 b8 ea 73 f8 48 a7 ca 456 - 07 61 2e f9 f9 45 cb 96 0b 40 68 90 51 23 ea 78 457 - b1 11 b4 29 ba 91 91 cd 05 d2 a3 89 28 0f 52 61 458 - 34 aa dc 7f c7 8c 4b 72 9d f8 28 b5 ec f7 b1 3b 459 - d9 ae fb 0e 57 f2 71 58 5b 8e a9 bb 35 5c 7c 79 460 - 02 07 16 cf b9 b1 18 3e f3 ab 20 e3 7d 57 a6 b9 461 - d7 47 76 09 ae e6 e1 22 a4 cf 51 42 73 25 25 0c 462 - 7d 0e 50 92 89 44 4c 9b 3a 64 8f 1d 71 03 5d 2e 463 - d6 5b 0e 3c dd 0c ba e8 bf 2d 0b 22 78 12 cb b3 464 - 60 98 72 55 cc 74 41 10 c4 53 ba a4 fc d6 10 92 465 - 8d 80 98 10 e4 b7 ed 1a 8f d9 91 f0 6a a6 24 82 466 - 04 79 7e 36 a6 a7 3b 70 a2 55 9c 09 ea d6 86 94 467 - 5b a2 46 ab 66 e5 ed d8 04 4b 4c 6d e3 fc f2 a8 468 - 94 41 ac 66 27 2f d8 fb 33 0e f8 19 05 79 b3 68 469 - 45 96 c9 60 bd 59 6e ea 52 0a 56 a8 d6 50 f5 63 470 - aa d2 74 09 96 0d ca 63 d3 e6 88 61 1e a5 e2 2f 471 - 44 15 cf 95 38 d5 1a 20 0c 27 03 42 72 96 8a 26 472 - 4e d6 54 0c 84 83 8d 89 f7 2c 24 46 1a ad 6d 26 473 - f5 9e ca ba 9a cb bb 31 7b 66 d9 02 f4 f2 92 a3 474 - 6a c1 b6 39 c6 37 ce 34 31 17 b6 59 62 22 45 31 475 - 7b 49 ee da 0c 62 58 f1 00 d7 d9 61 ff b1 38 64 476 - 7e 92 ea 33 0f ae ea 6d fa 31 c7 a8 4d c3 bd 7e 477 - 1b 7a 6c 71 78 af 36 87 90 18 e3 f2 52 10 7f 24 478 - 3d 24 3d c7 33 9d 56 84 c8 b0 37 8b f3 02 44 da 479 - 8c 87 c8 43 f5 e5 6e b4 c5 e8 28 0a 2b 48 05 2c 480 - f9 3b 16 49 9a 66 db 7c ca 71 e4 59 94 26 f7 d4 481 - 61 e6 6f 99 88 2b d8 9f c5 08 00 be cc a6 2d 6c 482 - 74 11 6d bd 29 72 fd a1 fa 80 f8 5d f8 81 ed be 483 - 5a 37 66 89 36 b3 35 58 3b 59 91 86 dc 5c 69 18 484 - a3 96 fa 48 a1 81 d6 b6 fa 4f 9d 62 d5 13 af bb 485 - 99 2f 2b 99 2f 67 f8 af e6 7f 76 91 3f a3 88 cb 486 - 56 30 c8 ca 01 e0 c6 5d 11 c6 6a 1e 2a c4 c8 59 487 - 77 b7 c7 a6 99 9b bf 10 dc 35 ae 69 f5 51 56 14 488 - 63 6c 0b 9b 68 c1 9e d2 e3 1c 0b 3b 66 76 30 38 489 - eb ba 42 f3 b3 8e dc 03 99 f3 a9 f2 3f aa 63 97 490 - 8c 31 7f c9 fa 66 a7 3f 60 f0 50 4d e9 3b 5b 84 491 - 5e 27 55 92 c1 23 35 ee 34 0b bc 4f dd d5 02 78 492 - 40 16 e4 b3 be 7e f0 4d da 49 f4 b4 40 a3 0c b5 493 - d2 af 93 98 28 fd 4a e3 79 4e 44 f9 4d f5 a6 31 494 - ed e4 2c 17 19 bf da bf 02 53 fe 51 75 be 89 8e 495 - 75 0e dc 53 37 0d 2b 496 - |} 497 - 498 - let processed_payload () = 499 - let buf = 500 - let t = 501 - String.make 1 502 - (Char.unsafe_chr (Tls.Packet.content_type_to_int Tls.Packet.HANDSHAKE)) 503 - in 504 - server_payload ^ t 505 - in 506 - let nonce = Tls.Tls_crypto.aead_nonce write_handshake_iv 0L in 507 - let key = Crypto.AES.GCM.of_secret write_handshake_key in 508 - let adata = 509 - Tls.Writer.assemble_hdr `TLS_1_2 (Tls.Packet.APPLICATION_DATA, "") 510 - in 511 - Bytes.set_uint16_be 512 - (Bytes.unsafe_of_string adata) 513 - 3 514 - (17 + String.length server_payload); 515 - let res = Crypto.AES.GCM.authenticate_encrypt ~key ~adata ~nonce buf in 516 - let data = 517 - Tls.Writer.assemble_hdr `TLS_1_2 (Tls.Packet.APPLICATION_DATA, res) 518 - in 519 - Alcotest.check cs __LOC__ server_payload_processed data 520 - 521 - let c_finished = 522 - Ohex.decode 523 - {| 524 - 14 00 00 20 a8 ec 43 6d 67 76 34 ae 52 5a c1 fc 525 - eb e1 1a 03 9e c1 76 94 fa c6 e9 85 27 b6 42 f2 526 - ed d5 ce 61 527 - |} 528 - 529 - let res_master = 530 - Ohex.decode 531 - {| 532 - 7d f2 35 f2 03 1d 2a 05 12 87 d0 2b 02 41 b0 bf 533 - da f8 6c c8 56 23 1f 2d 5a ba 46 c4 34 ec 19 6c 534 - |} 535 - 536 - let resumption () = 537 - let log = 538 - String.concat "" 539 - [ ch; sh; enc_ext; cert; cert_verify; finished; c_finished ] 540 - in 541 - let module H = (val Digestif.module_of_hash' hash) in 542 - let hash_val = H.(to_raw_string (digest_string log)) in 543 - Alcotest.check cs __LOC__ res_master 544 - (Tls.Handshake_crypto13.derive_secret_no_hash hash master_secret 545 - ~ctx:hash_val "res master"); 546 - match !my_secret with 547 - | None -> Alcotest.fail "expected some secret" 548 - | Some s -> 549 - Alcotest.check cs __LOC__ res_master 550 - (Tls.Handshake_crypto13.resumption s log) 551 - 552 - let private_key = 553 - let _modulus = 554 - Ohex.decode 555 - {| 556 - b4 bb 49 8f 82 79 30 3d 98 08 36 39 9b 36 c6 98 557 - 8c 0c 68 de 55 e1 bd b8 26 d3 90 1a 24 61 ea fd 558 - 2d e4 9a 91 d0 15 ab bc 9a 95 13 7a ce 6c 1a f1 559 - 9e aa 6a f9 8c 7c ed 43 12 09 98 e1 87 a8 0e e0 560 - cc b0 52 4b 1b 01 8c 3e 0b 63 26 4d 44 9a 6d 38 561 - e2 2a 5f da 43 08 46 74 80 30 53 0e f0 46 1c 8c 562 - a9 d9 ef bf ae 8e a6 d1 d0 3e 2b d1 93 ef f0 ab 563 - 9a 80 02 c4 74 28 a6 d3 5a 8d 88 d7 9f 7f 1e 3f 564 - |} 565 - and public_exponent = Ohex.decode "01 00 01" 566 - and _private_exponent = 567 - Ohex.decode 568 - {| 569 - 04 de a7 05 d4 3a 6e a7 20 9d d8 07 21 11 a8 3c 570 - 81 e3 22 a5 92 78 b3 34 80 64 1e af 7c 0a 69 85 571 - b8 e3 1c 44 f6 de 62 e1 b4 c2 30 9f 61 26 e7 7b 572 - 7c 41 e9 23 31 4b bf a3 88 13 05 dc 12 17 f1 6c 573 - 81 9c e5 38 e9 22 f3 69 82 8d 0e 57 19 5d 8c 84 574 - 88 46 02 07 b2 fa a7 26 bc f7 08 bb d7 db 7f 67 575 - 9f 89 34 92 fc 2a 62 2e 08 97 0a ac 44 1c e4 e0 576 - c3 08 8d f2 5a e6 79 23 3d f8 a3 bd a2 ff 99 41 577 - |} 578 - and prime1 = 579 - Ohex.decode 580 - {| 581 - e4 35 fb 7c c8 37 37 75 6d ac ea 96 ab 7f 59 a2 582 - cc 10 69 db 7d eb 19 0e 17 e3 3a 53 2b 27 3f 30 583 - a3 27 aa 0a aa bc 58 cd 67 46 6a f9 84 5f ad c6 584 - 75 fe 09 4a f9 2c 4b d1 f2 c1 bc 33 dd 2e 05 15 585 - |} 586 - and prime2 = 587 - Ohex.decode 588 - {| 589 - ca bd 3b c0 e0 43 86 64 c8 d4 cc 9f 99 97 7a 94 590 - d9 bb fe ad 8e 43 87 0a ba e3 f7 eb 8b 4e 0e ee 591 - 8a f1 d9 b4 71 9b a6 19 6c f2 cb ba ee eb f8 b3 592 - 49 0a fe 9e 9f fa 74 a8 8a a5 1f c6 45 62 93 03 593 - |} 594 - and _exponent1 = 595 - Ohex.decode 596 - {| 597 - 3f 57 34 5c 27 fe 1b 68 7e 6e 76 16 27 b7 8b 1b 598 - 82 64 33 dd 76 0f a0 be a6 a6 ac f3 94 90 aa 1b 599 - 47 cd a4 86 9d 68 f5 84 dd 5b 50 29 bd 32 09 3b 600 - 82 58 66 1f e7 15 02 5e 5d 70 a4 5a 08 d3 d3 19 601 - |} 602 - and _exponent2 = 603 - Ohex.decode 604 - {| 605 - 18 3d a0 13 63 bd 2f 28 85 ca cb dc 99 64 bf 47 606 - 64 f1 51 76 36 f8 64 01 28 6f 71 89 3c 52 cc fe 607 - 40 a6 c2 3d 0d 08 6b 47 c6 fb 10 d8 fd 10 41 e0 608 - 4d ef 7e 9a 40 ce 95 7c 41 77 94 e1 04 12 d1 39 609 - |} 610 - and _coefficient = 611 - Ohex.decode 612 - {| 613 - 83 9c a9 a0 85 e4 28 6b 2c 90 e4 66 99 7a 2c 68 614 - 1f 21 33 9a a3 47 78 14 e4 de c1 18 33 05 0e d5 615 - 0d d1 3c c0 38 04 8a 43 c5 9b 2a cc 41 68 89 c0 616 - 37 66 5f e5 af a6 05 96 9f 8c 01 df a5 ca 96 9d 617 - |} 618 - in 619 - let e = Crypto_pk.Z_extra.of_octets_be public_exponent 620 - and p = Crypto_pk.Z_extra.of_octets_be prime1 621 - and q = Crypto_pk.Z_extra.of_octets_be prime2 in 622 - match Crypto_pk.Rsa.priv_of_primes ~e ~p ~q with 623 - | Ok p -> p 624 - | Error (`Msg m) -> invalid_arg m 625 - 626 - let log = String.concat "" [ ch; sh; enc_ext; cert ] 627 - 628 - and cert = 629 - match X509.Certificate.decode_der (String.sub cert 11 0x01b0) with 630 - | Ok c -> Some c 631 - | Error _ -> None 632 - 633 - let self_signature () = 634 - let module H = (val Digestif.module_of_hash' hash) in 635 - match 636 - Tls.Handshake_common.signature `TLS_1_3 637 - ~context_string:"TLS 1.3, server CertificateVerify" 638 - H.(to_raw_string (digest_string log)) 639 - (Some [ `RSA_PSS_RSAENC_SHA256 ]) [ `RSA_PSS_RSAENC_SHA256 ] 640 - (`RSA private_key) 641 - with 642 - | Error _ -> Alcotest.fail "expected sth" 643 - | Ok data -> ( 644 - match 645 - Tls.Handshake_common.verify_digitally_signed `TLS_1_3 646 - ~context_string:"TLS 1.3, server CertificateVerify" 647 - [ `RSA_PSS_RSAENC_SHA256 ] data 648 - H.(to_raw_string (digest_string log)) 649 - cert 650 - with 651 - | Ok () -> () 652 - | Error e -> 653 - Alcotest.fail 654 - ("self-verification failed " ^ Tls.Engine.string_of_failure e)) 655 - 656 - let wire_signature () = 657 - (* let buf = Writer.assemble_handshake (CertificateVerify data) in 658 - Alcotest.check cs __LOC__ cert_verify buf *) 659 - let module H = (val Digestif.module_of_hash' hash) in 660 - match 661 - Tls.Handshake_common.verify_digitally_signed `TLS_1_3 662 - ~context_string:"TLS 1.3, server CertificateVerify" 663 - [ `RSA_PSS_RSAENC_SHA256 ] 664 - (String.sub cert_verify 4 (String.length cert_verify - 4)) 665 - H.(to_raw_string (digest_string log)) 666 - cert 667 - with 668 - | Ok () -> () 669 - | Error e -> 670 - Alcotest.fail 671 - ("trace-verification failed " ^ Tls.Engine.string_of_failure e) 672 - 673 - let res_secret_00 = 674 - Ohex.decode 675 - {| 676 - 4e cd 0e b6 ec 3b 4d 87 f5 d6 02 8f 92 2c a4 c5 677 - 85 1a 27 7f d4 13 11 c9 e6 2d 2c 94 92 e1 c4 f3 678 - |} 679 - 680 - let res_secret () = 681 - let nonce = String.make 2 '\x00' in 682 - Alcotest.check cs __LOC__ res_secret_00 683 - (Tls.Handshake_crypto13.derive_secret_no_hash hash res_master ~ctx:nonce 684 - "resumption"); 685 - Alcotest.check cs __LOC__ res_secret_00 686 - (Tls.Handshake_crypto13.res_secret hash res_master nonce) 687 - 688 - let early_secret1 = 689 - Ohex.decode 690 - {| 691 - 9b 21 88 e9 b2 fc 6d 64 d7 1d c3 29 90 0e 20 bb 692 - 41 91 50 00 f6 78 aa 83 9c bb 79 7c b7 d8 33 2c 693 - |} 694 - 695 - let early1 () = 696 - let salt = "" and ikm = res_secret_00 in 697 - Alcotest.check cs __LOC__ early_secret1 (Hkdf.extract ~hash ~salt ikm); 698 - let t = Tls.Handshake_crypto13.(derive (empty cipher) ikm) in 699 - my_secret := Some t; 700 - Alcotest.check cs __LOC__ early_secret1 t.secret 701 - 702 - let ch_res_prefix = 703 - Ohex.decode 704 - {| 705 - 01 00 01 fc 03 03 1b c3 ce b6 bb e3 9c ff 93 83 706 - 55 b5 a5 0a db 6d b2 1b 7a 6a f6 49 d7 b4 bc 41 707 - 9d 78 76 48 7d 95 00 00 06 13 01 13 03 13 02 01 708 - 00 01 cd 00 00 00 0b 00 09 00 00 06 73 65 72 76 709 - 65 72 ff 01 00 01 00 00 0a 00 14 00 12 00 1d 00 710 - 17 00 18 00 19 01 00 01 01 01 02 01 03 01 04 00 711 - 33 00 26 00 24 00 1d 00 20 e4 ff b6 8a c0 5f 8d 712 - 96 c9 9d a2 66 98 34 6c 6b e1 64 82 ba dd da fe 713 - 05 1a 66 b4 f1 8d 66 8f 0b 00 2a 00 00 00 2b 00 714 - 03 02 03 04 00 0d 00 20 00 1e 04 03 05 03 06 03 715 - 02 03 08 04 08 05 08 06 04 01 05 01 06 01 02 01 716 - 04 02 05 02 06 02 02 02 00 2d 00 02 01 01 00 1c 717 - 00 02 40 01 00 15 00 57 00 00 00 00 00 00 00 00 718 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 719 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 720 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 721 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 722 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 723 - 29 00 dd 00 b8 00 b2 2c 03 5d 82 93 59 ee 5f f7 724 - af 4e c9 00 00 00 00 26 2a 64 94 dc 48 6d 2c 8a 725 - 34 cb 33 fa 90 bf 1b 00 70 ad 3c 49 88 83 c9 36 726 - 7c 09 a2 be 78 5a bc 55 cd 22 60 97 a3 a9 82 11 727 - 72 83 f8 2a 03 a1 43 ef d3 ff 5d d3 6d 64 e8 61 728 - be 7f d6 1d 28 27 db 27 9c ce 14 50 77 d4 54 a3 729 - 66 4d 4e 6d a4 d2 9e e0 37 25 a6 a4 da fc d0 fc 730 - 67 d2 ae a7 05 29 51 3e 3d a2 67 7f a5 90 6c 5b 731 - 3f 7d 8f 92 f2 28 bd a4 0d da 72 14 70 f9 fb f2 732 - 97 b5 ae a6 17 64 6f ac 5c 03 27 2e 97 07 27 c6 733 - 21 a7 91 41 ef 5f 7d e6 50 5e 5b fb c3 88 e9 33 734 - 43 69 40 93 93 4a e4 d3 57 fa d6 aa cb 735 - |} 736 - 737 - let binder () = 738 - let module H = (val Digestif.module_of_hash' hash) in 739 - let binder_hash = 740 - Ohex.decode 741 - "63 22 4b 2e 45 73 f2 d3 45 4c a8 4b 9d 00 9a 04 f6 be 9e 05 71 1a 83 96 \ 742 - 47 3a ef a0 1e 92 4a 14" 743 - in 744 - Alcotest.check cs __LOC__ binder_hash 745 - H.(to_raw_string (digest_string ch_res_prefix)); 746 - match !my_secret with 747 - | None -> Alcotest.fail "expected secret" 748 - | Some s -> 749 - let prk = 750 - Ohex.decode 751 - "69 fe 13 1a 3b ba d5 d6 3c 64 ee bc c3 0e 39 5b 9d 81 07 72 6a 13 \ 752 - d0 74 e3 89 db c8 a4 e4 72 56" 753 - in 754 - Alcotest.check cs __LOC__ prk 755 - (Tls.Handshake_crypto13.derive_secret s "res binder" ""); 756 - let finished = 757 - Ohex.decode 758 - "3a dd 4f b2 d8 fd f8 22 a0 ca 3c f7 67 8e f5 e8 8d ae 99 01 41 c5 \ 759 - 92 4d 57 bb 6f a3 1b 9e 5f 9d" 760 - in 761 - Alcotest.check cs __LOC__ finished 762 - (Tls.Handshake_crypto13.finished hash prk ch_res_prefix) 763 - 764 - let x25519 () = 765 - let c_priv = 766 - Ohex.decode 767 - {| 768 - 49 af 42 ba 7f 79 94 85 2d 71 3e f2 78 4b cb ca 769 - a7 91 1d e2 6a dc 56 42 cb 63 45 40 e7 ea 50 05 770 - |} 771 - and c_keyshare = 772 - Ohex.decode 773 - {| 774 - 99 38 1d e5 60 e4 bd 43 d2 3d 8e 43 5a 7d ba fe 775 - b3 c0 6e 51 c1 3c ae 4d 54 13 69 1e 52 9a af 2c 776 - |} 777 - and s_priv = 778 - Ohex.decode 779 - {| 780 - b1 58 0e ea df 6d d5 89 b8 ef 4f 2d 56 52 57 8c 781 - c8 10 e9 98 01 91 ec 8d 05 83 08 ce a2 16 a2 1e 782 - |} 783 - and s_keyshare = 784 - Ohex.decode 785 - {| 786 - c9 82 88 76 11 20 95 fe 66 76 2b db f7 c6 72 e1 787 - 56 d6 cc 25 3b 83 3d f1 dd 69 b1 b0 4e 75 1f 0f 788 - |} 789 - in 790 - let check_pub pr pu = 791 - match Crypto_ec.X25519.secret_of_octets pr with 792 - | Ok (_, pub) -> Alcotest.check cs __LOC__ pu pub 793 - | Error _ -> Alcotest.fail "couldn't decode DH secret" 794 - in 795 - let check_one p ks = 796 - match Crypto_ec.X25519.secret_of_octets p with 797 - | Error _ -> Alcotest.fail "couldn't decode DH secret" 798 - | Ok (priv, _) -> ( 799 - match Crypto_ec.X25519.key_exchange priv ks with 800 - | Ok shared -> Alcotest.check cs __LOC__ ikm shared 801 - | Error _ -> Alcotest.fail "bad kex") 802 - in 803 - check_one c_priv s_keyshare; 804 - check_one s_priv c_keyshare; 805 - check_pub c_priv c_keyshare; 806 - check_pub s_priv s_keyshare 807 - 808 - let tests = 809 - [ 810 - ("initial extract", `Quick, extract_secret_early); 811 - ("initial derive", `Quick, derive_hs_secret); 812 - ("handshake extract", `Quick, extract_handshake); 813 - ("derive c hs", `Quick, derive_c_hs_traffic); 814 - ("derive s hs", `Quick, derive_s_hs_traffic); 815 - ("derive finished", `Quick, derive_finished); 816 - ("derive master", `Quick, derive_master); 817 - ("extract master", `Quick, extract_master); 818 - ("derive handshake keys", `Quick, derive_write_handshake_keys); 819 - ("derive traffic keys", `Quick, derive_traffic_keys); 820 - ("application write keys", `Quick, appdata_write); 821 - ("application read keys", `Quick, appdata_read); 822 - ("hs read keys", `Quick, derive_read_handshake_keys); 823 - ("resumption key", `Quick, resumption); 824 - ("payload", `Quick, payload_is_good); 825 - ("processed payload", `Quick, processed_payload); 826 - ("self signature", `Quick, self_signature); 827 - ("wire signature", `Quick, wire_signature); 828 - ("res secret", `Quick, res_secret); 829 - ("early resumed", `Quick, early1); 830 - ("binder", `Quick, binder); 831 - ("x25519", `Quick, x25519); 832 - ] 833 - 834 - let suite = [ ("key extraction and derivation", tests) ]
-12737
tests/readertests.ml
··· 1 - open Tls 2 - open Testlib 3 - 4 - let good_any_version_parser major minor result _ = 5 - let ver = list_to_cstruct [ major; minor ] in 6 - match Reader.parse_any_version ver with 7 - | Ok v -> assert_equal v result 8 - | Error _ -> assert_failure "Version parser broken" 9 - 10 - let bad_any_version_parser major minor _ = 11 - let ver = list_to_cstruct [ major; minor ] in 12 - match Reader.parse_any_version ver with 13 - | Ok _ -> assert_failure "Version parser broken" 14 - | Error _ -> () 15 - 16 - let parse_any_version_too_short _ = 17 - let ver = list_to_cstruct [ 0 ] in 18 - match Reader.parse_any_version ver with 19 - | Ok _ -> assert_failure "Version parser broken" 20 - | Error _ -> () 21 - 22 - let any_version_parser_tests = 23 - [ 24 - good_any_version_parser 3 0 `SSL_3; 25 - good_any_version_parser 3 1 `TLS_1_0; 26 - good_any_version_parser 3 2 `TLS_1_1; 27 - good_any_version_parser 3 3 `TLS_1_2; 28 - good_any_version_parser 3 4 `TLS_1_3; 29 - good_any_version_parser 3 42 (`TLS_1_X 42); 30 - bad_any_version_parser 2 4; 31 - bad_any_version_parser 4 4; 32 - bad_any_version_parser 0 2; 33 - parse_any_version_too_short; 34 - ] 35 - 36 - let any_version_tests = 37 - List.mapi 38 - (fun i f -> "Parse any version " ^ string_of_int i >:: f) 39 - any_version_parser_tests 40 - 41 - let good_version_parser major minor result _ = 42 - let ver = list_to_cstruct [ major; minor ] in 43 - match Reader.parse_version ver with 44 - | Ok v -> assert_equal v result 45 - | Error _ -> assert_failure "Version parser broken" 46 - 47 - let bad_version_parser major minor _ = 48 - let ver = list_to_cstruct [ major; minor ] in 49 - match Reader.parse_version ver with 50 - | Ok _ -> assert_failure "Version parser broken" 51 - | Error _ -> () 52 - 53 - let parse_version_too_short _ = 54 - let ver = list_to_cstruct [ 0 ] in 55 - match Reader.parse_version ver with 56 - | Ok _ -> assert_failure "Version parser broken" 57 - | Error _ -> () 58 - 59 - let version_parser_tests = 60 - [ 61 - good_version_parser 3 1 `TLS_1_0; 62 - good_version_parser 3 2 `TLS_1_1; 63 - good_version_parser 3 3 `TLS_1_2; 64 - good_version_parser 3 4 `TLS_1_3; 65 - bad_version_parser 3 0; 66 - bad_version_parser 3 42; 67 - bad_version_parser 2 4; 68 - bad_version_parser 4 4; 69 - bad_version_parser 0 2; 70 - parse_version_too_short; 71 - ] 72 - 73 - let version_tests = 74 - List.mapi 75 - (fun i f -> "Parse version " ^ string_of_int i >:: f) 76 - version_parser_tests 77 - 78 - let good_record_parser (bytes, result) _ = 79 - let buf = list_to_cstruct bytes in 80 - let open Reader in 81 - match (parse_record buf, result) with 82 - | Ok (`Record ((hdr, x), f)), `Record ((rhdr, y), g) -> 83 - assert_equal rhdr hdr; 84 - assert_cs_eq y x; 85 - assert_cs_eq g f 86 - | Ok (`Fragment x), `Fragment y -> assert_cs_eq y x 87 - | Error (`Record_overflow x), `Overflow y -> assert_equal y x 88 - | Error (`Protocol_version (`Unknown_record x)), `UnknownVersion y -> 89 - assert_equal y x 90 - | Error (`Unexpected (`Content_type x)), `UnknownContent y -> assert_equal y x 91 - | _ -> assert_failure "record parser broken" 92 - 93 - let good_records = 94 - let open Core in 95 - let open Packet in 96 - let empty = "" in 97 - [ 98 - ( [ 20; 3; 1; 0; 0 ], 99 - `Record 100 - ( ({ content_type = CHANGE_CIPHER_SPEC; version = `TLS_1_0 }, empty), 101 - empty ) ); 102 - ( [ 21; 3; 2; 0; 0 ], 103 - `Record (({ content_type = ALERT; version = `TLS_1_1 }, empty), empty) ); 104 - ( [ 22; 3; 3; 0; 0 ], 105 - `Record (({ content_type = HANDSHAKE; version = `TLS_1_2 }, empty), empty) 106 - ); 107 - ( [ 23; 3; 0; 0; 0 ], 108 - `Record 109 - (({ content_type = APPLICATION_DATA; version = `SSL_3 }, empty), empty) 110 - ); 111 - ([ 16; 3; 1; 0; 0 ], `UnknownContent 16); 112 - ([ 19; 3; 1; 0; 0 ], `UnknownContent 19); 113 - ([ 20; 5; 1; 0; 0 ], `UnknownVersion (5, 1)); 114 - ([ 20; 3; 1; 0; 100 ], `Fragment (list_to_cstruct [ 20; 3; 1; 0; 100 ])); 115 - ([ 0 ], `Fragment (list_to_cstruct [ 0 ])); 116 - ([], `Fragment empty); 117 - ( [ 20; 3; 1; 0; 0; 0 ], 118 - `Record 119 - ( ({ content_type = CHANGE_CIPHER_SPEC; version = `TLS_1_0 }, empty), 120 - list_to_cstruct [ 0 ] ) ); 121 - ([ 0; 0; 0; 255; 255 ], `Overflow 65535); 122 - ([ 0; 0; 0; 72; 1 ], `Overflow 18433); 123 - ] 124 - 125 - let good_records_tests = 126 - List.mapi 127 - (fun i args -> "Good record " ^ string_of_int i >:: good_record_parser args) 128 - good_records 129 - 130 - let good_alert_parser (lvl, typ, expected) _ = 131 - let buf = list_to_cstruct [ lvl; typ ] in 132 - match Reader.parse_alert buf with 133 - | Ok al -> assert_equal al expected 134 - | Error _ -> assert_failure "alert parser broken" 135 - 136 - let good_alerts = 137 - let w = Packet.WARNING in 138 - let f = Packet.FATAL in 139 - [ 140 - (1, 0, (w, Packet.CLOSE_NOTIFY)); 141 - (2, 0, (f, Packet.CLOSE_NOTIFY)); 142 - (* (1, 10, (w, Packet.UNEXPECTED_MESSAGE)); *) 143 - (2, 10, (f, Packet.UNEXPECTED_MESSAGE)); 144 - (* (1, 20, (w, Packet.BAD_RECORD_MAC)); *) 145 - (2, 20, (f, Packet.BAD_RECORD_MAC)); 146 - (* (1, 22, (w, Packet.RECORD_OVERFLOW)); *) 147 - (2, 22, (f, Packet.RECORD_OVERFLOW)); 148 - (* (1, 40, (w, Packet.HANDSHAKE_FAILURE)); *) 149 - (2, 40, (f, Packet.HANDSHAKE_FAILURE)); 150 - (* (1, 42, (w, Packet.BAD_CERTIFICATE)); *) 151 - (2, 42, (f, Packet.BAD_CERTIFICATE)); 152 - (1, 45, (w, Packet.CERTIFICATE_EXPIRED)); 153 - (2, 45, (f, Packet.CERTIFICATE_EXPIRED)); 154 - (* (1, 50, (w, Packet.DECODE_ERROR)); *) 155 - (2, 50, (f, Packet.DECODE_ERROR)); 156 - (* (1, 70, (w, Packet.PROTOCOL_VERSION)); *) 157 - (2, 70, (f, Packet.PROTOCOL_VERSION)); 158 - (1, 90, (w, Packet.USER_CANCELED)); 159 - (* (2, 90, (f, Packet.USER_CANCELED)); *) 160 - (1, 100, (w, Packet.NO_RENEGOTIATION)); 161 - (* (2, 100, (f, Packet.NO_RENEGOTIATION)); *) 162 - (* (1, 110, (w, Packet.UNSUPPORTED_EXTENSION)); *) 163 - (2, 110, (f, Packet.UNSUPPORTED_EXTENSION)); 164 - (* (1, 112, (w, Packet.UNRECOGNIZED_NAME)); *) 165 - (2, 112, (f, Packet.UNRECOGNIZED_NAME)); 166 - (2, 120, (f, Packet.NO_APPLICATION_PROTOCOL)); 167 - ] 168 - 169 - let good_alert_tests = 170 - List.mapi 171 - (fun i args -> "Good alert " ^ string_of_int i >:: good_alert_parser args) 172 - good_alerts 173 - 174 - let alert_too_small _ = 175 - let buf = list_to_cstruct [ 0 ] in 176 - match Reader.parse_alert buf with 177 - | Ok _ -> assert_failure "short alert passes" 178 - | Error _ -> () 179 - 180 - let alert_too_small2 _ = 181 - let buf = list_to_cstruct [ 25 ] in 182 - match Reader.parse_alert buf with 183 - | Ok _ -> assert_failure "short alert passes" 184 - | Error _ -> () 185 - 186 - let bad_alerts_tests = 187 - [ "short alert" >:: alert_too_small; "short alert 2" >:: alert_too_small2 ] 188 - 189 - let good_dhparams = 190 - [ 191 - [ 192 - 0x01; 193 - 0x00; 194 - 0xf6; 195 - 0x42; 196 - 0x57; 197 - 0xb7; 198 - 0x08; 199 - 0x7f; 200 - 0x08; 201 - 0x17; 202 - 0x72; 203 - 0xa2; 204 - 0xba; 205 - 0xd6; 206 - 0xa9; 207 - 0x42; 208 - 0xf3; 209 - 0x05; 210 - 0xe8; 211 - 0xf9; 212 - 0x53; 213 - 0x11; 214 - 0x39; 215 - 0x4f; 216 - 0xb6; 217 - 0xf1; 218 - 0x6e; 219 - 0xb9; 220 - 0x4b; 221 - 0x38; 222 - 0x20; 223 - 0xda; 224 - 0x01; 225 - 0xa7; 226 - 0x56; 227 - 0xa3; 228 - 0x14; 229 - 0xe9; 230 - 0x8f; 231 - 0x40; 232 - 0x55; 233 - 0xf3; 234 - 0xd0; 235 - 0x07; 236 - 0xc6; 237 - 0xcb; 238 - 0x43; 239 - 0xa9; 240 - 0x94; 241 - 0xad; 242 - 0xf7; 243 - 0x4c; 244 - 0x64; 245 - 0x86; 246 - 0x49; 247 - 0xf8; 248 - 0x0c; 249 - 0x83; 250 - 0xbd; 251 - 0x65; 252 - 0xe9; 253 - 0x17; 254 - 0xd4; 255 - 0xa1; 256 - 0xd3; 257 - 0x50; 258 - 0xf8; 259 - 0xf5; 260 - 0x59; 261 - 0x5f; 262 - 0xdc; 263 - 0x76; 264 - 0x52; 265 - 0x4f; 266 - 0x3d; 267 - 0x3d; 268 - 0x8d; 269 - 0xdb; 270 - 0xce; 271 - 0x99; 272 - 0xe1; 273 - 0x57; 274 - 0x92; 275 - 0x59; 276 - 0xcd; 277 - 0xfd; 278 - 0xb8; 279 - 0xae; 280 - 0x74; 281 - 0x4f; 282 - 0xc5; 283 - 0xfc; 284 - 0x76; 285 - 0xbc; 286 - 0x83; 287 - 0xc5; 288 - 0x47; 289 - 0x30; 290 - 0x61; 291 - 0xce; 292 - 0x7c; 293 - 0xc9; 294 - 0x66; 295 - 0xff; 296 - 0x15; 297 - 0xf9; 298 - 0xbb; 299 - 0xfd; 300 - 0x91; 301 - 0x5e; 302 - 0xc7; 303 - 0x01; 304 - 0xaa; 305 - 0xd3; 306 - 0x5b; 307 - 0x9e; 308 - 0x8d; 309 - 0xa0; 310 - 0xa5; 311 - 0x72; 312 - 0x3a; 313 - 0xd4; 314 - 0x1a; 315 - 0xf0; 316 - 0xbf; 317 - 0x46; 318 - 0x00; 319 - 0x58; 320 - 0x2b; 321 - 0xe5; 322 - 0xf4; 323 - 0x88; 324 - 0xfd; 325 - 0x58; 326 - 0x4e; 327 - 0x49; 328 - 0xdb; 329 - 0xcd; 330 - 0x20; 331 - 0xb4; 332 - 0x9d; 333 - 0xe4; 334 - 0x91; 335 - 0x07; 336 - 0x36; 337 - 0x6b; 338 - 0x33; 339 - 0x6c; 340 - 0x38; 341 - 0x0d; 342 - 0x45; 343 - 0x1d; 344 - 0x0f; 345 - 0x7c; 346 - 0x88; 347 - 0xb3; 348 - 0x1c; 349 - 0x7c; 350 - 0x5b; 351 - 0x2d; 352 - 0x8e; 353 - 0xf6; 354 - 0xf3; 355 - 0xc9; 356 - 0x23; 357 - 0xc0; 358 - 0x43; 359 - 0xf0; 360 - 0xa5; 361 - 0x5b; 362 - 0x18; 363 - 0x8d; 364 - 0x8e; 365 - 0xbb; 366 - 0x55; 367 - 0x8c; 368 - 0xb8; 369 - 0x5d; 370 - 0x38; 371 - 0xd3; 372 - 0x34; 373 - 0xfd; 374 - 0x7c; 375 - 0x17; 376 - 0x57; 377 - 0x43; 378 - 0xa3; 379 - 0x1d; 380 - 0x18; 381 - 0x6c; 382 - 0xde; 383 - 0x33; 384 - 0x21; 385 - 0x2c; 386 - 0xb5; 387 - 0x2a; 388 - 0xff; 389 - 0x3c; 390 - 0xe1; 391 - 0xb1; 392 - 0x29; 393 - 0x40; 394 - 0x18; 395 - 0x11; 396 - 0x8d; 397 - 0x7c; 398 - 0x84; 399 - 0xa7; 400 - 0x0a; 401 - 0x72; 402 - 0xd6; 403 - 0x86; 404 - 0xc4; 405 - 0x03; 406 - 0x19; 407 - 0xc8; 408 - 0x07; 409 - 0x29; 410 - 0x7a; 411 - 0xca; 412 - 0x95; 413 - 0x0c; 414 - 0xd9; 415 - 0x96; 416 - 0x9f; 417 - 0xab; 418 - 0xd0; 419 - 0x0a; 420 - 0x50; 421 - 0x9b; 422 - 0x02; 423 - 0x46; 424 - 0xd3; 425 - 0x08; 426 - 0x3d; 427 - 0x66; 428 - 0xa4; 429 - 0x5d; 430 - 0x41; 431 - 0x9f; 432 - 0x9c; 433 - 0x7c; 434 - 0xbd; 435 - 0x89; 436 - 0x4b; 437 - 0x22; 438 - 0x19; 439 - 0x26; 440 - 0xba; 441 - 0xab; 442 - 0xa2; 443 - 0x5e; 444 - 0xc3; 445 - 0x55; 446 - 0xe9; 447 - 0x32; 448 - 0x0b; 449 - 0x3b; 450 - 0x00; 451 - 0x01; 452 - 0x02; 453 - 0x01; 454 - 0x00; 455 - 0x54; 456 - 0x7d; 457 - 0x06; 458 - 0xfb; 459 - 0x28; 460 - 0xe3; 461 - 0x64; 462 - 0x86; 463 - 0x53; 464 - 0x6e; 465 - 0xf0; 466 - 0xfc; 467 - 0xdc; 468 - 0x57; 469 - 0xb6; 470 - 0x86; 471 - 0xae; 472 - 0xa7; 473 - 0x20; 474 - 0xbc; 475 - 0xac; 476 - 0x76; 477 - 0x38; 478 - 0xf5; 479 - 0x64; 480 - 0x02; 481 - 0x9d; 482 - 0x19; 483 - 0x1a; 484 - 0xfe; 485 - 0x4d; 486 - 0x0d; 487 - 0x5a; 488 - 0xd3; 489 - 0xc6; 490 - 0x76; 491 - 0x9b; 492 - 0x33; 493 - 0x8d; 494 - 0x3a; 495 - 0x96; 496 - 0xcc; 497 - 0x3f; 498 - 0x72; 499 - 0xdf; 500 - 0x1d; 501 - 0x19; 502 - 0xd2; 503 - 0x61; 504 - 0x41; 505 - 0x95; 506 - 0x3a; 507 - 0x2d; 508 - 0x83; 509 - 0x7f; 510 - 0x4e; 511 - 0xbb; 512 - 0x48; 513 - 0xf4; 514 - 0x77; 515 - 0x05; 516 - 0xd3; 517 - 0x23; 518 - 0xff; 519 - 0x49; 520 - 0xd8; 521 - 0xc8; 522 - 0x70; 523 - 0x0a; 524 - 0x69; 525 - 0xd4; 526 - 0xf7; 527 - 0x64; 528 - 0xfa; 529 - 0x86; 530 - 0x8c; 531 - 0x94; 532 - 0x96; 533 - 0x41; 534 - 0x14; 535 - 0xf1; 536 - 0x6e; 537 - 0x6f; 538 - 0x09; 539 - 0x21; 540 - 0x2b; 541 - 0xd5; 542 - 0xfa; 543 - 0x52; 544 - 0x56; 545 - 0xf4; 546 - 0x44; 547 - 0x25; 548 - 0x29; 549 - 0xb2; 550 - 0x51; 551 - 0x4e; 552 - 0x57; 553 - 0xd7; 554 - 0x8b; 555 - 0xcb; 556 - 0x70; 557 - 0x3b; 558 - 0x94; 559 - 0x4f; 560 - 0x2b; 561 - 0xe2; 562 - 0xa7; 563 - 0xfc; 564 - 0xaa; 565 - 0x09; 566 - 0xd0; 567 - 0x82; 568 - 0x9e; 569 - 0xa8; 570 - 0x17; 571 - 0xbe; 572 - 0x84; 573 - 0xf0; 574 - 0x1a; 575 - 0xae; 576 - 0xe1; 577 - 0x97; 578 - 0x14; 579 - 0x7b; 580 - 0x74; 581 - 0xd4; 582 - 0x12; 583 - 0xf8; 584 - 0x96; 585 - 0xbe; 586 - 0xa9; 587 - 0x2e; 588 - 0xdd; 589 - 0xbe; 590 - 0x28; 591 - 0xcd; 592 - 0xe8; 593 - 0x9f; 594 - 0x67; 595 - 0x31; 596 - 0x98; 597 - 0xcb; 598 - 0x74; 599 - 0xae; 600 - 0xd4; 601 - 0x50; 602 - 0xa5; 603 - 0x77; 604 - 0xc4; 605 - 0xc1; 606 - 0x39; 607 - 0x9c; 608 - 0xcd; 609 - 0xc2; 610 - 0x8a; 611 - 0xfe; 612 - 0xe2; 613 - 0x77; 614 - 0x1c; 615 - 0x09; 616 - 0x75; 617 - 0x3e; 618 - 0xf7; 619 - 0x96; 620 - 0x6a; 621 - 0x92; 622 - 0x96; 623 - 0x06; 624 - 0x1e; 625 - 0x8d; 626 - 0x22; 627 - 0xdd; 628 - 0x58; 629 - 0xfe; 630 - 0x3d; 631 - 0x84; 632 - 0x56; 633 - 0x09; 634 - 0x17; 635 - 0xe2; 636 - 0x50; 637 - 0xb1; 638 - 0xf6; 639 - 0x61; 640 - 0x54; 641 - 0x6e; 642 - 0x5e; 643 - 0x94; 644 - 0xca; 645 - 0xf0; 646 - 0x40; 647 - 0x68; 648 - 0x84; 649 - 0xeb; 650 - 0xc1; 651 - 0x0c; 652 - 0x43; 653 - 0x3e; 654 - 0xbc; 655 - 0xb3; 656 - 0x0e; 657 - 0x81; 658 - 0x4d; 659 - 0xc0; 660 - 0x21; 661 - 0xdb; 662 - 0x97; 663 - 0xc6; 664 - 0x8b; 665 - 0x27; 666 - 0x10; 667 - 0x5c; 668 - 0xae; 669 - 0xe3; 670 - 0x6e; 671 - 0x66; 672 - 0x85; 673 - 0xaf; 674 - 0xff; 675 - 0x19; 676 - 0x8b; 677 - 0xf8; 678 - 0xd5; 679 - 0x93; 680 - 0x4b; 681 - 0xd2; 682 - 0xd8; 683 - 0x7c; 684 - 0x64; 685 - 0x04; 686 - 0xed; 687 - 0xce; 688 - 0x88; 689 - 0xce; 690 - 0xb8; 691 - 0x2c; 692 - 0x4f; 693 - 0xe0; 694 - 0xf5; 695 - 0x0d; 696 - 0x3a; 697 - 0xeb; 698 - 0x78; 699 - 0xee; 700 - 0xcf; 701 - 0x1a; 702 - 0xd1; 703 - 0x02; 704 - 0xcf; 705 - 0x0f; 706 - 0x68; 707 - 0xed; 708 - 0xd2; 709 - 0xca; 710 - 0xf6; 711 - ]; 712 - [ 713 - 0x01; 714 - 0x00; 715 - 0xf6; 716 - 0x42; 717 - 0x57; 718 - 0xb7; 719 - 0x08; 720 - 0x7f; 721 - 0x08; 722 - 0x17; 723 - 0x72; 724 - 0xa2; 725 - 0xba; 726 - 0xd6; 727 - 0xa9; 728 - 0x42; 729 - 0xf3; 730 - 0x05; 731 - 0xe8; 732 - 0xf9; 733 - 0x53; 734 - 0x11; 735 - 0x39; 736 - 0x4f; 737 - 0xb6; 738 - 0xf1; 739 - 0x6e; 740 - 0xb9; 741 - 0x4b; 742 - 0x38; 743 - 0x20; 744 - 0xda; 745 - 0x01; 746 - 0xa7; 747 - 0x56; 748 - 0xa3; 749 - 0x14; 750 - 0xe9; 751 - 0x8f; 752 - 0x40; 753 - 0x55; 754 - 0xf3; 755 - 0xd0; 756 - 0x07; 757 - 0xc6; 758 - 0xcb; 759 - 0x43; 760 - 0xa9; 761 - 0x94; 762 - 0xad; 763 - 0xf7; 764 - 0x4c; 765 - 0x64; 766 - 0x86; 767 - 0x49; 768 - 0xf8; 769 - 0x0c; 770 - 0x83; 771 - 0xbd; 772 - 0x65; 773 - 0xe9; 774 - 0x17; 775 - 0xd4; 776 - 0xa1; 777 - 0xd3; 778 - 0x50; 779 - 0xf8; 780 - 0xf5; 781 - 0x59; 782 - 0x5f; 783 - 0xdc; 784 - 0x76; 785 - 0x52; 786 - 0x4f; 787 - 0x3d; 788 - 0x3d; 789 - 0x8d; 790 - 0xdb; 791 - 0xce; 792 - 0x99; 793 - 0xe1; 794 - 0x57; 795 - 0x92; 796 - 0x59; 797 - 0xcd; 798 - 0xfd; 799 - 0xb8; 800 - 0xae; 801 - 0x74; 802 - 0x4f; 803 - 0xc5; 804 - 0xfc; 805 - 0x76; 806 - 0xbc; 807 - 0x83; 808 - 0xc5; 809 - 0x47; 810 - 0x30; 811 - 0x61; 812 - 0xce; 813 - 0x7c; 814 - 0xc9; 815 - 0x66; 816 - 0xff; 817 - 0x15; 818 - 0xf9; 819 - 0xbb; 820 - 0xfd; 821 - 0x91; 822 - 0x5e; 823 - 0xc7; 824 - 0x01; 825 - 0xaa; 826 - 0xd3; 827 - 0x5b; 828 - 0x9e; 829 - 0x8d; 830 - 0xa0; 831 - 0xa5; 832 - 0x72; 833 - 0x3a; 834 - 0xd4; 835 - 0x1a; 836 - 0xf0; 837 - 0xbf; 838 - 0x46; 839 - 0x00; 840 - 0x58; 841 - 0x2b; 842 - 0xe5; 843 - 0xf4; 844 - 0x88; 845 - 0xfd; 846 - 0x58; 847 - 0x4e; 848 - 0x49; 849 - 0xdb; 850 - 0xcd; 851 - 0x20; 852 - 0xb4; 853 - 0x9d; 854 - 0xe4; 855 - 0x91; 856 - 0x07; 857 - 0x36; 858 - 0x6b; 859 - 0x33; 860 - 0x6c; 861 - 0x38; 862 - 0x0d; 863 - 0x45; 864 - 0x1d; 865 - 0x0f; 866 - 0x7c; 867 - 0x88; 868 - 0xb3; 869 - 0x1c; 870 - 0x7c; 871 - 0x5b; 872 - 0x2d; 873 - 0x8e; 874 - 0xf6; 875 - 0xf3; 876 - 0xc9; 877 - 0x23; 878 - 0xc0; 879 - 0x43; 880 - 0xf0; 881 - 0xa5; 882 - 0x5b; 883 - 0x18; 884 - 0x8d; 885 - 0x8e; 886 - 0xbb; 887 - 0x55; 888 - 0x8c; 889 - 0xb8; 890 - 0x5d; 891 - 0x38; 892 - 0xd3; 893 - 0x34; 894 - 0xfd; 895 - 0x7c; 896 - 0x17; 897 - 0x57; 898 - 0x43; 899 - 0xa3; 900 - 0x1d; 901 - 0x18; 902 - 0x6c; 903 - 0xde; 904 - 0x33; 905 - 0x21; 906 - 0x2c; 907 - 0xb5; 908 - 0x2a; 909 - 0xff; 910 - 0x3c; 911 - 0xe1; 912 - 0xb1; 913 - 0x29; 914 - 0x40; 915 - 0x18; 916 - 0x11; 917 - 0x8d; 918 - 0x7c; 919 - 0x84; 920 - 0xa7; 921 - 0x0a; 922 - 0x72; 923 - 0xd6; 924 - 0x86; 925 - 0xc4; 926 - 0x03; 927 - 0x19; 928 - 0xc8; 929 - 0x07; 930 - 0x29; 931 - 0x7a; 932 - 0xca; 933 - 0x95; 934 - 0x0c; 935 - 0xd9; 936 - 0x96; 937 - 0x9f; 938 - 0xab; 939 - 0xd0; 940 - 0x0a; 941 - 0x50; 942 - 0x9b; 943 - 0x02; 944 - 0x46; 945 - 0xd3; 946 - 0x08; 947 - 0x3d; 948 - 0x66; 949 - 0xa4; 950 - 0x5d; 951 - 0x41; 952 - 0x9f; 953 - 0x9c; 954 - 0x7c; 955 - 0xbd; 956 - 0x89; 957 - 0x4b; 958 - 0x22; 959 - 0x19; 960 - 0x26; 961 - 0xba; 962 - 0xab; 963 - 0xa2; 964 - 0x5e; 965 - 0xc3; 966 - 0x55; 967 - 0xe9; 968 - 0x32; 969 - 0x0b; 970 - 0x3b; 971 - 0x00; 972 - 0x01; 973 - 0x02; 974 - 0x01; 975 - 0x00; 976 - 0x7d; 977 - 0x17; 978 - 0xb3; 979 - 0xc8; 980 - 0x40; 981 - 0xcd; 982 - 0xa0; 983 - 0x75; 984 - 0x5b; 985 - 0xa4; 986 - 0xe1; 987 - 0xed; 988 - 0xef; 989 - 0xd3; 990 - 0xed; 991 - 0x74; 992 - 0x8e; 993 - 0x3c; 994 - 0xd5; 995 - 0x37; 996 - 0x17; 997 - 0xe2; 998 - 0x2b; 999 - 0x3d; 1000 - 0x4e; 1001 - 0x20; 1002 - 0x2b; 1003 - 0xf4; 1004 - 0xdc; 1005 - 0x83; 1006 - 0x5a; 1007 - 0x8b; 1008 - 0x86; 1009 - 0xed; 1010 - 0x7b; 1011 - 0xa3; 1012 - 0x8d; 1013 - 0xfa; 1014 - 0xb4; 1015 - 0x3a; 1016 - 0x72; 1017 - 0x95; 1018 - 0xca; 1019 - 0x5a; 1020 - 0xd9; 1021 - 0xf9; 1022 - 0x27; 1023 - 0x08; 1024 - 0x10; 1025 - 0xec; 1026 - 0x9b; 1027 - 0x9b; 1028 - 0x86; 1029 - 0xad; 1030 - 0xbe; 1031 - 0xfe; 1032 - 0x77; 1033 - 0xcb; 1034 - 0xf7; 1035 - 0xf6; 1036 - 0x03; 1037 - 0x35; 1038 - 0x9f; 1039 - 0x16; 1040 - 0x97; 1041 - 0x72; 1042 - 0x6e; 1043 - 0x92; 1044 - 0xb8; 1045 - 0xd7; 1046 - 0xd3; 1047 - 0x09; 1048 - 0x58; 1049 - 0x1d; 1050 - 0xd0; 1051 - 0x8a; 1052 - 0xeb; 1053 - 0x16; 1054 - 0xa9; 1055 - 0x71; 1056 - 0x9a; 1057 - 0xf8; 1058 - 0xb6; 1059 - 0xc8; 1060 - 0xcc; 1061 - 0x63; 1062 - 0x52; 1063 - 0x8d; 1064 - 0x8f; 1065 - 0x93; 1066 - 0x23; 1067 - 0x1b; 1068 - 0xa8; 1069 - 0xfe; 1070 - 0x3c; 1071 - 0x17; 1072 - 0x9b; 1073 - 0xe6; 1074 - 0x64; 1075 - 0x3d; 1076 - 0xab; 1077 - 0x57; 1078 - 0x0c; 1079 - 0xb1; 1080 - 0x17; 1081 - 0x71; 1082 - 0xc1; 1083 - 0x40; 1084 - 0x72; 1085 - 0xc9; 1086 - 0x42; 1087 - 0x43; 1088 - 0x68; 1089 - 0x39; 1090 - 0xa5; 1091 - 0x7f; 1092 - 0x63; 1093 - 0x03; 1094 - 0x7e; 1095 - 0xff; 1096 - 0xd6; 1097 - 0x11; 1098 - 0xe1; 1099 - 0x1a; 1100 - 0xe1; 1101 - 0xd9; 1102 - 0x2f; 1103 - 0xa3; 1104 - 0x4a; 1105 - 0x93; 1106 - 0x4f; 1107 - 0x09; 1108 - 0x79; 1109 - 0xbd; 1110 - 0x78; 1111 - 0xf3; 1112 - 0xf4; 1113 - 0xe1; 1114 - 0x44; 1115 - 0x7d; 1116 - 0xaf; 1117 - 0x7b; 1118 - 0xd7; 1119 - 0x82; 1120 - 0x11; 1121 - 0xc9; 1122 - 0xd9; 1123 - 0x91; 1124 - 0x01; 1125 - 0x9a; 1126 - 0x2c; 1127 - 0xcb; 1128 - 0xd1; 1129 - 0x41; 1130 - 0xcc; 1131 - 0xf5; 1132 - 0x5c; 1133 - 0x9f; 1134 - 0xb5; 1135 - 0xa2; 1136 - 0x7c; 1137 - 0x8b; 1138 - 0x2d; 1139 - 0xf6; 1140 - 0x16; 1141 - 0xab; 1142 - 0x68; 1143 - 0x99; 1144 - 0x99; 1145 - 0x33; 1146 - 0x80; 1147 - 0x72; 1148 - 0xee; 1149 - 0xce; 1150 - 0x13; 1151 - 0xea; 1152 - 0x3f; 1153 - 0x62; 1154 - 0xca; 1155 - 0xfc; 1156 - 0x56; 1157 - 0xd6; 1158 - 0x6d; 1159 - 0xa2; 1160 - 0x8a; 1161 - 0xfe; 1162 - 0xdf; 1163 - 0x71; 1164 - 0x7a; 1165 - 0x82; 1166 - 0x39; 1167 - 0xd1; 1168 - 0x5d; 1169 - 0x09; 1170 - 0x27; 1171 - 0x26; 1172 - 0x26; 1173 - 0x5c; 1174 - 0x6e; 1175 - 0xab; 1176 - 0x28; 1177 - 0xb2; 1178 - 0xa1; 1179 - 0x6f; 1180 - 0xb9; 1181 - 0x08; 1182 - 0x25; 1183 - 0xd0; 1184 - 0xa1; 1185 - 0x68; 1186 - 0x25; 1187 - 0x31; 1188 - 0xae; 1189 - 0x4a; 1190 - 0xef; 1191 - 0x62; 1192 - 0x99; 1193 - 0xb6; 1194 - 0x4d; 1195 - 0xd2; 1196 - 0xa9; 1197 - 0x27; 1198 - 0x20; 1199 - 0x99; 1200 - 0xc4; 1201 - 0xdc; 1202 - 0x44; 1203 - 0x81; 1204 - 0x0c; 1205 - 0xc0; 1206 - 0xfe; 1207 - 0xa9; 1208 - 0xab; 1209 - 0xc9; 1210 - 0xe8; 1211 - 0x26; 1212 - 0x00; 1213 - 0x60; 1214 - 0x40; 1215 - 0x0e; 1216 - 0xb4; 1217 - 0x07; 1218 - 0xfc; 1219 - 0xcf; 1220 - 0x7f; 1221 - 0x93; 1222 - 0xc5; 1223 - 0x20; 1224 - 0x10; 1225 - 0x49; 1226 - 0x72; 1227 - 0xd2; 1228 - 0x9b; 1229 - 0x4b; 1230 - 0x70; 1231 - 0x03; 1232 - ]; 1233 - [ 1234 - 0x01; 1235 - 0x00; 1236 - 0xf6; 1237 - 0x42; 1238 - 0x57; 1239 - 0xb7; 1240 - 0x08; 1241 - 0x7f; 1242 - 0x08; 1243 - 0x17; 1244 - 0x72; 1245 - 0xa2; 1246 - 0xba; 1247 - 0xd6; 1248 - 0xa9; 1249 - 0x42; 1250 - 0xf3; 1251 - 0x05; 1252 - 0xe8; 1253 - 0xf9; 1254 - 0x53; 1255 - 0x11; 1256 - 0x39; 1257 - 0x4f; 1258 - 0xb6; 1259 - 0xf1; 1260 - 0x6e; 1261 - 0xb9; 1262 - 0x4b; 1263 - 0x38; 1264 - 0x20; 1265 - 0xda; 1266 - 0x01; 1267 - 0xa7; 1268 - 0x56; 1269 - 0xa3; 1270 - 0x14; 1271 - 0xe9; 1272 - 0x8f; 1273 - 0x40; 1274 - 0x55; 1275 - 0xf3; 1276 - 0xd0; 1277 - 0x07; 1278 - 0xc6; 1279 - 0xcb; 1280 - 0x43; 1281 - 0xa9; 1282 - 0x94; 1283 - 0xad; 1284 - 0xf7; 1285 - 0x4c; 1286 - 0x64; 1287 - 0x86; 1288 - 0x49; 1289 - 0xf8; 1290 - 0x0c; 1291 - 0x83; 1292 - 0xbd; 1293 - 0x65; 1294 - 0xe9; 1295 - 0x17; 1296 - 0xd4; 1297 - 0xa1; 1298 - 0xd3; 1299 - 0x50; 1300 - 0xf8; 1301 - 0xf5; 1302 - 0x59; 1303 - 0x5f; 1304 - 0xdc; 1305 - 0x76; 1306 - 0x52; 1307 - 0x4f; 1308 - 0x3d; 1309 - 0x3d; 1310 - 0x8d; 1311 - 0xdb; 1312 - 0xce; 1313 - 0x99; 1314 - 0xe1; 1315 - 0x57; 1316 - 0x92; 1317 - 0x59; 1318 - 0xcd; 1319 - 0xfd; 1320 - 0xb8; 1321 - 0xae; 1322 - 0x74; 1323 - 0x4f; 1324 - 0xc5; 1325 - 0xfc; 1326 - 0x76; 1327 - 0xbc; 1328 - 0x83; 1329 - 0xc5; 1330 - 0x47; 1331 - 0x30; 1332 - 0x61; 1333 - 0xce; 1334 - 0x7c; 1335 - 0xc9; 1336 - 0x66; 1337 - 0xff; 1338 - 0x15; 1339 - 0xf9; 1340 - 0xbb; 1341 - 0xfd; 1342 - 0x91; 1343 - 0x5e; 1344 - 0xc7; 1345 - 0x01; 1346 - 0xaa; 1347 - 0xd3; 1348 - 0x5b; 1349 - 0x9e; 1350 - 0x8d; 1351 - 0xa0; 1352 - 0xa5; 1353 - 0x72; 1354 - 0x3a; 1355 - 0xd4; 1356 - 0x1a; 1357 - 0xf0; 1358 - 0xbf; 1359 - 0x46; 1360 - 0x00; 1361 - 0x58; 1362 - 0x2b; 1363 - 0xe5; 1364 - 0xf4; 1365 - 0x88; 1366 - 0xfd; 1367 - 0x58; 1368 - 0x4e; 1369 - 0x49; 1370 - 0xdb; 1371 - 0xcd; 1372 - 0x20; 1373 - 0xb4; 1374 - 0x9d; 1375 - 0xe4; 1376 - 0x91; 1377 - 0x07; 1378 - 0x36; 1379 - 0x6b; 1380 - 0x33; 1381 - 0x6c; 1382 - 0x38; 1383 - 0x0d; 1384 - 0x45; 1385 - 0x1d; 1386 - 0x0f; 1387 - 0x7c; 1388 - 0x88; 1389 - 0xb3; 1390 - 0x1c; 1391 - 0x7c; 1392 - 0x5b; 1393 - 0x2d; 1394 - 0x8e; 1395 - 0xf6; 1396 - 0xf3; 1397 - 0xc9; 1398 - 0x23; 1399 - 0xc0; 1400 - 0x43; 1401 - 0xf0; 1402 - 0xa5; 1403 - 0x5b; 1404 - 0x18; 1405 - 0x8d; 1406 - 0x8e; 1407 - 0xbb; 1408 - 0x55; 1409 - 0x8c; 1410 - 0xb8; 1411 - 0x5d; 1412 - 0x38; 1413 - 0xd3; 1414 - 0x34; 1415 - 0xfd; 1416 - 0x7c; 1417 - 0x17; 1418 - 0x57; 1419 - 0x43; 1420 - 0xa3; 1421 - 0x1d; 1422 - 0x18; 1423 - 0x6c; 1424 - 0xde; 1425 - 0x33; 1426 - 0x21; 1427 - 0x2c; 1428 - 0xb5; 1429 - 0x2a; 1430 - 0xff; 1431 - 0x3c; 1432 - 0xe1; 1433 - 0xb1; 1434 - 0x29; 1435 - 0x40; 1436 - 0x18; 1437 - 0x11; 1438 - 0x8d; 1439 - 0x7c; 1440 - 0x84; 1441 - 0xa7; 1442 - 0x0a; 1443 - 0x72; 1444 - 0xd6; 1445 - 0x86; 1446 - 0xc4; 1447 - 0x03; 1448 - 0x19; 1449 - 0xc8; 1450 - 0x07; 1451 - 0x29; 1452 - 0x7a; 1453 - 0xca; 1454 - 0x95; 1455 - 0x0c; 1456 - 0xd9; 1457 - 0x96; 1458 - 0x9f; 1459 - 0xab; 1460 - 0xd0; 1461 - 0x0a; 1462 - 0x50; 1463 - 0x9b; 1464 - 0x02; 1465 - 0x46; 1466 - 0xd3; 1467 - 0x08; 1468 - 0x3d; 1469 - 0x66; 1470 - 0xa4; 1471 - 0x5d; 1472 - 0x41; 1473 - 0x9f; 1474 - 0x9c; 1475 - 0x7c; 1476 - 0xbd; 1477 - 0x89; 1478 - 0x4b; 1479 - 0x22; 1480 - 0x19; 1481 - 0x26; 1482 - 0xba; 1483 - 0xab; 1484 - 0xa2; 1485 - 0x5e; 1486 - 0xc3; 1487 - 0x55; 1488 - 0xe9; 1489 - 0x32; 1490 - 0x0b; 1491 - 0x3b; 1492 - 0x00; 1493 - 0x01; 1494 - 0x02; 1495 - 0x01; 1496 - 0x00; 1497 - 0x4e; 1498 - 0x72; 1499 - 0x1e; 1500 - 0x54; 1501 - 0x1d; 1502 - 0x3b; 1503 - 0x3c; 1504 - 0xad; 1505 - 0xc7; 1506 - 0x42; 1507 - 0xf4; 1508 - 0x2b; 1509 - 0xcc; 1510 - 0xce; 1511 - 0xc9; 1512 - 0x71; 1513 - 0x4a; 1514 - 0x85; 1515 - 0xa1; 1516 - 0x21; 1517 - 0xda; 1518 - 0x81; 1519 - 0x40; 1520 - 0x6a; 1521 - 0xeb; 1522 - 0x8a; 1523 - 0x0a; 1524 - 0x0f; 1525 - 0xca; 1526 - 0x73; 1527 - 0x32; 1528 - 0x5f; 1529 - 0xa9; 1530 - 0x5c; 1531 - 0x24; 1532 - 0x21; 1533 - 0x1d; 1534 - 0x1d; 1535 - 0xd6; 1536 - 0x10; 1537 - 0xe0; 1538 - 0x7f; 1539 - 0x9e; 1540 - 0xc4; 1541 - 0x86; 1542 - 0x2f; 1543 - 0xa3; 1544 - 0xcc; 1545 - 0xc2; 1546 - 0x60; 1547 - 0x5d; 1548 - 0xed; 1549 - 0x7f; 1550 - 0x7d; 1551 - 0xb7; 1552 - 0xa2; 1553 - 0x96; 1554 - 0x4f; 1555 - 0xe6; 1556 - 0x81; 1557 - 0x1b; 1558 - 0x29; 1559 - 0xf9; 1560 - 0xf4; 1561 - 0xc1; 1562 - 0x00; 1563 - 0x46; 1564 - 0x68; 1565 - 0x4d; 1566 - 0x72; 1567 - 0x0e; 1568 - 0x36; 1569 - 0x21; 1570 - 0xc3; 1571 - 0x46; 1572 - 0xf2; 1573 - 0x81; 1574 - 0x83; 1575 - 0xed; 1576 - 0x30; 1577 - 0x89; 1578 - 0x3f; 1579 - 0xd8; 1580 - 0x98; 1581 - 0x39; 1582 - 0xe5; 1583 - 0x46; 1584 - 0x90; 1585 - 0xeb; 1586 - 0x68; 1587 - 0xe6; 1588 - 0x3b; 1589 - 0x8f; 1590 - 0xc5; 1591 - 0xd3; 1592 - 0xa7; 1593 - 0xfe; 1594 - 0x87; 1595 - 0xd7; 1596 - 0x14; 1597 - 0x33; 1598 - 0x5b; 1599 - 0x70; 1600 - 0x82; 1601 - 0x82; 1602 - 0x57; 1603 - 0x2f; 1604 - 0xd8; 1605 - 0xb2; 1606 - 0x91; 1607 - 0xc3; 1608 - 0xe5; 1609 - 0x19; 1610 - 0x15; 1611 - 0x5b; 1612 - 0x76; 1613 - 0xe6; 1614 - 0x94; 1615 - 0x1a; 1616 - 0xe9; 1617 - 0x11; 1618 - 0x2c; 1619 - 0xa5; 1620 - 0x57; 1621 - 0x55; 1622 - 0xf0; 1623 - 0x20; 1624 - 0x36; 1625 - 0xc9; 1626 - 0xe1; 1627 - 0x32; 1628 - 0x94; 1629 - 0x26; 1630 - 0x47; 1631 - 0xb8; 1632 - 0x10; 1633 - 0x40; 1634 - 0xc0; 1635 - 0x47; 1636 - 0xf6; 1637 - 0x66; 1638 - 0x53; 1639 - 0x49; 1640 - 0xe3; 1641 - 0x85; 1642 - 0xe1; 1643 - 0x0e; 1644 - 0x1e; 1645 - 0xba; 1646 - 0xc0; 1647 - 0xb8; 1648 - 0x97; 1649 - 0x8b; 1650 - 0x16; 1651 - 0x8e; 1652 - 0x48; 1653 - 0x71; 1654 - 0xdd; 1655 - 0x88; 1656 - 0x3a; 1657 - 0x8b; 1658 - 0x21; 1659 - 0x89; 1660 - 0xeb; 1661 - 0x28; 1662 - 0x8d; 1663 - 0xaa; 1664 - 0x97; 1665 - 0xcf; 1666 - 0x4a; 1667 - 0x45; 1668 - 0xa4; 1669 - 0xb8; 1670 - 0x7d; 1671 - 0x0f; 1672 - 0x1e; 1673 - 0x29; 1674 - 0xc1; 1675 - 0xe2; 1676 - 0xc3; 1677 - 0x75; 1678 - 0x43; 1679 - 0xb5; 1680 - 0xbf; 1681 - 0xcf; 1682 - 0x14; 1683 - 0xa4; 1684 - 0xea; 1685 - 0x3e; 1686 - 0xe5; 1687 - 0x94; 1688 - 0x0c; 1689 - 0x32; 1690 - 0x8a; 1691 - 0x91; 1692 - 0xcb; 1693 - 0x47; 1694 - 0x7f; 1695 - 0x23; 1696 - 0x5b; 1697 - 0xe9; 1698 - 0x79; 1699 - 0x96; 1700 - 0x7c; 1701 - 0xdb; 1702 - 0xbc; 1703 - 0x32; 1704 - 0xce; 1705 - 0x96; 1706 - 0xb5; 1707 - 0x34; 1708 - 0x68; 1709 - 0x94; 1710 - 0xbf; 1711 - 0x4f; 1712 - 0xd7; 1713 - 0x16; 1714 - 0x74; 1715 - 0x4c; 1716 - 0x52; 1717 - 0xf2; 1718 - 0x04; 1719 - 0xfb; 1720 - 0x6a; 1721 - 0xe6; 1722 - 0xb9; 1723 - 0x07; 1724 - 0x7c; 1725 - 0x8f; 1726 - 0x62; 1727 - 0xdf; 1728 - 0x13; 1729 - 0xb7; 1730 - 0x3e; 1731 - 0xd6; 1732 - 0x85; 1733 - 0x12; 1734 - 0x46; 1735 - 0xfd; 1736 - 0xb8; 1737 - 0x2b; 1738 - 0x30; 1739 - 0x5e; 1740 - 0x16; 1741 - 0x25; 1742 - 0x8e; 1743 - 0x2a; 1744 - 0x20; 1745 - 0x01; 1746 - 0x07; 1747 - 0xe8; 1748 - 0x5f; 1749 - 0x0d; 1750 - 0x77; 1751 - 0x08; 1752 - 0xd5; 1753 - ]; 1754 - [ 1755 - 0x00; 1756 - 0x80; 1757 - 0xbb; 1758 - 0xbc; 1759 - 0x2d; 1760 - 0xca; 1761 - 0xd8; 1762 - 0x46; 1763 - 0x74; 1764 - 0x90; 1765 - 0x7c; 1766 - 0x43; 1767 - 0xfc; 1768 - 0xf5; 1769 - 0x80; 1770 - 0xe9; 1771 - 0xcf; 1772 - 0xdb; 1773 - 0xd9; 1774 - 0x58; 1775 - 0xa3; 1776 - 0xf5; 1777 - 0x68; 1778 - 0xb4; 1779 - 0x2d; 1780 - 0x4b; 1781 - 0x08; 1782 - 0xee; 1783 - 0xd4; 1784 - 0xeb; 1785 - 0x0f; 1786 - 0xb3; 1787 - 0x50; 1788 - 0x4c; 1789 - 0x6c; 1790 - 0x03; 1791 - 0x02; 1792 - 0x76; 1793 - 0xe7; 1794 - 0x10; 1795 - 0x80; 1796 - 0x0c; 1797 - 0x5c; 1798 - 0xcb; 1799 - 0xba; 1800 - 0xa8; 1801 - 0x92; 1802 - 0x26; 1803 - 0x14; 1804 - 0xc5; 1805 - 0xbe; 1806 - 0xec; 1807 - 0xa5; 1808 - 0x65; 1809 - 0xa5; 1810 - 0xfd; 1811 - 0xf1; 1812 - 0xd2; 1813 - 0x87; 1814 - 0xa2; 1815 - 0xbc; 1816 - 0x04; 1817 - 0x9b; 1818 - 0xe6; 1819 - 0x77; 1820 - 0x80; 1821 - 0x60; 1822 - 0xe9; 1823 - 0x1a; 1824 - 0x92; 1825 - 0xa7; 1826 - 0x57; 1827 - 0xe3; 1828 - 0x04; 1829 - 0x8f; 1830 - 0x68; 1831 - 0xb0; 1832 - 0x76; 1833 - 0xf7; 1834 - 0xd3; 1835 - 0x6c; 1836 - 0xc8; 1837 - 0xf2; 1838 - 0x9b; 1839 - 0xa5; 1840 - 0xdf; 1841 - 0x81; 1842 - 0xdc; 1843 - 0x2c; 1844 - 0xa7; 1845 - 0x25; 1846 - 0xec; 1847 - 0xe6; 1848 - 0x62; 1849 - 0x70; 1850 - 0xcc; 1851 - 0x9a; 1852 - 0x50; 1853 - 0x35; 1854 - 0xd8; 1855 - 0xce; 1856 - 0xce; 1857 - 0xef; 1858 - 0x9e; 1859 - 0xa0; 1860 - 0x27; 1861 - 0x4a; 1862 - 0x63; 1863 - 0xab; 1864 - 0x1e; 1865 - 0x58; 1866 - 0xfa; 1867 - 0xfd; 1868 - 0x49; 1869 - 0x88; 1870 - 0xd0; 1871 - 0xf6; 1872 - 0x5d; 1873 - 0x14; 1874 - 0x67; 1875 - 0x57; 1876 - 0xda; 1877 - 0x07; 1878 - 0x1d; 1879 - 0xf0; 1880 - 0x45; 1881 - 0xcf; 1882 - 0xe1; 1883 - 0x6b; 1884 - 0x9b; 1885 - 0x00; 1886 - 0x01; 1887 - 0x02; 1888 - 0x00; 1889 - 0x80; 1890 - 0x4a; 1891 - 0x2d; 1892 - 0x33; 1893 - 0x76; 1894 - 0x4d; 1895 - 0x32; 1896 - 0x70; 1897 - 0xf1; 1898 - 0x94; 1899 - 0x1a; 1900 - 0xc1; 1901 - 0x35; 1902 - 0x63; 1903 - 0x97; 1904 - 0x62; 1905 - 0xca; 1906 - 0xcc; 1907 - 0xd6; 1908 - 0x2d; 1909 - 0xfd; 1910 - 0x23; 1911 - 0x2d; 1912 - 0x3a; 1913 - 0x71; 1914 - 0x03; 1915 - 0xc4; 1916 - 0x9d; 1917 - 0x42; 1918 - 0x93; 1919 - 0x78; 1920 - 0x8c; 1921 - 0x32; 1922 - 0xc4; 1923 - 0x8b; 1924 - 0x0d; 1925 - 0xad; 1926 - 0xdd; 1927 - 0xe2; 1928 - 0x30; 1929 - 0x96; 1930 - 0xf1; 1931 - 0xb9; 1932 - 0xef; 1933 - 0x16; 1934 - 0x72; 1935 - 0x2e; 1936 - 0x6d; 1937 - 0x1f; 1938 - 0xb9; 1939 - 0x92; 1940 - 0x5d; 1941 - 0x17; 1942 - 0xc5; 1943 - 0x0f; 1944 - 0x2b; 1945 - 0x07; 1946 - 0xc8; 1947 - 0xae; 1948 - 0xf7; 1949 - 0x60; 1950 - 0x3d; 1951 - 0x53; 1952 - 0x62; 1953 - 0x2e; 1954 - 0xb5; 1955 - 0xe3; 1956 - 0x0b; 1957 - 0x20; 1958 - 0x67; 1959 - 0xb1; 1960 - 0xdf; 1961 - 0x57; 1962 - 0x14; 1963 - 0x59; 1964 - 0xff; 1965 - 0xca; 1966 - 0xe6; 1967 - 0x72; 1968 - 0x5d; 1969 - 0xd7; 1970 - 0x1a; 1971 - 0x98; 1972 - 0x1e; 1973 - 0xa1; 1974 - 0x2b; 1975 - 0xce; 1976 - 0xf7; 1977 - 0x9e; 1978 - 0xcf; 1979 - 0x45; 1980 - 0x41; 1981 - 0xa4; 1982 - 0xa8; 1983 - 0xdc; 1984 - 0x98; 1985 - 0xf7; 1986 - 0x0d; 1987 - 0x98; 1988 - 0xf3; 1989 - 0x47; 1990 - 0x7a; 1991 - 0xe3; 1992 - 0x25; 1993 - 0x41; 1994 - 0x02; 1995 - 0x31; 1996 - 0x26; 1997 - 0x1f; 1998 - 0x4d; 1999 - 0xbb; 2000 - 0x36; 2001 - 0xcd; 2002 - 0xcc; 2003 - 0x64; 2004 - 0x74; 2005 - 0xae; 2006 - 0xb5; 2007 - 0x19; 2008 - 0xd9; 2009 - 0xa3; 2010 - 0xd6; 2011 - 0x89; 2012 - 0x6f; 2013 - 0x9d; 2014 - 0x02; 2015 - 0xd4; 2016 - 0x52; 2017 - 0xdd; 2018 - ]; 2019 - [ 2020 - 0x00; 2021 - 0x80; 2022 - 0xbb; 2023 - 0xbc; 2024 - 0x2d; 2025 - 0xca; 2026 - 0xd8; 2027 - 0x46; 2028 - 0x74; 2029 - 0x90; 2030 - 0x7c; 2031 - 0x43; 2032 - 0xfc; 2033 - 0xf5; 2034 - 0x80; 2035 - 0xe9; 2036 - 0xcf; 2037 - 0xdb; 2038 - 0xd9; 2039 - 0x58; 2040 - 0xa3; 2041 - 0xf5; 2042 - 0x68; 2043 - 0xb4; 2044 - 0x2d; 2045 - 0x4b; 2046 - 0x08; 2047 - 0xee; 2048 - 0xd4; 2049 - 0xeb; 2050 - 0x0f; 2051 - 0xb3; 2052 - 0x50; 2053 - 0x4c; 2054 - 0x6c; 2055 - 0x03; 2056 - 0x02; 2057 - 0x76; 2058 - 0xe7; 2059 - 0x10; 2060 - 0x80; 2061 - 0x0c; 2062 - 0x5c; 2063 - 0xcb; 2064 - 0xba; 2065 - 0xa8; 2066 - 0x92; 2067 - 0x26; 2068 - 0x14; 2069 - 0xc5; 2070 - 0xbe; 2071 - 0xec; 2072 - 0xa5; 2073 - 0x65; 2074 - 0xa5; 2075 - 0xfd; 2076 - 0xf1; 2077 - 0xd2; 2078 - 0x87; 2079 - 0xa2; 2080 - 0xbc; 2081 - 0x04; 2082 - 0x9b; 2083 - 0xe6; 2084 - 0x77; 2085 - 0x80; 2086 - 0x60; 2087 - 0xe9; 2088 - 0x1a; 2089 - 0x92; 2090 - 0xa7; 2091 - 0x57; 2092 - 0xe3; 2093 - 0x04; 2094 - 0x8f; 2095 - 0x68; 2096 - 0xb0; 2097 - 0x76; 2098 - 0xf7; 2099 - 0xd3; 2100 - 0x6c; 2101 - 0xc8; 2102 - 0xf2; 2103 - 0x9b; 2104 - 0xa5; 2105 - 0xdf; 2106 - 0x81; 2107 - 0xdc; 2108 - 0x2c; 2109 - 0xa7; 2110 - 0x25; 2111 - 0xec; 2112 - 0xe6; 2113 - 0x62; 2114 - 0x70; 2115 - 0xcc; 2116 - 0x9a; 2117 - 0x50; 2118 - 0x35; 2119 - 0xd8; 2120 - 0xce; 2121 - 0xce; 2122 - 0xef; 2123 - 0x9e; 2124 - 0xa0; 2125 - 0x27; 2126 - 0x4a; 2127 - 0x63; 2128 - 0xab; 2129 - 0x1e; 2130 - 0x58; 2131 - 0xfa; 2132 - 0xfd; 2133 - 0x49; 2134 - 0x88; 2135 - 0xd0; 2136 - 0xf6; 2137 - 0x5d; 2138 - 0x14; 2139 - 0x67; 2140 - 0x57; 2141 - 0xda; 2142 - 0x07; 2143 - 0x1d; 2144 - 0xf0; 2145 - 0x45; 2146 - 0xcf; 2147 - 0xe1; 2148 - 0x6b; 2149 - 0x9b; 2150 - 0x00; 2151 - 0x01; 2152 - 0x02; 2153 - 0x00; 2154 - 0x80; 2155 - 0x0c; 2156 - 0x00; 2157 - 0xda; 2158 - 0x79; 2159 - 0x24; 2160 - 0x02; 2161 - 0x33; 2162 - 0x29; 2163 - 0xf5; 2164 - 0x81; 2165 - 0xc4; 2166 - 0x67; 2167 - 0x5a; 2168 - 0x03; 2169 - 0x2b; 2170 - 0xbf; 2171 - 0xaf; 2172 - 0xd6; 2173 - 0x76; 2174 - 0xdd; 2175 - 0x26; 2176 - 0xdc; 2177 - 0xd4; 2178 - 0x38; 2179 - 0x35; 2180 - 0xc1; 2181 - 0x7f; 2182 - 0x3a; 2183 - 0x9e; 2184 - 0x02; 2185 - 0x31; 2186 - 0x73; 2187 - 0x17; 2188 - 0xf2; 2189 - 0x68; 2190 - 0x5f; 2191 - 0xd4; 2192 - 0xf0; 2193 - 0x6a; 2194 - 0x97; 2195 - 0x51; 2196 - 0xb2; 2197 - 0x42; 2198 - 0xb4; 2199 - 0x8d; 2200 - 0x35; 2201 - 0x89; 2202 - 0x29; 2203 - 0x96; 2204 - 0x27; 2205 - 0xf7; 2206 - 0x89; 2207 - 0x59; 2208 - 0x9b; 2209 - 0x93; 2210 - 0xb0; 2211 - 0x4f; 2212 - 0x85; 2213 - 0x28; 2214 - 0xfa; 2215 - 0x10; 2216 - 0xe7; 2217 - 0x15; 2218 - 0x09; 2219 - 0x71; 2220 - 0x10; 2221 - 0x36; 2222 - 0x01; 2223 - 0x60; 2224 - 0xcf; 2225 - 0xe0; 2226 - 0x37; 2227 - 0xbb; 2228 - 0xfd; 2229 - 0xcd; 2230 - 0xc3; 2231 - 0x9e; 2232 - 0x27; 2233 - 0xf8; 2234 - 0xf4; 2235 - 0x90; 2236 - 0xcd; 2237 - 0x87; 2238 - 0xd9; 2239 - 0x5c; 2240 - 0x92; 2241 - 0x08; 2242 - 0x44; 2243 - 0x32; 2244 - 0xb5; 2245 - 0x2b; 2246 - 0xe2; 2247 - 0xa5; 2248 - 0x72; 2249 - 0xde; 2250 - 0x97; 2251 - 0x0c; 2252 - 0x4f; 2253 - 0xc7; 2254 - 0x60; 2255 - 0x8d; 2256 - 0xe7; 2257 - 0xcf; 2258 - 0x64; 2259 - 0xba; 2260 - 0x7e; 2261 - 0x0d; 2262 - 0x0f; 2263 - 0x91; 2264 - 0x58; 2265 - 0x0d; 2266 - 0x47; 2267 - 0x6c; 2268 - 0x3f; 2269 - 0xb8; 2270 - 0x4f; 2271 - 0xb9; 2272 - 0x02; 2273 - 0xc5; 2274 - 0xcc; 2275 - 0x72; 2276 - 0x33; 2277 - 0x33; 2278 - 0xde; 2279 - 0xf2; 2280 - 0x8f; 2281 - 0x6b; 2282 - 0x8c; 2283 - ]; 2284 - [ 2285 - 0x00; 2286 - 0x80; 2287 - 0xbb; 2288 - 0xbc; 2289 - 0x2d; 2290 - 0xca; 2291 - 0xd8; 2292 - 0x46; 2293 - 0x74; 2294 - 0x90; 2295 - 0x7c; 2296 - 0x43; 2297 - 0xfc; 2298 - 0xf5; 2299 - 0x80; 2300 - 0xe9; 2301 - 0xcf; 2302 - 0xdb; 2303 - 0xd9; 2304 - 0x58; 2305 - 0xa3; 2306 - 0xf5; 2307 - 0x68; 2308 - 0xb4; 2309 - 0x2d; 2310 - 0x4b; 2311 - 0x08; 2312 - 0xee; 2313 - 0xd4; 2314 - 0xeb; 2315 - 0x0f; 2316 - 0xb3; 2317 - 0x50; 2318 - 0x4c; 2319 - 0x6c; 2320 - 0x03; 2321 - 0x02; 2322 - 0x76; 2323 - 0xe7; 2324 - 0x10; 2325 - 0x80; 2326 - 0x0c; 2327 - 0x5c; 2328 - 0xcb; 2329 - 0xba; 2330 - 0xa8; 2331 - 0x92; 2332 - 0x26; 2333 - 0x14; 2334 - 0xc5; 2335 - 0xbe; 2336 - 0xec; 2337 - 0xa5; 2338 - 0x65; 2339 - 0xa5; 2340 - 0xfd; 2341 - 0xf1; 2342 - 0xd2; 2343 - 0x87; 2344 - 0xa2; 2345 - 0xbc; 2346 - 0x04; 2347 - 0x9b; 2348 - 0xe6; 2349 - 0x77; 2350 - 0x80; 2351 - 0x60; 2352 - 0xe9; 2353 - 0x1a; 2354 - 0x92; 2355 - 0xa7; 2356 - 0x57; 2357 - 0xe3; 2358 - 0x04; 2359 - 0x8f; 2360 - 0x68; 2361 - 0xb0; 2362 - 0x76; 2363 - 0xf7; 2364 - 0xd3; 2365 - 0x6c; 2366 - 0xc8; 2367 - 0xf2; 2368 - 0x9b; 2369 - 0xa5; 2370 - 0xdf; 2371 - 0x81; 2372 - 0xdc; 2373 - 0x2c; 2374 - 0xa7; 2375 - 0x25; 2376 - 0xec; 2377 - 0xe6; 2378 - 0x62; 2379 - 0x70; 2380 - 0xcc; 2381 - 0x9a; 2382 - 0x50; 2383 - 0x35; 2384 - 0xd8; 2385 - 0xce; 2386 - 0xce; 2387 - 0xef; 2388 - 0x9e; 2389 - 0xa0; 2390 - 0x27; 2391 - 0x4a; 2392 - 0x63; 2393 - 0xab; 2394 - 0x1e; 2395 - 0x58; 2396 - 0xfa; 2397 - 0xfd; 2398 - 0x49; 2399 - 0x88; 2400 - 0xd0; 2401 - 0xf6; 2402 - 0x5d; 2403 - 0x14; 2404 - 0x67; 2405 - 0x57; 2406 - 0xda; 2407 - 0x07; 2408 - 0x1d; 2409 - 0xf0; 2410 - 0x45; 2411 - 0xcf; 2412 - 0xe1; 2413 - 0x6b; 2414 - 0x9b; 2415 - 0x00; 2416 - 0x01; 2417 - 0x02; 2418 - 0x00; 2419 - 0x80; 2420 - 0x7e; 2421 - 0x8f; 2422 - 0xc7; 2423 - 0x38; 2424 - 0x8a; 2425 - 0xf8; 2426 - 0xdd; 2427 - 0x7a; 2428 - 0xb2; 2429 - 0x0a; 2430 - 0x07; 2431 - 0xdd; 2432 - 0x00; 2433 - 0xfb; 2434 - 0x63; 2435 - 0x58; 2436 - 0x85; 2437 - 0xde; 2438 - 0xc7; 2439 - 0x6a; 2440 - 0xe0; 2441 - 0x0a; 2442 - 0x51; 2443 - 0x06; 2444 - 0x7b; 2445 - 0x3e; 2446 - 0xfd; 2447 - 0xac; 2448 - 0xfe; 2449 - 0xe2; 2450 - 0x7a; 2451 - 0xf7; 2452 - 0x3f; 2453 - 0xcb; 2454 - 0xb2; 2455 - 0xfc; 2456 - 0x30; 2457 - 0x45; 2458 - 0xfa; 2459 - 0x2b; 2460 - 0x74; 2461 - 0xb7; 2462 - 0x2f; 2463 - 0xf5; 2464 - 0xf9; 2465 - 0x52; 2466 - 0xef; 2467 - 0x93; 2468 - 0x3f; 2469 - 0xdb; 2470 - 0x7e; 2471 - 0x00; 2472 - 0xe7; 2473 - 0xd4; 2474 - 0xa4; 2475 - 0x20; 2476 - 0xbe; 2477 - 0x2d; 2478 - 0x6f; 2479 - 0xde; 2480 - 0x28; 2481 - 0x6c; 2482 - 0x74; 2483 - 0x8b; 2484 - 0x23; 2485 - 0xc6; 2486 - 0x14; 2487 - 0xdc; 2488 - 0xb9; 2489 - 0x24; 2490 - 0xca; 2491 - 0x87; 2492 - 0xe0; 2493 - 0xe9; 2494 - 0x5e; 2495 - 0xb0; 2496 - 0x4e; 2497 - 0x55; 2498 - 0x74; 2499 - 0x54; 2500 - 0x4d; 2501 - 0x8a; 2502 - 0x21; 2503 - 0x26; 2504 - 0x62; 2505 - 0x28; 2506 - 0x2a; 2507 - 0xe6; 2508 - 0xb1; 2509 - 0x29; 2510 - 0xdc; 2511 - 0xcd; 2512 - 0xda; 2513 - 0x27; 2514 - 0xc4; 2515 - 0xcd; 2516 - 0x8d; 2517 - 0xd3; 2518 - 0x47; 2519 - 0x40; 2520 - 0x05; 2521 - 0x1f; 2522 - 0xbb; 2523 - 0x80; 2524 - 0xef; 2525 - 0xa0; 2526 - 0xf4; 2527 - 0x5a; 2528 - 0x22; 2529 - 0x7c; 2530 - 0x4a; 2531 - 0xe5; 2532 - 0xb0; 2533 - 0x59; 2534 - 0x68; 2535 - 0xa5; 2536 - 0x3e; 2537 - 0xbb; 2538 - 0x6f; 2539 - 0x62; 2540 - 0x30; 2541 - 0x20; 2542 - 0xc1; 2543 - 0x43; 2544 - 0x91; 2545 - 0xd2; 2546 - 0x79; 2547 - 0xf5; 2548 - ]; 2549 - [ 2550 - 0x00; 2551 - 0x80; 2552 - 0xbb; 2553 - 0xbc; 2554 - 0x2d; 2555 - 0xca; 2556 - 0xd8; 2557 - 0x46; 2558 - 0x74; 2559 - 0x90; 2560 - 0x7c; 2561 - 0x43; 2562 - 0xfc; 2563 - 0xf5; 2564 - 0x80; 2565 - 0xe9; 2566 - 0xcf; 2567 - 0xdb; 2568 - 0xd9; 2569 - 0x58; 2570 - 0xa3; 2571 - 0xf5; 2572 - 0x68; 2573 - 0xb4; 2574 - 0x2d; 2575 - 0x4b; 2576 - 0x08; 2577 - 0xee; 2578 - 0xd4; 2579 - 0xeb; 2580 - 0x0f; 2581 - 0xb3; 2582 - 0x50; 2583 - 0x4c; 2584 - 0x6c; 2585 - 0x03; 2586 - 0x02; 2587 - 0x76; 2588 - 0xe7; 2589 - 0x10; 2590 - 0x80; 2591 - 0x0c; 2592 - 0x5c; 2593 - 0xcb; 2594 - 0xba; 2595 - 0xa8; 2596 - 0x92; 2597 - 0x26; 2598 - 0x14; 2599 - 0xc5; 2600 - 0xbe; 2601 - 0xec; 2602 - 0xa5; 2603 - 0x65; 2604 - 0xa5; 2605 - 0xfd; 2606 - 0xf1; 2607 - 0xd2; 2608 - 0x87; 2609 - 0xa2; 2610 - 0xbc; 2611 - 0x04; 2612 - 0x9b; 2613 - 0xe6; 2614 - 0x77; 2615 - 0x80; 2616 - 0x60; 2617 - 0xe9; 2618 - 0x1a; 2619 - 0x92; 2620 - 0xa7; 2621 - 0x57; 2622 - 0xe3; 2623 - 0x04; 2624 - 0x8f; 2625 - 0x68; 2626 - 0xb0; 2627 - 0x76; 2628 - 0xf7; 2629 - 0xd3; 2630 - 0x6c; 2631 - 0xc8; 2632 - 0xf2; 2633 - 0x9b; 2634 - 0xa5; 2635 - 0xdf; 2636 - 0x81; 2637 - 0xdc; 2638 - 0x2c; 2639 - 0xa7; 2640 - 0x25; 2641 - 0xec; 2642 - 0xe6; 2643 - 0x62; 2644 - 0x70; 2645 - 0xcc; 2646 - 0x9a; 2647 - 0x50; 2648 - 0x35; 2649 - 0xd8; 2650 - 0xce; 2651 - 0xce; 2652 - 0xef; 2653 - 0x9e; 2654 - 0xa0; 2655 - 0x27; 2656 - 0x4a; 2657 - 0x63; 2658 - 0xab; 2659 - 0x1e; 2660 - 0x58; 2661 - 0xfa; 2662 - 0xfd; 2663 - 0x49; 2664 - 0x88; 2665 - 0xd0; 2666 - 0xf6; 2667 - 0x5d; 2668 - 0x14; 2669 - 0x67; 2670 - 0x57; 2671 - 0xda; 2672 - 0x07; 2673 - 0x1d; 2674 - 0xf0; 2675 - 0x45; 2676 - 0xcf; 2677 - 0xe1; 2678 - 0x6b; 2679 - 0x9b; 2680 - 0x00; 2681 - 0x01; 2682 - 0x02; 2683 - 0x00; 2684 - 0x80; 2685 - 0x73; 2686 - 0x47; 2687 - 0x2a; 2688 - 0xde; 2689 - 0x22; 2690 - 0x94; 2691 - 0x39; 2692 - 0x77; 2693 - 0x46; 2694 - 0x25; 2695 - 0xe2; 2696 - 0x2d; 2697 - 0x4f; 2698 - 0x8d; 2699 - 0x9e; 2700 - 0x99; 2701 - 0x10; 2702 - 0xa2; 2703 - 0x1a; 2704 - 0xd6; 2705 - 0xf1; 2706 - 0xe6; 2707 - 0x25; 2708 - 0x7f; 2709 - 0x76; 2710 - 0xbe; 2711 - 0x87; 2712 - 0xf6; 2713 - 0xff; 2714 - 0xce; 2715 - 0x7d; 2716 - 0xd7; 2717 - 0xd2; 2718 - 0xee; 2719 - 0xc5; 2720 - 0x01; 2721 - 0x0b; 2722 - 0x14; 2723 - 0xa1; 2724 - 0xda; 2725 - 0x0a; 2726 - 0x56; 2727 - 0x4f; 2728 - 0xff; 2729 - 0x8c; 2730 - 0xdd; 2731 - 0x84; 2732 - 0x7c; 2733 - 0xd8; 2734 - 0xcc; 2735 - 0xa8; 2736 - 0xc1; 2737 - 0xc3; 2738 - 0xa1; 2739 - 0xbf; 2740 - 0x15; 2741 - 0x38; 2742 - 0xc9; 2743 - 0x4f; 2744 - 0xc3; 2745 - 0x7b; 2746 - 0xde; 2747 - 0xf3; 2748 - 0x37; 2749 - 0xf3; 2750 - 0x2f; 2751 - 0x8e; 2752 - 0x72; 2753 - 0x4d; 2754 - 0xfb; 2755 - 0x69; 2756 - 0xc6; 2757 - 0x4d; 2758 - 0xe4; 2759 - 0x84; 2760 - 0x46; 2761 - 0x64; 2762 - 0xe1; 2763 - 0xb5; 2764 - 0x02; 2765 - 0xe8; 2766 - 0xf9; 2767 - 0xbd; 2768 - 0x94; 2769 - 0xbf; 2770 - 0x40; 2771 - 0x5e; 2772 - 0x1f; 2773 - 0xb6; 2774 - 0x39; 2775 - 0xb9; 2776 - 0x0b; 2777 - 0x1a; 2778 - 0x79; 2779 - 0xf1; 2780 - 0xa6; 2781 - 0x3d; 2782 - 0xee; 2783 - 0x7a; 2784 - 0x02; 2785 - 0xff; 2786 - 0x62; 2787 - 0x0d; 2788 - 0xc6; 2789 - 0x1e; 2790 - 0xfb; 2791 - 0x5a; 2792 - 0xcd; 2793 - 0x36; 2794 - 0xee; 2795 - 0x6d; 2796 - 0x67; 2797 - 0x5f; 2798 - 0x81; 2799 - 0xf4; 2800 - 0xde; 2801 - 0x62; 2802 - 0x15; 2803 - 0xb6; 2804 - 0x9a; 2805 - 0xf3; 2806 - 0x24; 2807 - 0xa2; 2808 - 0xb3; 2809 - 0x95; 2810 - 0xdf; 2811 - 0x6a; 2812 - 0xa2; 2813 - ]; 2814 - ] 2815 - 2816 - let good_dh_param_parser xs _ = 2817 - let buf = list_to_cstruct xs in 2818 - match Reader.parse_dh_parameters buf with 2819 - | Error _ -> assert_failure "dh params parser broken" 2820 - | Ok (_, _, rst) -> assert_equal 0 (String.length rst) 2821 - 2822 - let good_dh_params_tests = 2823 - List.mapi 2824 - (fun i f -> 2825 - "Parse good dh_param " ^ string_of_int i >:: good_dh_param_parser f) 2826 - good_dhparams 2827 - 2828 - let bad_dh_param_parser buf _ = 2829 - match Reader.parse_dh_parameters buf with 2830 - | Error _ -> () 2831 - | Ok (_, _, rst) -> 2832 - if String.length rst = 0 then assert_failure "dh params parser broken" 2833 - 2834 - let bad_dh_params_tests = 2835 - let param = list_to_cstruct (List.hd good_dhparams) in 2836 - let l = String.length param in 2837 - let bad_params = 2838 - [ 2839 - param ^ String.make 1 '\x00'; 2840 - String.sub param 2 20; 2841 - String.sub param 0 20; 2842 - list_to_cstruct [ 2 ] ^ param; 2843 - list_to_cstruct [ 0 ] ^ param; 2844 - list_to_cstruct [ 0; 1 ] ^ param; 2845 - list_to_cstruct [ 0; 0 ] ^ param; 2846 - list_to_cstruct [ 0xff; 0xff ] ^ param; 2847 - list_to_cstruct [ 0; 0xff ] ^ param; 2848 - String.sub param 1 (String.length param - 1); 2849 - String.sub param 0 (pred l); 2850 - ] 2851 - in 2852 - let lastparam = list_to_cstruct (List.nth good_dhparams 5) in 2853 - let l = String.length lastparam in 2854 - let more_bad = 2855 - [ 2856 - String.sub lastparam 0 130 2857 - ^ list_to_cstruct [ 0; 5; 1 ] 2858 - ^ String.sub lastparam 130 (l - 130); 2859 - String.sub lastparam 0 133 2860 - ^ list_to_cstruct [ 0; 5; 1 ] 2861 - ^ String.sub lastparam 133 (l - 133); 2862 - ] 2863 - in 2864 - List.mapi 2865 - (fun i f -> 2866 - "Parse bad dh_param " ^ string_of_int i >:: bad_dh_param_parser f) 2867 - (bad_params @ more_bad) 2868 - 2869 - let good_digitally_signed_1_2 = 2870 - [ 2871 - [ 2872 - 0x06; 2873 - 0x01; 2874 - 0x01; 2875 - 0x00; 2876 - 0x30; 2877 - 0x92; 2878 - 0xf4; 2879 - 0x70; 2880 - 0xb1; 2881 - 0x02; 2882 - 0x0a; 2883 - 0x51; 2884 - 0xb6; 2885 - 0x0e; 2886 - 0x49; 2887 - 0x1e; 2888 - 0x16; 2889 - 0x6d; 2890 - 0x9f; 2891 - 0xb5; 2892 - 0xfe; 2893 - 0x73; 2894 - 0x5e; 2895 - 0x2f; 2896 - 0x18; 2897 - 0xbc; 2898 - 0xf7; 2899 - 0x87; 2900 - 0xab; 2901 - 0x2c; 2902 - 0xad; 2903 - 0x7e; 2904 - 0x54; 2905 - 0x40; 2906 - 0x99; 2907 - 0x30; 2908 - 0xa2; 2909 - 0x2e; 2910 - 0x55; 2911 - 0xe0; 2912 - 0xf3; 2913 - 0x05; 2914 - 0xe1; 2915 - 0x81; 2916 - 0x67; 2917 - 0x78; 2918 - 0x49; 2919 - 0x29; 2920 - 0xe6; 2921 - 0x5d; 2922 - 0x2c; 2923 - 0x64; 2924 - 0x57; 2925 - 0xeb; 2926 - 0x8c; 2927 - 0x68; 2928 - 0x24; 2929 - 0xe1; 2930 - 0xba; 2931 - 0x69; 2932 - 0x50; 2933 - 0xc7; 2934 - 0xda; 2935 - 0x73; 2936 - 0x9a; 2937 - 0x02; 2938 - 0xe4; 2939 - 0xbc; 2940 - 0xc0; 2941 - 0x76; 2942 - 0x65; 2943 - 0xaf; 2944 - 0x31; 2945 - 0x93; 2946 - 0xbc; 2947 - 0x2f; 2948 - 0x5c; 2949 - 0xdb; 2950 - 0xa5; 2951 - 0x1d; 2952 - 0x4e; 2953 - 0xb2; 2954 - 0x75; 2955 - 0x0d; 2956 - 0xb4; 2957 - 0x22; 2958 - 0x23; 2959 - 0x05; 2960 - 0x5b; 2961 - 0x8c; 2962 - 0xa0; 2963 - 0x14; 2964 - 0x4c; 2965 - 0x64; 2966 - 0xb9; 2967 - 0x91; 2968 - 0xa6; 2969 - 0x22; 2970 - 0xc2; 2971 - 0x49; 2972 - 0xaa; 2973 - 0x41; 2974 - 0xb0; 2975 - 0x42; 2976 - 0x04; 2977 - 0x2a; 2978 - 0x03; 2979 - 0x03; 2980 - 0x1e; 2981 - 0x62; 2982 - 0x74; 2983 - 0x64; 2984 - 0x98; 2985 - 0xaf; 2986 - 0xcf; 2987 - 0x9a; 2988 - 0xd0; 2989 - 0x22; 2990 - 0xa8; 2991 - 0xf3; 2992 - 0xa5; 2993 - 0x0a; 2994 - 0x0d; 2995 - 0xe9; 2996 - 0xdc; 2997 - 0xe2; 2998 - 0x89; 2999 - 0xe5; 3000 - 0x54; 3001 - 0xa2; 3002 - 0x28; 3003 - 0x25; 3004 - 0x69; 3005 - 0x4e; 3006 - 0xe5; 3007 - 0xc3; 3008 - 0xa6; 3009 - 0x23; 3010 - 0xd2; 3011 - 0xeb; 3012 - 0x67; 3013 - 0x8a; 3014 - 0xb8; 3015 - 0x4a; 3016 - 0xac; 3017 - 0x19; 3018 - 0x1d; 3019 - 0x00; 3020 - 0xa9; 3021 - 0xec; 3022 - 0xca; 3023 - 0xeb; 3024 - 0xf9; 3025 - 0x79; 3026 - 0x2c; 3027 - 0x7c; 3028 - 0x6e; 3029 - 0x31; 3030 - 0x7f; 3031 - 0x64; 3032 - 0x64; 3033 - 0xa2; 3034 - 0xfb; 3035 - 0x93; 3036 - 0xc5; 3037 - 0x91; 3038 - 0xa2; 3039 - 0xad; 3040 - 0x8e; 3041 - 0x36; 3042 - 0x07; 3043 - 0xe8; 3044 - 0x51; 3045 - 0x0b; 3046 - 0x08; 3047 - 0x36; 3048 - 0xb7; 3049 - 0x78; 3050 - 0xac; 3051 - 0x21; 3052 - 0x3d; 3053 - 0xc9; 3054 - 0xfb; 3055 - 0xae; 3056 - 0xab; 3057 - 0xe5; 3058 - 0xd9; 3059 - 0x9c; 3060 - 0xa7; 3061 - 0xee; 3062 - 0x5e; 3063 - 0xcb; 3064 - 0xab; 3065 - 0x57; 3066 - 0x9d; 3067 - 0x62; 3068 - 0x6c; 3069 - 0x2e; 3070 - 0xbd; 3071 - 0x6d; 3072 - 0x4a; 3073 - 0xd0; 3074 - 0x36; 3075 - 0xb1; 3076 - 0xa8; 3077 - 0xf1; 3078 - 0x22; 3079 - 0xd8; 3080 - 0x97; 3081 - 0x5c; 3082 - 0x24; 3083 - 0xb3; 3084 - 0x72; 3085 - 0x55; 3086 - 0x20; 3087 - 0x39; 3088 - 0x29; 3089 - 0x26; 3090 - 0x51; 3091 - 0x3b; 3092 - 0x9c; 3093 - 0x48; 3094 - 0x80; 3095 - 0x25; 3096 - 0xa9; 3097 - 0xf4; 3098 - 0xc1; 3099 - 0xb0; 3100 - 0x57; 3101 - 0xd8; 3102 - 0x3f; 3103 - 0x54; 3104 - 0x5e; 3105 - 0x99; 3106 - 0x27; 3107 - 0x36; 3108 - 0x81; 3109 - 0xcd; 3110 - 0x23; 3111 - 0xf6; 3112 - 0xaa; 3113 - 0x84; 3114 - 0x98; 3115 - 0xf8; 3116 - 0x66; 3117 - 0x79; 3118 - 0xe1; 3119 - 0x16; 3120 - 0xb9; 3121 - 0xeb; 3122 - 0xc6; 3123 - 0x9a; 3124 - 0x86; 3125 - 0x90; 3126 - 0xa6; 3127 - 0xa2; 3128 - 0x9d; 3129 - 0x0d; 3130 - 0x86; 3131 - 0x32; 3132 - ]; 3133 - [ 3134 - 0x06; 3135 - 0x01; 3136 - 0x01; 3137 - 0x00; 3138 - 0x8e; 3139 - 0x02; 3140 - 0x51; 3141 - 0x93; 3142 - 0x67; 3143 - 0xe8; 3144 - 0x68; 3145 - 0xfe; 3146 - 0x65; 3147 - 0x61; 3148 - 0xda; 3149 - 0xf0; 3150 - 0x25; 3151 - 0x1a; 3152 - 0x19; 3153 - 0x5a; 3154 - 0x36; 3155 - 0x42; 3156 - 0x11; 3157 - 0xdd; 3158 - 0x00; 3159 - 0x2b; 3160 - 0xf2; 3161 - 0x38; 3162 - 0x98; 3163 - 0xef; 3164 - 0x94; 3165 - 0x42; 3166 - 0xac; 3167 - 0x3d; 3168 - 0x82; 3169 - 0xc7; 3170 - 0x85; 3171 - 0x72; 3172 - 0xf3; 3173 - 0xb7; 3174 - 0x73; 3175 - 0x4d; 3176 - 0x6b; 3177 - 0x64; 3178 - 0x66; 3179 - 0x6a; 3180 - 0x89; 3181 - 0x6d; 3182 - 0x95; 3183 - 0x67; 3184 - 0xdb; 3185 - 0xb7; 3186 - 0x83; 3187 - 0x1e; 3188 - 0xb1; 3189 - 0x7c; 3190 - 0xf4; 3191 - 0xb9; 3192 - 0x60; 3193 - 0xbd; 3194 - 0x91; 3195 - 0x26; 3196 - 0xe0; 3197 - 0x4c; 3198 - 0x6c; 3199 - 0x92; 3200 - 0xc7; 3201 - 0xc4; 3202 - 0x8b; 3203 - 0xb5; 3204 - 0x8d; 3205 - 0xaf; 3206 - 0xfd; 3207 - 0xaa; 3208 - 0xd9; 3209 - 0xcc; 3210 - 0x2f; 3211 - 0xaf; 3212 - 0x6b; 3213 - 0x18; 3214 - 0xf7; 3215 - 0x4f; 3216 - 0xcd; 3217 - 0x8d; 3218 - 0x54; 3219 - 0xe1; 3220 - 0x70; 3221 - 0x5c; 3222 - 0xa9; 3223 - 0xec; 3224 - 0x85; 3225 - 0xd9; 3226 - 0x7b; 3227 - 0x5b; 3228 - 0xa2; 3229 - 0x9a; 3230 - 0x55; 3231 - 0xc2; 3232 - 0x5a; 3233 - 0x87; 3234 - 0xd4; 3235 - 0xbe; 3236 - 0x49; 3237 - 0xf2; 3238 - 0x03; 3239 - 0x95; 3240 - 0x50; 3241 - 0x5f; 3242 - 0x62; 3243 - 0xa7; 3244 - 0x4d; 3245 - 0x13; 3246 - 0x29; 3247 - 0xae; 3248 - 0x19; 3249 - 0xcc; 3250 - 0x2e; 3251 - 0x21; 3252 - 0x9b; 3253 - 0x36; 3254 - 0x60; 3255 - 0xc4; 3256 - 0xd7; 3257 - 0x5a; 3258 - 0x8f; 3259 - 0xe2; 3260 - 0x67; 3261 - 0x73; 3262 - 0x22; 3263 - 0x85; 3264 - 0x66; 3265 - 0xbb; 3266 - 0x00; 3267 - 0x00; 3268 - 0x97; 3269 - 0x10; 3270 - 0xbc; 3271 - 0x19; 3272 - 0x16; 3273 - 0xce; 3274 - 0x14; 3275 - 0x8e; 3276 - 0x27; 3277 - 0x1e; 3278 - 0x79; 3279 - 0x3e; 3280 - 0xbd; 3281 - 0xc3; 3282 - 0xc9; 3283 - 0x5c; 3284 - 0xc2; 3285 - 0xbf; 3286 - 0x7b; 3287 - 0x83; 3288 - 0xba; 3289 - 0x00; 3290 - 0x20; 3291 - 0x18; 3292 - 0x54; 3293 - 0x0b; 3294 - 0x09; 3295 - 0x11; 3296 - 0xb3; 3297 - 0x0b; 3298 - 0x75; 3299 - 0x7d; 3300 - 0xf6; 3301 - 0xc7; 3302 - 0x80; 3303 - 0x76; 3304 - 0x25; 3305 - 0x3c; 3306 - 0x3b; 3307 - 0xdb; 3308 - 0x67; 3309 - 0xc5; 3310 - 0xe7; 3311 - 0x77; 3312 - 0x0a; 3313 - 0xe1; 3314 - 0xbf; 3315 - 0xd9; 3316 - 0xc2; 3317 - 0x6c; 3318 - 0xc2; 3319 - 0x3f; 3320 - 0x37; 3321 - 0x4b; 3322 - 0xcf; 3323 - 0x6c; 3324 - 0x64; 3325 - 0x53; 3326 - 0x4a; 3327 - 0xf3; 3328 - 0x81; 3329 - 0x6d; 3330 - 0xd8; 3331 - 0x13; 3332 - 0xce; 3333 - 0xb4; 3334 - 0x84; 3335 - 0x42; 3336 - 0x7b; 3337 - 0x73; 3338 - 0x85; 3339 - 0x11; 3340 - 0xaa; 3341 - 0x0e; 3342 - 0x39; 3343 - 0xd8; 3344 - 0x99; 3345 - 0x76; 3346 - 0x5e; 3347 - 0xe8; 3348 - 0xe0; 3349 - 0xbc; 3350 - 0x08; 3351 - 0xe6; 3352 - 0x7b; 3353 - 0xba; 3354 - 0xc9; 3355 - 0x6e; 3356 - 0xdd; 3357 - 0x63; 3358 - 0x38; 3359 - 0xca; 3360 - 0x5b; 3361 - 0x8b; 3362 - 0x74; 3363 - 0xed; 3364 - 0x52; 3365 - 0x04; 3366 - 0xe3; 3367 - 0x64; 3368 - 0xe6; 3369 - 0xdc; 3370 - 0xfa; 3371 - 0x1d; 3372 - 0x46; 3373 - 0xca; 3374 - 0x5d; 3375 - 0xf8; 3376 - 0x18; 3377 - 0x3e; 3378 - 0xa7; 3379 - 0x39; 3380 - 0x7e; 3381 - 0x19; 3382 - 0xb9; 3383 - 0x2f; 3384 - 0x87; 3385 - 0x5b; 3386 - 0x2a; 3387 - 0x55; 3388 - 0x85; 3389 - 0xe5; 3390 - 0x9e; 3391 - 0x92; 3392 - 0x6b; 3393 - 0x62; 3394 - ]; 3395 - [ 3396 - 0x06; 3397 - 0x01; 3398 - 0x01; 3399 - 0x00; 3400 - 0x2b; 3401 - 0x5b; 3402 - 0x89; 3403 - 0xfa; 3404 - 0x67; 3405 - 0x4b; 3406 - 0x58; 3407 - 0x45; 3408 - 0xd4; 3409 - 0x8f; 3410 - 0x22; 3411 - 0x4b; 3412 - 0x53; 3413 - 0x3b; 3414 - 0x92; 3415 - 0x2b; 3416 - 0x37; 3417 - 0x18; 3418 - 0xcd; 3419 - 0x05; 3420 - 0xda; 3421 - 0xb5; 3422 - 0x85; 3423 - 0x11; 3424 - 0x23; 3425 - 0x12; 3426 - 0xdc; 3427 - 0x18; 3428 - 0xb5; 3429 - 0x9f; 3430 - 0xb0; 3431 - 0x45; 3432 - 0x16; 3433 - 0xf3; 3434 - 0x1c; 3435 - 0xf8; 3436 - 0x93; 3437 - 0xb8; 3438 - 0x8c; 3439 - 0x37; 3440 - 0xd5; 3441 - 0x60; 3442 - 0x68; 3443 - 0xee; 3444 - 0x75; 3445 - 0x53; 3446 - 0xa9; 3447 - 0x5f; 3448 - 0x22; 3449 - 0x4e; 3450 - 0x01; 3451 - 0x2b; 3452 - 0xb3; 3453 - 0xb6; 3454 - 0x3e; 3455 - 0x29; 3456 - 0xba; 3457 - 0x2c; 3458 - 0xef; 3459 - 0xa8; 3460 - 0x3f; 3461 - 0x07; 3462 - 0xa3; 3463 - 0xfb; 3464 - 0x91; 3465 - 0xf8; 3466 - 0x2c; 3467 - 0x8d; 3468 - 0x23; 3469 - 0xe3; 3470 - 0x8d; 3471 - 0x26; 3472 - 0x26; 3473 - 0x11; 3474 - 0xa4; 3475 - 0xd9; 3476 - 0xa0; 3477 - 0xa4; 3478 - 0x10; 3479 - 0x11; 3480 - 0x40; 3481 - 0x1a; 3482 - 0xad; 3483 - 0xc3; 3484 - 0xa4; 3485 - 0x99; 3486 - 0x5a; 3487 - 0xae; 3488 - 0x97; 3489 - 0xae; 3490 - 0x9b; 3491 - 0x39; 3492 - 0xdc; 3493 - 0x98; 3494 - 0xb3; 3495 - 0x34; 3496 - 0xe7; 3497 - 0x08; 3498 - 0xb4; 3499 - 0x5f; 3500 - 0xae; 3501 - 0xa1; 3502 - 0xf7; 3503 - 0x79; 3504 - 0x92; 3505 - 0xd3; 3506 - 0x8d; 3507 - 0x23; 3508 - 0x47; 3509 - 0xa4; 3510 - 0x8d; 3511 - 0xa8; 3512 - 0x1a; 3513 - 0x4a; 3514 - 0xae; 3515 - 0x10; 3516 - 0xd7; 3517 - 0xf8; 3518 - 0xe0; 3519 - 0x7a; 3520 - 0xf4; 3521 - 0x52; 3522 - 0x5a; 3523 - 0xb0; 3524 - 0xc3; 3525 - 0x6f; 3526 - 0x5a; 3527 - 0x8a; 3528 - 0x94; 3529 - 0x75; 3530 - 0xbf; 3531 - 0x27; 3532 - 0xc1; 3533 - 0xbb; 3534 - 0xb0; 3535 - 0x5c; 3536 - 0x66; 3537 - 0x66; 3538 - 0x60; 3539 - 0x0d; 3540 - 0xdd; 3541 - 0xa8; 3542 - 0xcf; 3543 - 0x1b; 3544 - 0xee; 3545 - 0x6f; 3546 - 0x33; 3547 - 0x63; 3548 - 0xec; 3549 - 0xaa; 3550 - 0x16; 3551 - 0x15; 3552 - 0x3a; 3553 - 0xcc; 3554 - 0x72; 3555 - 0x6f; 3556 - 0x9e; 3557 - 0xc1; 3558 - 0x06; 3559 - 0xf3; 3560 - 0x45; 3561 - 0xec; 3562 - 0x7f; 3563 - 0x6b; 3564 - 0x17; 3565 - 0xab; 3566 - 0xce; 3567 - 0x63; 3568 - 0x15; 3569 - 0x8c; 3570 - 0x0e; 3571 - 0x61; 3572 - 0x98; 3573 - 0xd9; 3574 - 0xc4; 3575 - 0x68; 3576 - 0xba; 3577 - 0x56; 3578 - 0x88; 3579 - 0x0a; 3580 - 0x46; 3581 - 0xcc; 3582 - 0x0c; 3583 - 0xd9; 3584 - 0x09; 3585 - 0xea; 3586 - 0x8f; 3587 - 0xdb; 3588 - 0x28; 3589 - 0x35; 3590 - 0x16; 3591 - 0xa2; 3592 - 0x5d; 3593 - 0xfb; 3594 - 0xc2; 3595 - 0x93; 3596 - 0xf3; 3597 - 0xa5; 3598 - 0x53; 3599 - 0xe4; 3600 - 0x94; 3601 - 0xda; 3602 - 0x45; 3603 - 0xa9; 3604 - 0x81; 3605 - 0x0c; 3606 - 0x43; 3607 - 0x45; 3608 - 0x67; 3609 - 0xef; 3610 - 0x70; 3611 - 0x4a; 3612 - 0x06; 3613 - 0x67; 3614 - 0xb1; 3615 - 0xb6; 3616 - 0x30; 3617 - 0x19; 3618 - 0x16; 3619 - 0xb1; 3620 - 0xeb; 3621 - 0x28; 3622 - 0x3c; 3623 - 0x8b; 3624 - 0x13; 3625 - 0x94; 3626 - 0x1a; 3627 - 0x79; 3628 - 0x8c; 3629 - 0x92; 3630 - 0x7b; 3631 - 0xe0; 3632 - 0xfb; 3633 - 0xea; 3634 - 0xd1; 3635 - 0xfc; 3636 - 0x50; 3637 - 0xf8; 3638 - 0xb7; 3639 - 0x86; 3640 - 0x76; 3641 - 0xa1; 3642 - 0x69; 3643 - 0x81; 3644 - 0x3e; 3645 - 0xb1; 3646 - 0x88; 3647 - 0xf5; 3648 - 0xa7; 3649 - 0x05; 3650 - 0xe9; 3651 - 0xe1; 3652 - 0xd1; 3653 - 0x9e; 3654 - 0xbc; 3655 - 0x15; 3656 - ]; 3657 - [ 3658 - 0x06; 3659 - 0x01; 3660 - 0x01; 3661 - 0x00; 3662 - 0x6c; 3663 - 0x1b; 3664 - 0xe8; 3665 - 0x31; 3666 - 0x7b; 3667 - 0xab; 3668 - 0x2b; 3669 - 0x5f; 3670 - 0xa0; 3671 - 0x9f; 3672 - 0x6d; 3673 - 0x73; 3674 - 0x43; 3675 - 0x83; 3676 - 0x67; 3677 - 0xd2; 3678 - 0x85; 3679 - 0xae; 3680 - 0x85; 3681 - 0x56; 3682 - 0x65; 3683 - 0x6a; 3684 - 0xf9; 3685 - 0x82; 3686 - 0xc0; 3687 - 0x29; 3688 - 0x48; 3689 - 0x28; 3690 - 0x9d; 3691 - 0xd9; 3692 - 0x2a; 3693 - 0x23; 3694 - 0xea; 3695 - 0x8d; 3696 - 0x0c; 3697 - 0xc2; 3698 - 0x9e; 3699 - 0x8f; 3700 - 0x84; 3701 - 0xb6; 3702 - 0x74; 3703 - 0x5d; 3704 - 0xaf; 3705 - 0xdf; 3706 - 0x0a; 3707 - 0x39; 3708 - 0x5f; 3709 - 0x4a; 3710 - 0x2c; 3711 - 0xa0; 3712 - 0xb8; 3713 - 0x02; 3714 - 0x20; 3715 - 0xa6; 3716 - 0x33; 3717 - 0x3f; 3718 - 0x22; 3719 - 0x2b; 3720 - 0x38; 3721 - 0x49; 3722 - 0x5f; 3723 - 0x21; 3724 - 0xea; 3725 - 0x62; 3726 - 0x1a; 3727 - 0x73; 3728 - 0xe4; 3729 - 0x0a; 3730 - 0x1f; 3731 - 0xf5; 3732 - 0xe0; 3733 - 0x89; 3734 - 0x8c; 3735 - 0xb3; 3736 - 0xdd; 3737 - 0xf4; 3738 - 0xef; 3739 - 0xc8; 3740 - 0x35; 3741 - 0x8f; 3742 - 0x60; 3743 - 0xa2; 3744 - 0x4c; 3745 - 0x95; 3746 - 0xf7; 3747 - 0xcb; 3748 - 0x8e; 3749 - 0x1f; 3750 - 0xf0; 3751 - 0x15; 3752 - 0xf4; 3753 - 0x22; 3754 - 0x01; 3755 - 0x97; 3756 - 0xb0; 3757 - 0x59; 3758 - 0x4e; 3759 - 0x59; 3760 - 0x40; 3761 - 0x7c; 3762 - 0x43; 3763 - 0xdf; 3764 - 0x1c; 3765 - 0x35; 3766 - 0x5f; 3767 - 0x8d; 3768 - 0xde; 3769 - 0x26; 3770 - 0x77; 3771 - 0x0d; 3772 - 0x47; 3773 - 0xec; 3774 - 0x84; 3775 - 0x30; 3776 - 0x7f; 3777 - 0x0e; 3778 - 0xf3; 3779 - 0x17; 3780 - 0x3b; 3781 - 0x26; 3782 - 0x8b; 3783 - 0x35; 3784 - 0x9d; 3785 - 0xe2; 3786 - 0x02; 3787 - 0x49; 3788 - 0x82; 3789 - 0xa4; 3790 - 0x4e; 3791 - 0x0d; 3792 - 0xb2; 3793 - 0xd9; 3794 - 0x5f; 3795 - 0x83; 3796 - 0x55; 3797 - 0x8d; 3798 - 0x56; 3799 - 0xb2; 3800 - 0x7e; 3801 - 0x33; 3802 - 0x11; 3803 - 0x9f; 3804 - 0x50; 3805 - 0xfb; 3806 - 0xf3; 3807 - 0xaf; 3808 - 0xa6; 3809 - 0x96; 3810 - 0x90; 3811 - 0x52; 3812 - 0x76; 3813 - 0xea; 3814 - 0xbd; 3815 - 0x03; 3816 - 0xde; 3817 - 0x5c; 3818 - 0x3a; 3819 - 0xd7; 3820 - 0x4f; 3821 - 0x1c; 3822 - 0x89; 3823 - 0xe6; 3824 - 0xb0; 3825 - 0xa3; 3826 - 0x39; 3827 - 0x8a; 3828 - 0xb1; 3829 - 0x70; 3830 - 0xb9; 3831 - 0x1f; 3832 - 0x2f; 3833 - 0x25; 3834 - 0x03; 3835 - 0xe5; 3836 - 0xd6; 3837 - 0x87; 3838 - 0x36; 3839 - 0x62; 3840 - 0xea; 3841 - 0x4a; 3842 - 0x8a; 3843 - 0x60; 3844 - 0xb5; 3845 - 0x83; 3846 - 0x20; 3847 - 0x62; 3848 - 0xd5; 3849 - 0x58; 3850 - 0x7e; 3851 - 0x94; 3852 - 0x19; 3853 - 0x42; 3854 - 0x4d; 3855 - 0xc7; 3856 - 0x48; 3857 - 0xb2; 3858 - 0xfb; 3859 - 0xed; 3860 - 0xfb; 3861 - 0xd1; 3862 - 0xc4; 3863 - 0xfe; 3864 - 0x7f; 3865 - 0x48; 3866 - 0xf9; 3867 - 0xe2; 3868 - 0xd4; 3869 - 0x15; 3870 - 0xd1; 3871 - 0x2c; 3872 - 0xe1; 3873 - 0x73; 3874 - 0x76; 3875 - 0x77; 3876 - 0xbf; 3877 - 0x0c; 3878 - 0x5a; 3879 - 0xc3; 3880 - 0x8b; 3881 - 0xc2; 3882 - 0x6a; 3883 - 0xd7; 3884 - 0x58; 3885 - 0xce; 3886 - 0xeb; 3887 - 0x96; 3888 - 0x58; 3889 - 0x55; 3890 - 0xfb; 3891 - 0x35; 3892 - 0x5a; 3893 - 0x8d; 3894 - 0x82; 3895 - 0xaa; 3896 - 0x2e; 3897 - 0x7d; 3898 - 0x0e; 3899 - 0xd3; 3900 - 0x8d; 3901 - 0xb9; 3902 - 0x6a; 3903 - 0xfe; 3904 - 0x02; 3905 - 0xc3; 3906 - 0xbc; 3907 - 0xd2; 3908 - 0x43; 3909 - 0xe9; 3910 - 0x4e; 3911 - 0x72; 3912 - 0xe6; 3913 - 0xbd; 3914 - 0xd2; 3915 - 0x49; 3916 - 0x63; 3917 - 0xc5; 3918 - ]; 3919 - [ 3920 - 0x06; 3921 - 0x01; 3922 - 0x01; 3923 - 0x00; 3924 - 0x23; 3925 - 0x8d; 3926 - 0x01; 3927 - 0xf7; 3928 - 0xce; 3929 - 0xe3; 3930 - 0xe9; 3931 - 0xf8; 3932 - 0xb4; 3933 - 0x43; 3934 - 0x5a; 3935 - 0x48; 3936 - 0x4c; 3937 - 0x98; 3938 - 0x45; 3939 - 0x57; 3940 - 0x45; 3941 - 0x7a; 3942 - 0x70; 3943 - 0x6f; 3944 - 0x02; 3945 - 0xf9; 3946 - 0x3e; 3947 - 0x18; 3948 - 0x16; 3949 - 0x32; 3950 - 0xce; 3951 - 0x48; 3952 - 0x49; 3953 - 0x3d; 3954 - 0x1b; 3955 - 0xed; 3956 - 0xbd; 3957 - 0x96; 3958 - 0x73; 3959 - 0xb7; 3960 - 0xb1; 3961 - 0x26; 3962 - 0xdf; 3963 - 0x07; 3964 - 0x6c; 3965 - 0x2a; 3966 - 0xd0; 3967 - 0xc4; 3968 - 0xc9; 3969 - 0x7d; 3970 - 0x79; 3971 - 0xcc; 3972 - 0x06; 3973 - 0xb4; 3974 - 0x9a; 3975 - 0x56; 3976 - 0x17; 3977 - 0x43; 3978 - 0xe5; 3979 - 0x0d; 3980 - 0xe6; 3981 - 0x69; 3982 - 0xd1; 3983 - 0xbb; 3984 - 0xe5; 3985 - 0xf5; 3986 - 0xc7; 3987 - 0x9a; 3988 - 0x2e; 3989 - 0xed; 3990 - 0xec; 3991 - 0x97; 3992 - 0xc9; 3993 - 0x53; 3994 - 0xb0; 3995 - 0xab; 3996 - 0xc6; 3997 - 0x37; 3998 - 0x99; 3999 - 0x2f; 4000 - 0xbc; 4001 - 0xe5; 4002 - 0x9b; 4003 - 0xd7; 4004 - 0xa2; 4005 - 0xeb; 4006 - 0xd8; 4007 - 0x88; 4008 - 0x29; 4009 - 0xcf; 4010 - 0x6f; 4011 - 0x35; 4012 - 0x64; 4013 - 0xd0; 4014 - 0x40; 4015 - 0xed; 4016 - 0xdd; 4017 - 0xcd; 4018 - 0x12; 4019 - 0x9a; 4020 - 0x93; 4021 - 0xb0; 4022 - 0x6c; 4023 - 0xde; 4024 - 0x75; 4025 - 0x89; 4026 - 0x5b; 4027 - 0x19; 4028 - 0x7b; 4029 - 0xbb; 4030 - 0xe7; 4031 - 0x4f; 4032 - 0xcf; 4033 - 0x6f; 4034 - 0x87; 4035 - 0x85; 4036 - 0x8a; 4037 - 0xb8; 4038 - 0xb3; 4039 - 0x1e; 4040 - 0xd2; 4041 - 0xc3; 4042 - 0x60; 4043 - 0x51; 4044 - 0x2c; 4045 - 0x5b; 4046 - 0xeb; 4047 - 0xe3; 4048 - 0x77; 4049 - 0x40; 4050 - 0x84; 4051 - 0x75; 4052 - 0x4f; 4053 - 0x97; 4054 - 0x1a; 4055 - 0x55; 4056 - 0x67; 4057 - 0xf6; 4058 - 0x75; 4059 - 0x5b; 4060 - 0xec; 4061 - 0x61; 4062 - 0x96; 4063 - 0x30; 4064 - 0x0f; 4065 - 0x41; 4066 - 0xc4; 4067 - 0x02; 4068 - 0x63; 4069 - 0x05; 4070 - 0x52; 4071 - 0xc8; 4072 - 0x76; 4073 - 0x2a; 4074 - 0x0b; 4075 - 0x23; 4076 - 0x6e; 4077 - 0x97; 4078 - 0x1f; 4079 - 0x16; 4080 - 0xb6; 4081 - 0x68; 4082 - 0x92; 4083 - 0xc6; 4084 - 0x2f; 4085 - 0x9b; 4086 - 0x1c; 4087 - 0xe2; 4088 - 0x2f; 4089 - 0xf6; 4090 - 0x02; 4091 - 0x90; 4092 - 0x1a; 4093 - 0x51; 4094 - 0xa7; 4095 - 0x49; 4096 - 0x43; 4097 - 0x41; 4098 - 0x31; 4099 - 0x22; 4100 - 0x3f; 4101 - 0x9a; 4102 - 0xd1; 4103 - 0xe7; 4104 - 0xd0; 4105 - 0x6b; 4106 - 0xe4; 4107 - 0x82; 4108 - 0x1f; 4109 - 0xbd; 4110 - 0x93; 4111 - 0xca; 4112 - 0xaf; 4113 - 0x5d; 4114 - 0xf5; 4115 - 0x05; 4116 - 0xf3; 4117 - 0x9a; 4118 - 0xb8; 4119 - 0x3d; 4120 - 0x19; 4121 - 0x21; 4122 - 0x8d; 4123 - 0x0b; 4124 - 0x20; 4125 - 0x00; 4126 - 0x5a; 4127 - 0x21; 4128 - 0x5f; 4129 - 0x8e; 4130 - 0x1a; 4131 - 0x77; 4132 - 0xd0; 4133 - 0x70; 4134 - 0xfb; 4135 - 0x8c; 4136 - 0x98; 4137 - 0x9d; 4138 - 0x63; 4139 - 0xb3; 4140 - 0x9a; 4141 - 0x6a; 4142 - 0x3f; 4143 - 0xc3; 4144 - 0x89; 4145 - 0x43; 4146 - 0xfe; 4147 - 0x1c; 4148 - 0xa7; 4149 - 0x6f; 4150 - 0xb6; 4151 - 0xd6; 4152 - 0x1f; 4153 - 0xa9; 4154 - 0x3e; 4155 - 0x6c; 4156 - 0xe2; 4157 - 0x7a; 4158 - 0x8e; 4159 - 0x31; 4160 - 0xbc; 4161 - 0x8f; 4162 - 0x4e; 4163 - 0xe4; 4164 - 0xc0; 4165 - 0x36; 4166 - 0x8d; 4167 - 0x72; 4168 - 0x01; 4169 - 0xf4; 4170 - 0x65; 4171 - 0x71; 4172 - 0xff; 4173 - 0x16; 4174 - 0xa6; 4175 - 0xc7; 4176 - 0x0a; 4177 - 0x59; 4178 - 0xf1; 4179 - 0x18; 4180 - ]; 4181 - ] 4182 - 4183 - let good_digitally_signed_1_2_parser xs _ = 4184 - let buf = list_to_cstruct xs in 4185 - match Reader.parse_digitally_signed_1_2 buf with 4186 - | Error _ -> assert_failure "digitally signed 1.2 parser broken" 4187 - | Ok _ -> () 4188 - 4189 - let good_digitally_signed_1_2_tests = 4190 - List.mapi 4191 - (fun i f -> 4192 - "Parse good digitally signed 1_2 " ^ string_of_int i 4193 - >:: good_digitally_signed_1_2_parser f) 4194 - good_digitally_signed_1_2 4195 - 4196 - let bad_dss_1_2 = 4197 - let ds = list_to_cstruct (List.hd good_digitally_signed_1_2) in 4198 - let l = String.length ds in 4199 - [ 4200 - String.sub ds 2 20; 4201 - String.sub ds 0 20; 4202 - list_to_cstruct [ 2 ] ^ ds; 4203 - list_to_cstruct [ 0 ] ^ ds; 4204 - list_to_cstruct [ 0; 1 ] ^ ds; 4205 - list_to_cstruct [ 0; 0 ] ^ ds; 4206 - list_to_cstruct [ 0xff; 0xff ] ^ ds; 4207 - list_to_cstruct [ 0; 0xff ] ^ ds; 4208 - String.sub ds 2 (String.length ds - 2); 4209 - String.sub ds 0 (pred l); 4210 - list_to_cstruct [ 7 ] ^ String.sub ds 1 (String.length ds - 1); 4211 - list_to_cstruct [ 8 ] ^ String.sub ds 1 (String.length ds - 1); 4212 - list_to_cstruct [ 1; 7 ] ^ String.sub ds 2 (String.length ds - 2); 4213 - list_to_cstruct [ 7; 2 ] ^ String.sub ds 2 (String.length ds - 2); 4214 - list_to_cstruct [ 1; 1; 1; 0xff ] ^ String.sub ds 4 (String.length ds - 4); 4215 - list_to_cstruct [ 1; 1; 0xff; 0 ] ^ String.sub ds 4 (String.length ds - 4); 4216 - ds ^ String.make 1 '\x00'; 4217 - ] 4218 - 4219 - let bad_digitally_signed_1_2_parser buf _ = 4220 - match Reader.parse_digitally_signed_1_2 buf with 4221 - | Error _ -> () 4222 - | Ok _ -> assert_failure "digitally signed 1.2 parser broken" 4223 - 4224 - let bad_digitally_signed_1_2_tests = 4225 - List.mapi 4226 - (fun i f -> 4227 - "Parse bad digitally signed 1.2 " ^ string_of_int i 4228 - >:: bad_digitally_signed_1_2_parser f) 4229 - bad_dss_1_2 4230 - 4231 - let good_digitally_signed_parser xs _ = 4232 - let buf = 4233 - let b = list_to_cstruct xs in 4234 - String.sub b 2 (String.length b - 2) 4235 - in 4236 - match Reader.parse_digitally_signed buf with 4237 - | Error _ -> assert_failure "digitally signed parser broken" 4238 - | Ok _ -> () 4239 - 4240 - let good_digitally_signed_tests = 4241 - List.mapi 4242 - (fun i f -> 4243 - "Parse good digitally signed " ^ string_of_int i 4244 - >:: good_digitally_signed_parser f) 4245 - good_digitally_signed_1_2 4246 - 4247 - let bad_dss = 4248 - let ds = 4249 - let buf = list_to_cstruct (List.hd good_digitally_signed_1_2) in 4250 - String.sub buf 2 (String.length buf - 2) 4251 - in 4252 - let l = String.length ds in 4253 - [ 4254 - list_to_cstruct [ 0xff; 0xff ] ^ ds; 4255 - list_to_cstruct [ 0xff; 0xff ] ^ String.sub ds 2 (String.length ds - 2); 4256 - String.sub ds 2 (String.length ds - 2); 4257 - String.sub ds 0 (pred l); 4258 - list_to_cstruct [ 1; 1 ] ^ String.sub ds 2 (String.length ds - 2); 4259 - ds ^ String.make 1 '\x00'; 4260 - ] 4261 - 4262 - let bad_digitally_signed_parser buf _ = 4263 - match Reader.parse_digitally_signed buf with 4264 - | Error _ -> () 4265 - | Ok _ -> assert_failure "digitally signed parser broken" 4266 - 4267 - let bad_digitally_signed_tests = 4268 - List.mapi 4269 - (fun i f -> 4270 - "Parse bad digitally signed " ^ string_of_int i 4271 - >:: bad_digitally_signed_parser f) 4272 - bad_dss 4273 - 4274 - let good_handshake_hdrs = 4275 - let data = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 ] in 4276 - let empty = "" in 4277 - [ 4278 - ([ 0; 0; 0 ], (None, list_to_cstruct [ 0; 0; 0 ])); 4279 - ([ 0; 0; 0; 0 ], (Some (list_to_cstruct [ 0; 0; 0; 0 ]), empty)); 4280 - ([ 0; 0; 0; 0xFF ], (None, list_to_cstruct [ 0; 0; 0; 255 ])); 4281 - ([ 0; 0; 1; 0 ], (None, list_to_cstruct [ 0; 0; 1; 0 ])); 4282 - ( [ 16; 0; 0; 12 ] @ data, 4283 - (Some (list_to_cstruct ([ 16; 0; 0; 12 ] @ data)), empty) ); 4284 - ([ 16; 0; 0; 14 ] @ data, (None, list_to_cstruct ([ 16; 0; 0; 14 ] @ data))); 4285 - ] 4286 - 4287 - let good_handshake_hdr_parser (xs, (hs, rest)) _ = 4288 - let buf = list_to_cstruct xs in 4289 - match (Reader.parse_handshake_frame buf, hs) with 4290 - | (Some x, rest'), Some y -> 4291 - assert_cs_eq y x; 4292 - assert_cs_eq rest rest' 4293 - | (None, rest'), None -> assert_cs_eq rest rest' 4294 - | _ -> assert_failure "handshake_frame parser broken" 4295 - 4296 - let good_handshake_hdr_tests = 4297 - List.mapi 4298 - (fun i f -> 4299 - "Parse good handshake header " ^ string_of_int i 4300 - >:: good_handshake_hdr_parser f) 4301 - good_handshake_hdrs 4302 - 4303 - (* 1byte type ; 3 byte length ; data *) 4304 - let good_handshakes_no_data = 4305 - [ 4306 - ([ 0; 0; 0; 0 ], Core.HelloRequest); ([ 14; 0; 0; 0 ], Core.ServerHelloDone); 4307 - ] 4308 - 4309 - let good_handshake_no_data_parser (xs, res) _ = 4310 - let buf = list_to_cstruct xs in 4311 - match Reader.parse_handshake buf with 4312 - | Ok r -> assert_equal res r 4313 - | Error _ -> assert_failure "handshake no data parser failed" 4314 - 4315 - let good_handshake_no_data_tests = 4316 - List.mapi 4317 - (fun i f -> 4318 - "Parse good handshake " ^ string_of_int i 4319 - >:: good_handshake_no_data_parser f) 4320 - good_handshakes_no_data 4321 - 4322 - let bad_handshakes_no_data = 4323 - [ 4324 - [ 0; 0; 0; 3 ]; 4325 - [ 14; 0; 0; 5 ]; 4326 - [ 245; 0; 0; 0 ]; 4327 - [ 0; 0; 0; 3; 0; 0; 0 ]; 4328 - [ 14; 0; 0; 5; 0; 0; 0; 0; 0 ]; 4329 - ] 4330 - 4331 - let bad_handshake_no_data_parser xs _ = 4332 - let buf = list_to_cstruct xs in 4333 - match Reader.parse_handshake buf with 4334 - | Ok _ -> assert_failure "bad handshake no data parser failed" 4335 - | Error _ -> () 4336 - 4337 - let bad_handshake_no_data_tests = 4338 - List.mapi 4339 - (fun i f -> 4340 - "Parse bad handshake (no data) " ^ string_of_int i 4341 - >:: bad_handshake_no_data_parser f) 4342 - bad_handshakes_no_data 4343 - 4344 - let good_handshake_cstruct_data = 4345 - let data = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 ] in 4346 - let data_cs = list_to_cstruct data in 4347 - let gh1 = 4348 - list_to_cstruct 4349 - [ 4350 - 0x30; 4351 - 0x82; 4352 - 0x05; 4353 - 0xe0; 4354 - 0x30; 4355 - 0x82; 4356 - 0x04; 4357 - 0xc8; 4358 - 0xa0; 4359 - 0x03; 4360 - 0x02; 4361 - 0x01; 4362 - 0x02; 4363 - 0x02; 4364 - 0x10; 4365 - 0x0c; 4366 - 0x00; 4367 - 0x93; 4368 - 0x10; 4369 - 0xd2; 4370 - 0x06; 4371 - 0xdb; 4372 - 0xe3; 4373 - 0x37; 4374 - 0x55; 4375 - 0x35; 4376 - 0x80; 4377 - 0x11; 4378 - 0x8d; 4379 - 0xdc; 4380 - 0x87; 4381 - 0x30; 4382 - 0x0d; 4383 - 0x06; 4384 - 0x09; 4385 - 0x2a; 4386 - 0x86; 4387 - 0x48; 4388 - 0x86; 4389 - 0xf7; 4390 - 0x0d; 4391 - 0x01; 4392 - 0x01; 4393 - 0x0b; 4394 - 0x05; 4395 - 0x00; 4396 - 0x30; 4397 - 0x75; 4398 - 0x31; 4399 - 0x0b; 4400 - 0x30; 4401 - 0x09; 4402 - 0x06; 4403 - 0x03; 4404 - 0x55; 4405 - 0x04; 4406 - 0x06; 4407 - 0x13; 4408 - 0x02; 4409 - 0x55; 4410 - 0x53; 4411 - 0x31; 4412 - 0x15; 4413 - 0x30; 4414 - 0x13; 4415 - 0x06; 4416 - 0x03; 4417 - 0x55; 4418 - 0x04; 4419 - 0x0a; 4420 - 0x13; 4421 - 0x0c; 4422 - 0x44; 4423 - 0x69; 4424 - 0x67; 4425 - 0x69; 4426 - 0x43; 4427 - 0x65; 4428 - 0x72; 4429 - 0x74; 4430 - 0x20; 4431 - 0x49; 4432 - 0x6e; 4433 - 0x63; 4434 - 0x31; 4435 - 0x19; 4436 - 0x30; 4437 - 0x17; 4438 - 0x06; 4439 - 0x03; 4440 - 0x55; 4441 - 0x04; 4442 - 0x0b; 4443 - 0x13; 4444 - 0x10; 4445 - 0x77; 4446 - 0x77; 4447 - 0x77; 4448 - 0x2e; 4449 - 0x64; 4450 - 0x69; 4451 - 0x67; 4452 - 0x69; 4453 - 0x63; 4454 - 0x65; 4455 - 0x72; 4456 - 0x74; 4457 - 0x2e; 4458 - 0x63; 4459 - 0x6f; 4460 - 0x6d; 4461 - 0x31; 4462 - 0x34; 4463 - 0x30; 4464 - 0x32; 4465 - 0x06; 4466 - 0x03; 4467 - 0x55; 4468 - 0x04; 4469 - 0x03; 4470 - 0x13; 4471 - 0x2b; 4472 - 0x44; 4473 - 0x69; 4474 - 0x67; 4475 - 0x69; 4476 - 0x43; 4477 - 0x65; 4478 - 0x72; 4479 - 0x74; 4480 - 0x20; 4481 - 0x53; 4482 - 0x48; 4483 - 0x41; 4484 - 0x32; 4485 - 0x20; 4486 - 0x45; 4487 - 0x78; 4488 - 0x74; 4489 - 0x65; 4490 - 0x6e; 4491 - 0x64; 4492 - 0x65; 4493 - 0x64; 4494 - 0x20; 4495 - 0x56; 4496 - 0x61; 4497 - 0x6c; 4498 - 0x69; 4499 - 0x64; 4500 - 0x61; 4501 - 0x74; 4502 - 0x69; 4503 - 0x6f; 4504 - 0x6e; 4505 - 0x20; 4506 - 0x53; 4507 - 0x65; 4508 - 0x72; 4509 - 0x76; 4510 - 0x65; 4511 - 0x72; 4512 - 0x20; 4513 - 0x43; 4514 - 0x41; 4515 - 0x30; 4516 - 0x1e; 4517 - 0x17; 4518 - 0x0d; 4519 - 0x31; 4520 - 0x34; 4521 - 0x30; 4522 - 0x34; 4523 - 0x30; 4524 - 0x38; 4525 - 0x30; 4526 - 0x30; 4527 - 0x30; 4528 - 0x30; 4529 - 0x30; 4530 - 0x30; 4531 - 0x5a; 4532 - 0x17; 4533 - 0x0d; 4534 - 0x31; 4535 - 0x36; 4536 - 0x30; 4537 - 0x34; 4538 - 0x31; 4539 - 0x32; 4540 - 0x31; 4541 - 0x32; 4542 - 0x30; 4543 - 0x30; 4544 - 0x30; 4545 - 0x30; 4546 - 0x5a; 4547 - 0x30; 4548 - 0x81; 4549 - 0xf0; 4550 - 0x31; 4551 - 0x1d; 4552 - 0x30; 4553 - 0x1b; 4554 - 0x06; 4555 - 0x03; 4556 - 0x55; 4557 - 0x04; 4558 - 0x0f; 4559 - 0x0c; 4560 - 0x14; 4561 - 0x50; 4562 - 0x72; 4563 - 0x69; 4564 - 0x76; 4565 - 0x61; 4566 - 0x74; 4567 - 0x65; 4568 - 0x20; 4569 - 0x4f; 4570 - 0x72; 4571 - 0x67; 4572 - 0x61; 4573 - 0x6e; 4574 - 0x69; 4575 - 0x7a; 4576 - 0x61; 4577 - 0x74; 4578 - 0x69; 4579 - 0x6f; 4580 - 0x6e; 4581 - 0x31; 4582 - 0x13; 4583 - 0x30; 4584 - 0x11; 4585 - 0x06; 4586 - 0x0b; 4587 - 0x2b; 4588 - 0x06; 4589 - 0x01; 4590 - 0x04; 4591 - 0x01; 4592 - 0x82; 4593 - 0x37; 4594 - 0x3c; 4595 - 0x02; 4596 - 0x01; 4597 - 0x03; 4598 - 0x13; 4599 - 0x02; 4600 - 0x55; 4601 - 0x53; 4602 - 0x31; 4603 - 0x19; 4604 - 0x30; 4605 - 0x17; 4606 - 0x06; 4607 - 0x0b; 4608 - 0x2b; 4609 - 0x06; 4610 - 0x01; 4611 - 0x04; 4612 - 0x01; 4613 - 0x82; 4614 - 0x37; 4615 - 0x3c; 4616 - 0x02; 4617 - 0x01; 4618 - 0x02; 4619 - 0x13; 4620 - 0x08; 4621 - 0x44; 4622 - 0x65; 4623 - 0x6c; 4624 - 0x61; 4625 - 0x77; 4626 - 0x61; 4627 - 0x72; 4628 - 0x65; 4629 - 0x31; 4630 - 0x10; 4631 - 0x30; 4632 - 0x0e; 4633 - 0x06; 4634 - 0x03; 4635 - 0x55; 4636 - 0x04; 4637 - 0x05; 4638 - 0x13; 4639 - 0x07; 4640 - 0x35; 4641 - 0x31; 4642 - 0x35; 4643 - 0x37; 4644 - 0x35; 4645 - 0x35; 4646 - 0x30; 4647 - 0x31; 4648 - 0x17; 4649 - 0x30; 4650 - 0x15; 4651 - 0x06; 4652 - 0x03; 4653 - 0x55; 4654 - 0x04; 4655 - 0x09; 4656 - 0x13; 4657 - 0x0e; 4658 - 0x35; 4659 - 0x34; 4660 - 0x38; 4661 - 0x20; 4662 - 0x34; 4663 - 0x74; 4664 - 0x68; 4665 - 0x20; 4666 - 0x53; 4667 - 0x74; 4668 - 0x72; 4669 - 0x65; 4670 - 0x65; 4671 - 0x74; 4672 - 0x31; 4673 - 0x0e; 4674 - 0x30; 4675 - 0x0c; 4676 - 0x06; 4677 - 0x03; 4678 - 0x55; 4679 - 0x04; 4680 - 0x11; 4681 - 0x13; 4682 - 0x05; 4683 - 0x39; 4684 - 0x34; 4685 - 0x31; 4686 - 0x30; 4687 - 0x37; 4688 - 0x31; 4689 - 0x0b; 4690 - 0x30; 4691 - 0x09; 4692 - 0x06; 4693 - 0x03; 4694 - 0x55; 4695 - 0x04; 4696 - 0x06; 4697 - 0x13; 4698 - 0x02; 4699 - 0x55; 4700 - 0x53; 4701 - 0x31; 4702 - 0x13; 4703 - 0x30; 4704 - 0x11; 4705 - 0x06; 4706 - 0x03; 4707 - 0x55; 4708 - 0x04; 4709 - 0x08; 4710 - 0x13; 4711 - 0x0a; 4712 - 0x43; 4713 - 0x61; 4714 - 0x6c; 4715 - 0x69; 4716 - 0x66; 4717 - 0x6f; 4718 - 0x72; 4719 - 0x6e; 4720 - 0x69; 4721 - 0x61; 4722 - 0x31; 4723 - 0x16; 4724 - 0x30; 4725 - 0x14; 4726 - 0x06; 4727 - 0x03; 4728 - 0x55; 4729 - 0x04; 4730 - 0x07; 4731 - 0x13; 4732 - 0x0d; 4733 - 0x53; 4734 - 0x61; 4735 - 0x6e; 4736 - 0x20; 4737 - 0x46; 4738 - 0x72; 4739 - 0x61; 4740 - 0x6e; 4741 - 0x63; 4742 - 0x69; 4743 - 0x73; 4744 - 0x63; 4745 - 0x6f; 4746 - 0x31; 4747 - 0x15; 4748 - 0x30; 4749 - 0x13; 4750 - 0x06; 4751 - 0x03; 4752 - 0x55; 4753 - 0x04; 4754 - 0x0a; 4755 - 0x13; 4756 - 0x0c; 4757 - 0x47; 4758 - 0x69; 4759 - 0x74; 4760 - 0x48; 4761 - 0x75; 4762 - 0x62; 4763 - 0x2c; 4764 - 0x20; 4765 - 0x49; 4766 - 0x6e; 4767 - 0x63; 4768 - 0x2e; 4769 - 0x31; 4770 - 0x13; 4771 - 0x30; 4772 - 0x11; 4773 - 0x06; 4774 - 0x03; 4775 - 0x55; 4776 - 0x04; 4777 - 0x03; 4778 - 0x13; 4779 - 0x0a; 4780 - 0x67; 4781 - 0x69; 4782 - 0x74; 4783 - 0x68; 4784 - 0x75; 4785 - 0x62; 4786 - 0x2e; 4787 - 0x63; 4788 - 0x6f; 4789 - 0x6d; 4790 - 0x30; 4791 - 0x82; 4792 - 0x01; 4793 - 0x22; 4794 - 0x30; 4795 - 0x0d; 4796 - 0x06; 4797 - 0x09; 4798 - 0x2a; 4799 - 0x86; 4800 - 0x48; 4801 - 0x86; 4802 - 0xf7; 4803 - 0x0d; 4804 - 0x01; 4805 - 0x01; 4806 - 0x01; 4807 - 0x05; 4808 - 0x00; 4809 - 0x03; 4810 - 0x82; 4811 - 0x01; 4812 - 0x0f; 4813 - 0x00; 4814 - 0x30; 4815 - 0x82; 4816 - 0x01; 4817 - 0x0a; 4818 - 0x02; 4819 - 0x82; 4820 - 0x01; 4821 - 0x01; 4822 - 0x00; 4823 - 0xb1; 4824 - 0xd4; 4825 - 0xdc; 4826 - 0x3c; 4827 - 0xaf; 4828 - 0xfd; 4829 - 0xf3; 4830 - 0x4e; 4831 - 0xed; 4832 - 0xc1; 4833 - 0x67; 4834 - 0xad; 4835 - 0xe6; 4836 - 0xcb; 4837 - 0x22; 4838 - 0xe8; 4839 - 0xb7; 4840 - 0xe2; 4841 - 0xab; 4842 - 0x28; 4843 - 0xf2; 4844 - 0xf7; 4845 - 0xdc; 4846 - 0x62; 4847 - 0x70; 4848 - 0x08; 4849 - 0xd1; 4850 - 0x0c; 4851 - 0xaf; 4852 - 0xd6; 4853 - 0x16; 4854 - 0x6a; 4855 - 0x21; 4856 - 0xb0; 4857 - 0x36; 4858 - 0x4b; 4859 - 0x17; 4860 - 0x0d; 4861 - 0x36; 4862 - 0x63; 4863 - 0x04; 4864 - 0xae; 4865 - 0xbf; 4866 - 0xea; 4867 - 0x20; 4868 - 0x51; 4869 - 0x95; 4870 - 0x65; 4871 - 0x66; 4872 - 0xf2; 4873 - 0xbf; 4874 - 0xb9; 4875 - 0x4d; 4876 - 0xa4; 4877 - 0x0c; 4878 - 0x29; 4879 - 0xeb; 4880 - 0xf5; 4881 - 0x15; 4882 - 0xb1; 4883 - 0xe8; 4884 - 0x35; 4885 - 0xb3; 4886 - 0x70; 4887 - 0x10; 4888 - 0x94; 4889 - 0xd5; 4890 - 0x1b; 4891 - 0x59; 4892 - 0xb4; 4893 - 0x26; 4894 - 0x0f; 4895 - 0xd6; 4896 - 0x83; 4897 - 0x57; 4898 - 0x59; 4899 - 0x9d; 4900 - 0xe1; 4901 - 0x7c; 4902 - 0x09; 4903 - 0xdd; 4904 - 0xe0; 4905 - 0x13; 4906 - 0xca; 4907 - 0x4d; 4908 - 0x6f; 4909 - 0x43; 4910 - 0x9b; 4911 - 0xcd; 4912 - 0xcf; 4913 - 0x87; 4914 - 0x3a; 4915 - 0x15; 4916 - 0xa7; 4917 - 0x85; 4918 - 0xdd; 4919 - 0x66; 4920 - 0x83; 4921 - 0xed; 4922 - 0x93; 4923 - 0x0c; 4924 - 0xfe; 4925 - 0x2b; 4926 - 0x6d; 4927 - 0x38; 4928 - 0x1c; 4929 - 0x79; 4930 - 0x88; 4931 - 0x90; 4932 - 0xcf; 4933 - 0xad; 4934 - 0x58; 4935 - 0x18; 4936 - 0x2d; 4937 - 0x51; 4938 - 0xd1; 4939 - 0xc2; 4940 - 0xa3; 4941 - 0xf2; 4942 - 0x47; 4943 - 0x8c; 4944 - 0x6f; 4945 - 0x38; 4946 - 0x09; 4947 - 0xb9; 4948 - 0xb8; 4949 - 0xef; 4950 - 0x4c; 4951 - 0x93; 4952 - 0x0b; 4953 - 0xcb; 4954 - 0x83; 4955 - 0x94; 4956 - 0x87; 4957 - 0xea; 4958 - 0xe0; 4959 - 0xa3; 4960 - 0xb5; 4961 - 0xd9; 4962 - 0x7b; 4963 - 0x9b; 4964 - 0x6b; 4965 - 0x0f; 4966 - 0x43; 4967 - 0xf9; 4968 - 0xca; 4969 - 0xee; 4970 - 0x80; 4971 - 0x0d; 4972 - 0x28; 4973 - 0xa7; 4974 - 0x76; 4975 - 0xf1; 4976 - 0x25; 4977 - 0xf4; 4978 - 0xc1; 4979 - 0x35; 4980 - 0x3c; 4981 - 0xf6; 4982 - 0x74; 4983 - 0xad; 4984 - 0xde; 4985 - 0x6a; 4986 - 0x33; 4987 - 0x82; 4988 - 0x7b; 4989 - 0xdc; 4990 - 0xfd; 4991 - 0x4b; 4992 - 0x76; 4993 - 0xa7; 4994 - 0xc2; 4995 - 0xee; 4996 - 0xf2; 4997 - 0x6a; 4998 - 0xbf; 4999 - 0xa9; 5000 - 0x24; 5001 - 0xa6; 5002 - 0x5f; 5003 - 0xe7; 5004 - 0x2e; 5005 - 0x7c; 5006 - 0x0e; 5007 - 0xdb; 5008 - 0xc3; 5009 - 0x74; 5010 - 0x73; 5011 - 0xfa; 5012 - 0x7e; 5013 - 0xc6; 5014 - 0xd8; 5015 - 0xcf; 5016 - 0x60; 5017 - 0xeb; 5018 - 0x36; 5019 - 0x56; 5020 - 0x21; 5021 - 0xb6; 5022 - 0xc1; 5023 - 0x8a; 5024 - 0xb8; 5025 - 0x24; 5026 - 0x82; 5027 - 0x4d; 5028 - 0x78; 5029 - 0x24; 5030 - 0xba; 5031 - 0xe9; 5032 - 0x1d; 5033 - 0xa1; 5034 - 0x8a; 5035 - 0xa7; 5036 - 0x87; 5037 - 0xbe; 5038 - 0x66; 5039 - 0x25; 5040 - 0x69; 5041 - 0xbf; 5042 - 0xbe; 5043 - 0x3b; 5044 - 0x72; 5045 - 0x6e; 5046 - 0x4f; 5047 - 0xe0; 5048 - 0xe4; 5049 - 0x85; 5050 - 0x25; 5051 - 0x08; 5052 - 0xb1; 5053 - 0x91; 5054 - 0x89; 5055 - 0xb8; 5056 - 0xd6; 5057 - 0x74; 5058 - 0x65; 5059 - 0x76; 5060 - 0x9b; 5061 - 0x2c; 5062 - 0x4f; 5063 - 0x62; 5064 - 0x1f; 5065 - 0xa1; 5066 - 0xfa; 5067 - 0x3a; 5068 - 0xbe; 5069 - 0x9c; 5070 - 0x24; 5071 - 0xbf; 5072 - 0x9f; 5073 - 0xca; 5074 - 0xb0; 5075 - 0xc5; 5076 - 0xc0; 5077 - 0x67; 5078 - 0x8d; 5079 - 0x02; 5080 - 0x03; 5081 - 0x01; 5082 - 0x00; 5083 - 0x01; 5084 - 0xa3; 5085 - 0x82; 5086 - 0x01; 5087 - 0xee; 5088 - 0x30; 5089 - 0x82; 5090 - 0x01; 5091 - 0xea; 5092 - 0x30; 5093 - 0x1f; 5094 - 0x06; 5095 - 0x03; 5096 - 0x55; 5097 - 0x1d; 5098 - 0x23; 5099 - 0x04; 5100 - 0x18; 5101 - 0x30; 5102 - 0x16; 5103 - 0x80; 5104 - 0x14; 5105 - 0x3d; 5106 - 0xd3; 5107 - 0x50; 5108 - 0xa5; 5109 - 0xd6; 5110 - 0xa0; 5111 - 0xad; 5112 - 0xee; 5113 - 0xf3; 5114 - 0x4a; 5115 - 0x60; 5116 - 0x0a; 5117 - 0x65; 5118 - 0xd3; 5119 - 0x21; 5120 - 0xd4; 5121 - 0xf8; 5122 - 0xf8; 5123 - 0xd6; 5124 - 0x0f; 5125 - 0x30; 5126 - 0x1d; 5127 - 0x06; 5128 - 0x03; 5129 - 0x55; 5130 - 0x1d; 5131 - 0x0e; 5132 - 0x04; 5133 - 0x16; 5134 - 0x04; 5135 - 0x14; 5136 - 0x6a; 5137 - 0x43; 5138 - 0x90; 5139 - 0x7d; 5140 - 0x3b; 5141 - 0x98; 5142 - 0x14; 5143 - 0x72; 5144 - 0x52; 5145 - 0x95; 5146 - 0x3a; 5147 - 0xaa; 5148 - 0x28; 5149 - 0x0a; 5150 - 0x43; 5151 - 0xf8; 5152 - 0x51; 5153 - 0x7e; 5154 - 0xd3; 5155 - 0xa6; 5156 - 0x30; 5157 - 0x25; 5158 - 0x06; 5159 - 0x03; 5160 - 0x55; 5161 - 0x1d; 5162 - 0x11; 5163 - 0x04; 5164 - 0x1e; 5165 - 0x30; 5166 - 0x1c; 5167 - 0x82; 5168 - 0x0a; 5169 - 0x67; 5170 - 0x69; 5171 - 0x74; 5172 - 0x68; 5173 - 0x75; 5174 - 0x62; 5175 - 0x2e; 5176 - 0x63; 5177 - 0x6f; 5178 - 0x6d; 5179 - 0x82; 5180 - 0x0e; 5181 - 0x77; 5182 - 0x77; 5183 - 0x77; 5184 - 0x2e; 5185 - 0x67; 5186 - 0x69; 5187 - 0x74; 5188 - 0x68; 5189 - 0x75; 5190 - 0x62; 5191 - 0x2e; 5192 - 0x63; 5193 - 0x6f; 5194 - 0x6d; 5195 - 0x30; 5196 - 0x0e; 5197 - 0x06; 5198 - 0x03; 5199 - 0x55; 5200 - 0x1d; 5201 - 0x0f; 5202 - 0x01; 5203 - 0x01; 5204 - 0xff; 5205 - 0x04; 5206 - 0x04; 5207 - 0x03; 5208 - 0x02; 5209 - 0x05; 5210 - 0xa0; 5211 - 0x30; 5212 - 0x1d; 5213 - 0x06; 5214 - 0x03; 5215 - 0x55; 5216 - 0x1d; 5217 - 0x25; 5218 - 0x04; 5219 - 0x16; 5220 - 0x30; 5221 - 0x14; 5222 - 0x06; 5223 - 0x08; 5224 - 0x2b; 5225 - 0x06; 5226 - 0x01; 5227 - 0x05; 5228 - 0x05; 5229 - 0x07; 5230 - 0x03; 5231 - 0x01; 5232 - 0x06; 5233 - 0x08; 5234 - 0x2b; 5235 - 0x06; 5236 - 0x01; 5237 - 0x05; 5238 - 0x05; 5239 - 0x07; 5240 - 0x03; 5241 - 0x02; 5242 - 0x30; 5243 - 0x75; 5244 - 0x06; 5245 - 0x03; 5246 - 0x55; 5247 - 0x1d; 5248 - 0x1f; 5249 - 0x04; 5250 - 0x6e; 5251 - 0x30; 5252 - 0x6c; 5253 - 0x30; 5254 - 0x34; 5255 - 0xa0; 5256 - 0x32; 5257 - 0xa0; 5258 - 0x30; 5259 - 0x86; 5260 - 0x2e; 5261 - 0x68; 5262 - 0x74; 5263 - 0x74; 5264 - 0x70; 5265 - 0x3a; 5266 - 0x2f; 5267 - 0x2f; 5268 - 0x63; 5269 - 0x72; 5270 - 0x6c; 5271 - 0x33; 5272 - 0x2e; 5273 - 0x64; 5274 - 0x69; 5275 - 0x67; 5276 - 0x69; 5277 - 0x63; 5278 - 0x65; 5279 - 0x72; 5280 - 0x74; 5281 - 0x2e; 5282 - 0x63; 5283 - 0x6f; 5284 - 0x6d; 5285 - 0x2f; 5286 - 0x73; 5287 - 0x68; 5288 - 0x61; 5289 - 0x32; 5290 - 0x2d; 5291 - 0x65; 5292 - 0x76; 5293 - 0x2d; 5294 - 0x73; 5295 - 0x65; 5296 - 0x72; 5297 - 0x76; 5298 - 0x65; 5299 - 0x72; 5300 - 0x2d; 5301 - 0x67; 5302 - 0x31; 5303 - 0x2e; 5304 - 0x63; 5305 - 0x72; 5306 - 0x6c; 5307 - 0x30; 5308 - 0x34; 5309 - 0xa0; 5310 - 0x32; 5311 - 0xa0; 5312 - 0x30; 5313 - 0x86; 5314 - 0x2e; 5315 - 0x68; 5316 - 0x74; 5317 - 0x74; 5318 - 0x70; 5319 - 0x3a; 5320 - 0x2f; 5321 - 0x2f; 5322 - 0x63; 5323 - 0x72; 5324 - 0x6c; 5325 - 0x34; 5326 - 0x2e; 5327 - 0x64; 5328 - 0x69; 5329 - 0x67; 5330 - 0x69; 5331 - 0x63; 5332 - 0x65; 5333 - 0x72; 5334 - 0x74; 5335 - 0x2e; 5336 - 0x63; 5337 - 0x6f; 5338 - 0x6d; 5339 - 0x2f; 5340 - 0x73; 5341 - 0x68; 5342 - 0x61; 5343 - 0x32; 5344 - 0x2d; 5345 - 0x65; 5346 - 0x76; 5347 - 0x2d; 5348 - 0x73; 5349 - 0x65; 5350 - 0x72; 5351 - 0x76; 5352 - 0x65; 5353 - 0x72; 5354 - 0x2d; 5355 - 0x67; 5356 - 0x31; 5357 - 0x2e; 5358 - 0x63; 5359 - 0x72; 5360 - 0x6c; 5361 - 0x30; 5362 - 0x42; 5363 - 0x06; 5364 - 0x03; 5365 - 0x55; 5366 - 0x1d; 5367 - 0x20; 5368 - 0x04; 5369 - 0x3b; 5370 - 0x30; 5371 - 0x39; 5372 - 0x30; 5373 - 0x37; 5374 - 0x06; 5375 - 0x09; 5376 - 0x60; 5377 - 0x86; 5378 - 0x48; 5379 - 0x01; 5380 - 0x86; 5381 - 0xfd; 5382 - 0x6c; 5383 - 0x02; 5384 - 0x01; 5385 - 0x30; 5386 - 0x2a; 5387 - 0x30; 5388 - 0x28; 5389 - 0x06; 5390 - 0x08; 5391 - 0x2b; 5392 - 0x06; 5393 - 0x01; 5394 - 0x05; 5395 - 0x05; 5396 - 0x07; 5397 - 0x02; 5398 - 0x01; 5399 - 0x16; 5400 - 0x1c; 5401 - 0x68; 5402 - 0x74; 5403 - 0x74; 5404 - 0x70; 5405 - 0x73; 5406 - 0x3a; 5407 - 0x2f; 5408 - 0x2f; 5409 - 0x77; 5410 - 0x77; 5411 - 0x77; 5412 - 0x2e; 5413 - 0x64; 5414 - 0x69; 5415 - 0x67; 5416 - 0x69; 5417 - 0x63; 5418 - 0x65; 5419 - 0x72; 5420 - 0x74; 5421 - 0x2e; 5422 - 0x63; 5423 - 0x6f; 5424 - 0x6d; 5425 - 0x2f; 5426 - 0x43; 5427 - 0x50; 5428 - 0x53; 5429 - 0x30; 5430 - 0x81; 5431 - 0x88; 5432 - 0x06; 5433 - 0x08; 5434 - 0x2b; 5435 - 0x06; 5436 - 0x01; 5437 - 0x05; 5438 - 0x05; 5439 - 0x07; 5440 - 0x01; 5441 - 0x01; 5442 - 0x04; 5443 - 0x7c; 5444 - 0x30; 5445 - 0x7a; 5446 - 0x30; 5447 - 0x24; 5448 - 0x06; 5449 - 0x08; 5450 - 0x2b; 5451 - 0x06; 5452 - 0x01; 5453 - 0x05; 5454 - 0x05; 5455 - 0x07; 5456 - 0x30; 5457 - 0x01; 5458 - 0x86; 5459 - 0x18; 5460 - 0x68; 5461 - 0x74; 5462 - 0x74; 5463 - 0x70; 5464 - 0x3a; 5465 - 0x2f; 5466 - 0x2f; 5467 - 0x6f; 5468 - 0x63; 5469 - 0x73; 5470 - 0x70; 5471 - 0x2e; 5472 - 0x64; 5473 - 0x69; 5474 - 0x67; 5475 - 0x69; 5476 - 0x63; 5477 - 0x65; 5478 - 0x72; 5479 - 0x74; 5480 - 0x2e; 5481 - 0x63; 5482 - 0x6f; 5483 - 0x6d; 5484 - 0x30; 5485 - 0x52; 5486 - 0x06; 5487 - 0x08; 5488 - 0x2b; 5489 - 0x06; 5490 - 0x01; 5491 - 0x05; 5492 - 0x05; 5493 - 0x07; 5494 - 0x30; 5495 - 0x02; 5496 - 0x86; 5497 - 0x46; 5498 - 0x68; 5499 - 0x74; 5500 - 0x74; 5501 - 0x70; 5502 - 0x3a; 5503 - 0x2f; 5504 - 0x2f; 5505 - 0x63; 5506 - 0x61; 5507 - 0x63; 5508 - 0x65; 5509 - 0x72; 5510 - 0x74; 5511 - 0x73; 5512 - 0x2e; 5513 - 0x64; 5514 - 0x69; 5515 - 0x67; 5516 - 0x69; 5517 - 0x63; 5518 - 0x65; 5519 - 0x72; 5520 - 0x74; 5521 - 0x2e; 5522 - 0x63; 5523 - 0x6f; 5524 - 0x6d; 5525 - 0x2f; 5526 - 0x44; 5527 - 0x69; 5528 - 0x67; 5529 - 0x69; 5530 - 0x43; 5531 - 0x65; 5532 - 0x72; 5533 - 0x74; 5534 - 0x53; 5535 - 0x48; 5536 - 0x41; 5537 - 0x32; 5538 - 0x45; 5539 - 0x78; 5540 - 0x74; 5541 - 0x65; 5542 - 0x6e; 5543 - 0x64; 5544 - 0x65; 5545 - 0x64; 5546 - 0x56; 5547 - 0x61; 5548 - 0x6c; 5549 - 0x69; 5550 - 0x64; 5551 - 0x61; 5552 - 0x74; 5553 - 0x69; 5554 - 0x6f; 5555 - 0x6e; 5556 - 0x53; 5557 - 0x65; 5558 - 0x72; 5559 - 0x76; 5560 - 0x65; 5561 - 0x72; 5562 - 0x43; 5563 - 0x41; 5564 - 0x2e; 5565 - 0x63; 5566 - 0x72; 5567 - 0x74; 5568 - 0x30; 5569 - 0x0c; 5570 - 0x06; 5571 - 0x03; 5572 - 0x55; 5573 - 0x1d; 5574 - 0x13; 5575 - 0x01; 5576 - 0x01; 5577 - 0xff; 5578 - 0x04; 5579 - 0x02; 5580 - 0x30; 5581 - 0x00; 5582 - 0x30; 5583 - 0x0d; 5584 - 0x06; 5585 - 0x09; 5586 - 0x2a; 5587 - 0x86; 5588 - 0x48; 5589 - 0x86; 5590 - 0xf7; 5591 - 0x0d; 5592 - 0x01; 5593 - 0x01; 5594 - 0x0b; 5595 - 0x05; 5596 - 0x00; 5597 - 0x03; 5598 - 0x82; 5599 - 0x01; 5600 - 0x01; 5601 - 0x00; 5602 - 0x6f; 5603 - 0xe7; 5604 - 0x6d; 5605 - 0xcb; 5606 - 0x82; 5607 - 0xf3; 5608 - 0xef; 5609 - 0x90; 5610 - 0x87; 5611 - 0x09; 5612 - 0xd7; 5613 - 0x0f; 5614 - 0x15; 5615 - 0x22; 5616 - 0x2c; 5617 - 0x8c; 5618 - 0xfe; 5619 - 0xd3; 5620 - 0xab; 5621 - 0x1c; 5622 - 0x8a; 5623 - 0x96; 5624 - 0xdb; 5625 - 0x5d; 5626 - 0x12; 5627 - 0x5d; 5628 - 0xd1; 5629 - 0x78; 5630 - 0xc0; 5631 - 0x31; 5632 - 0xb0; 5633 - 0xff; 5634 - 0x45; 5635 - 0xc8; 5636 - 0x89; 5637 - 0xf7; 5638 - 0x08; 5639 - 0x98; 5640 - 0x52; 5641 - 0x17; 5642 - 0x1f; 5643 - 0x4c; 5644 - 0x4b; 5645 - 0x20; 5646 - 0x64; 5647 - 0x6a; 5648 - 0x6d; 5649 - 0xdb; 5650 - 0x50; 5651 - 0xd7; 5652 - 0x10; 5653 - 0xbe; 5654 - 0x7e; 5655 - 0xab; 5656 - 0xfe; 5657 - 0x2f; 5658 - 0x80; 5659 - 0xd8; 5660 - 0xa9; 5661 - 0x4a; 5662 - 0x58; 5663 - 0x41; 5664 - 0x69; 5665 - 0x81; 5666 - 0x72; 5667 - 0x19; 5668 - 0x08; 5669 - 0x83; 5670 - 0x9b; 5671 - 0x92; 5672 - 0x10; 5673 - 0x4e; 5674 - 0x62; 5675 - 0x2d; 5676 - 0x7b; 5677 - 0x46; 5678 - 0x70; 5679 - 0x43; 5680 - 0x6e; 5681 - 0xa3; 5682 - 0x53; 5683 - 0x13; 5684 - 0x1f; 5685 - 0xe2; 5686 - 0x93; 5687 - 0xa6; 5688 - 0x23; 5689 - 0x5b; 5690 - 0xf7; 5691 - 0x92; 5692 - 0x3e; 5693 - 0x37; 5694 - 0x14; 5695 - 0x75; 5696 - 0x3b; 5697 - 0xb9; 5698 - 0x4b; 5699 - 0x24; 5700 - 0x41; 5701 - 0x2e; 5702 - 0xa5; 5703 - 0x3d; 5704 - 0x48; 5705 - 0x0d; 5706 - 0x0f; 5707 - 0x99; 5708 - 0xea; 5709 - 0x1e; 5710 - 0x42; 5711 - 0x97; 5712 - 0xc6; 5713 - 0xfe; 5714 - 0x95; 5715 - 0xda; 5716 - 0xab; 5717 - 0x47; 5718 - 0x9a; 5719 - 0xcb; 5720 - 0x2b; 5721 - 0x03; 5722 - 0xd6; 5723 - 0x0d; 5724 - 0x40; 5725 - 0xc1; 5726 - 0x0a; 5727 - 0xf7; 5728 - 0x78; 5729 - 0x1a; 5730 - 0xda; 5731 - 0xb5; 5732 - 0x83; 5733 - 0xa4; 5734 - 0xad; 5735 - 0xb5; 5736 - 0x99; 5737 - 0x49; 5738 - 0x20; 5739 - 0x2e; 5740 - 0xf8; 5741 - 0x93; 5742 - 0x3c; 5743 - 0x1e; 5744 - 0x6c; 5745 - 0x3d; 5746 - 0xd1; 5747 - 0x3b; 5748 - 0x23; 5749 - 0x3a; 5750 - 0x6b; 5751 - 0x38; 5752 - 0x2a; 5753 - 0x7e; 5754 - 0x62; 5755 - 0x7a; 5756 - 0x5f; 5757 - 0xdd; 5758 - 0x17; 5759 - 0x05; 5760 - 0x75; 5761 - 0xd0; 5762 - 0x24; 5763 - 0x5d; 5764 - 0xbe; 5765 - 0x8d; 5766 - 0xa8; 5767 - 0x9a; 5768 - 0x10; 5769 - 0x44; 5770 - 0xfa; 5771 - 0xd2; 5772 - 0xb4; 5773 - 0xca; 5774 - 0xef; 5775 - 0xd7; 5776 - 0xd0; 5777 - 0xb5; 5778 - 0x76; 5779 - 0xa5; 5780 - 0x26; 5781 - 0x25; 5782 - 0x1c; 5783 - 0x08; 5784 - 0x41; 5785 - 0xd8; 5786 - 0x64; 5787 - 0x92; 5788 - 0xa7; 5789 - 0xaf; 5790 - 0x7d; 5791 - 0xfe; 5792 - 0x88; 5793 - 0x40; 5794 - 0x39; 5795 - 0x61; 5796 - 0x0b; 5797 - 0xc0; 5798 - 0x48; 5799 - 0x30; 5800 - 0xa9; 5801 - 0x82; 5802 - 0x34; 5803 - 0xad; 5804 - 0xf7; 5805 - 0x70; 5806 - 0x46; 5807 - 0x03; 5808 - 0x7c; 5809 - 0x35; 5810 - 0x91; 5811 - 0x3a; 5812 - 0xd5; 5813 - 0xbb; 5814 - 0x24; 5815 - 0xd8; 5816 - 0x01; 5817 - 0xbc; 5818 - 0x14; 5819 - 0xf0; 5820 - 0xc3; 5821 - 0x0f; 5822 - 0x23; 5823 - 0x3b; 5824 - 0x58; 5825 - 0x32; 5826 - 0xba; 5827 - 0x0f; 5828 - 0x12; 5829 - 0x6c; 5830 - 0x66; 5831 - 0x7a; 5832 - 0x6d; 5833 - 0x9d; 5834 - 0xe4; 5835 - 0xf0; 5836 - 0xe5; 5837 - 0x7c; 5838 - 0x5d; 5839 - 0x7e; 5840 - 0x02; 5841 - 0xd8; 5842 - 0xd7; 5843 - 0xac; 5844 - 0x89; 5845 - 0x97; 5846 - 0x0b; 5847 - 0x61; 5848 - 0xb7; 5849 - 0x36; 5850 - 0x9f; 5851 - 0xb0; 5852 - 0x7d; 5853 - 0x3b; 5854 - 0xee; 5855 - 0xb7; 5856 - 0x33; 5857 - 0x69; 5858 - ] 5859 - in 5860 - let gh2 = 5861 - list_to_cstruct 5862 - [ 5863 - 0x30; 5864 - 0x82; 5865 - 0x04; 5866 - 0xb6; 5867 - 0x30; 5868 - 0x82; 5869 - 0x03; 5870 - 0x9e; 5871 - 0xa0; 5872 - 0x03; 5873 - 0x02; 5874 - 0x01; 5875 - 0x02; 5876 - 0x02; 5877 - 0x10; 5878 - 0x0c; 5879 - 0x79; 5880 - 0xa9; 5881 - 0x44; 5882 - 0xb0; 5883 - 0x8c; 5884 - 0x11; 5885 - 0x95; 5886 - 0x20; 5887 - 0x92; 5888 - 0x61; 5889 - 0x5f; 5890 - 0xe2; 5891 - 0x6b; 5892 - 0x1d; 5893 - 0x83; 5894 - 0x30; 5895 - 0x0d; 5896 - 0x06; 5897 - 0x09; 5898 - 0x2a; 5899 - 0x86; 5900 - 0x48; 5901 - 0x86; 5902 - 0xf7; 5903 - 0x0d; 5904 - 0x01; 5905 - 0x01; 5906 - 0x0b; 5907 - 0x05; 5908 - 0x00; 5909 - 0x30; 5910 - 0x6c; 5911 - 0x31; 5912 - 0x0b; 5913 - 0x30; 5914 - 0x09; 5915 - 0x06; 5916 - 0x03; 5917 - 0x55; 5918 - 0x04; 5919 - 0x06; 5920 - 0x13; 5921 - 0x02; 5922 - 0x55; 5923 - 0x53; 5924 - 0x31; 5925 - 0x15; 5926 - 0x30; 5927 - 0x13; 5928 - 0x06; 5929 - 0x03; 5930 - 0x55; 5931 - 0x04; 5932 - 0x0a; 5933 - 0x13; 5934 - 0x0c; 5935 - 0x44; 5936 - 0x69; 5937 - 0x67; 5938 - 0x69; 5939 - 0x43; 5940 - 0x65; 5941 - 0x72; 5942 - 0x74; 5943 - 0x20; 5944 - 0x49; 5945 - 0x6e; 5946 - 0x63; 5947 - 0x31; 5948 - 0x19; 5949 - 0x30; 5950 - 0x17; 5951 - 0x06; 5952 - 0x03; 5953 - 0x55; 5954 - 0x04; 5955 - 0x0b; 5956 - 0x13; 5957 - 0x10; 5958 - 0x77; 5959 - 0x77; 5960 - 0x77; 5961 - 0x2e; 5962 - 0x64; 5963 - 0x69; 5964 - 0x67; 5965 - 0x69; 5966 - 0x63; 5967 - 0x65; 5968 - 0x72; 5969 - 0x74; 5970 - 0x2e; 5971 - 0x63; 5972 - 0x6f; 5973 - 0x6d; 5974 - 0x31; 5975 - 0x2b; 5976 - 0x30; 5977 - 0x29; 5978 - 0x06; 5979 - 0x03; 5980 - 0x55; 5981 - 0x04; 5982 - 0x03; 5983 - 0x13; 5984 - 0x22; 5985 - 0x44; 5986 - 0x69; 5987 - 0x67; 5988 - 0x69; 5989 - 0x43; 5990 - 0x65; 5991 - 0x72; 5992 - 0x74; 5993 - 0x20; 5994 - 0x48; 5995 - 0x69; 5996 - 0x67; 5997 - 0x68; 5998 - 0x20; 5999 - 0x41; 6000 - 0x73; 6001 - 0x73; 6002 - 0x75; 6003 - 0x72; 6004 - 0x61; 6005 - 0x6e; 6006 - 0x63; 6007 - 0x65; 6008 - 0x20; 6009 - 0x45; 6010 - 0x56; 6011 - 0x20; 6012 - 0x52; 6013 - 0x6f; 6014 - 0x6f; 6015 - 0x74; 6016 - 0x20; 6017 - 0x43; 6018 - 0x41; 6019 - 0x30; 6020 - 0x1e; 6021 - 0x17; 6022 - 0x0d; 6023 - 0x31; 6024 - 0x33; 6025 - 0x31; 6026 - 0x30; 6027 - 0x32; 6028 - 0x32; 6029 - 0x31; 6030 - 0x32; 6031 - 0x30; 6032 - 0x30; 6033 - 0x30; 6034 - 0x30; 6035 - 0x5a; 6036 - 0x17; 6037 - 0x0d; 6038 - 0x32; 6039 - 0x38; 6040 - 0x31; 6041 - 0x30; 6042 - 0x32; 6043 - 0x32; 6044 - 0x31; 6045 - 0x32; 6046 - 0x30; 6047 - 0x30; 6048 - 0x30; 6049 - 0x30; 6050 - 0x5a; 6051 - 0x30; 6052 - 0x75; 6053 - 0x31; 6054 - 0x0b; 6055 - 0x30; 6056 - 0x09; 6057 - 0x06; 6058 - 0x03; 6059 - 0x55; 6060 - 0x04; 6061 - 0x06; 6062 - 0x13; 6063 - 0x02; 6064 - 0x55; 6065 - 0x53; 6066 - 0x31; 6067 - 0x15; 6068 - 0x30; 6069 - 0x13; 6070 - 0x06; 6071 - 0x03; 6072 - 0x55; 6073 - 0x04; 6074 - 0x0a; 6075 - 0x13; 6076 - 0x0c; 6077 - 0x44; 6078 - 0x69; 6079 - 0x67; 6080 - 0x69; 6081 - 0x43; 6082 - 0x65; 6083 - 0x72; 6084 - 0x74; 6085 - 0x20; 6086 - 0x49; 6087 - 0x6e; 6088 - 0x63; 6089 - 0x31; 6090 - 0x19; 6091 - 0x30; 6092 - 0x17; 6093 - 0x06; 6094 - 0x03; 6095 - 0x55; 6096 - 0x04; 6097 - 0x0b; 6098 - 0x13; 6099 - 0x10; 6100 - 0x77; 6101 - 0x77; 6102 - 0x77; 6103 - 0x2e; 6104 - 0x64; 6105 - 0x69; 6106 - 0x67; 6107 - 0x69; 6108 - 0x63; 6109 - 0x65; 6110 - 0x72; 6111 - 0x74; 6112 - 0x2e; 6113 - 0x63; 6114 - 0x6f; 6115 - 0x6d; 6116 - 0x31; 6117 - 0x34; 6118 - 0x30; 6119 - 0x32; 6120 - 0x06; 6121 - 0x03; 6122 - 0x55; 6123 - 0x04; 6124 - 0x03; 6125 - 0x13; 6126 - 0x2b; 6127 - 0x44; 6128 - 0x69; 6129 - 0x67; 6130 - 0x69; 6131 - 0x43; 6132 - 0x65; 6133 - 0x72; 6134 - 0x74; 6135 - 0x20; 6136 - 0x53; 6137 - 0x48; 6138 - 0x41; 6139 - 0x32; 6140 - 0x20; 6141 - 0x45; 6142 - 0x78; 6143 - 0x74; 6144 - 0x65; 6145 - 0x6e; 6146 - 0x64; 6147 - 0x65; 6148 - 0x64; 6149 - 0x20; 6150 - 0x56; 6151 - 0x61; 6152 - 0x6c; 6153 - 0x69; 6154 - 0x64; 6155 - 0x61; 6156 - 0x74; 6157 - 0x69; 6158 - 0x6f; 6159 - 0x6e; 6160 - 0x20; 6161 - 0x53; 6162 - 0x65; 6163 - 0x72; 6164 - 0x76; 6165 - 0x65; 6166 - 0x72; 6167 - 0x20; 6168 - 0x43; 6169 - 0x41; 6170 - 0x30; 6171 - 0x82; 6172 - 0x01; 6173 - 0x22; 6174 - 0x30; 6175 - 0x0d; 6176 - 0x06; 6177 - 0x09; 6178 - 0x2a; 6179 - 0x86; 6180 - 0x48; 6181 - 0x86; 6182 - 0xf7; 6183 - 0x0d; 6184 - 0x01; 6185 - 0x01; 6186 - 0x01; 6187 - 0x05; 6188 - 0x00; 6189 - 0x03; 6190 - 0x82; 6191 - 0x01; 6192 - 0x0f; 6193 - 0x00; 6194 - 0x30; 6195 - 0x82; 6196 - 0x01; 6197 - 0x0a; 6198 - 0x02; 6199 - 0x82; 6200 - 0x01; 6201 - 0x01; 6202 - 0x00; 6203 - 0xd7; 6204 - 0x53; 6205 - 0xa4; 6206 - 0x04; 6207 - 0x51; 6208 - 0xf8; 6209 - 0x99; 6210 - 0xa6; 6211 - 0x16; 6212 - 0x48; 6213 - 0x4b; 6214 - 0x67; 6215 - 0x27; 6216 - 0xaa; 6217 - 0x93; 6218 - 0x49; 6219 - 0xd0; 6220 - 0x39; 6221 - 0xed; 6222 - 0x0c; 6223 - 0xb0; 6224 - 0xb0; 6225 - 0x00; 6226 - 0x87; 6227 - 0xf1; 6228 - 0x67; 6229 - 0x28; 6230 - 0x86; 6231 - 0x85; 6232 - 0x8c; 6233 - 0x8e; 6234 - 0x63; 6235 - 0xda; 6236 - 0xbc; 6237 - 0xb1; 6238 - 0x40; 6239 - 0x38; 6240 - 0xe2; 6241 - 0xd3; 6242 - 0xf5; 6243 - 0xec; 6244 - 0xa5; 6245 - 0x05; 6246 - 0x18; 6247 - 0xb8; 6248 - 0x3d; 6249 - 0x3e; 6250 - 0xc5; 6251 - 0x99; 6252 - 0x17; 6253 - 0x32; 6254 - 0xec; 6255 - 0x18; 6256 - 0x8c; 6257 - 0xfa; 6258 - 0xf1; 6259 - 0x0c; 6260 - 0xa6; 6261 - 0x64; 6262 - 0x21; 6263 - 0x85; 6264 - 0xcb; 6265 - 0x07; 6266 - 0x10; 6267 - 0x34; 6268 - 0xb0; 6269 - 0x52; 6270 - 0x88; 6271 - 0x2b; 6272 - 0x1f; 6273 - 0x68; 6274 - 0x9b; 6275 - 0xd2; 6276 - 0xb1; 6277 - 0x8f; 6278 - 0x12; 6279 - 0xb0; 6280 - 0xb3; 6281 - 0xd2; 6282 - 0xe7; 6283 - 0x88; 6284 - 0x1f; 6285 - 0x1f; 6286 - 0xef; 6287 - 0x38; 6288 - 0x77; 6289 - 0x54; 6290 - 0x53; 6291 - 0x5f; 6292 - 0x80; 6293 - 0x79; 6294 - 0x3f; 6295 - 0x2e; 6296 - 0x1a; 6297 - 0xaa; 6298 - 0xa8; 6299 - 0x1e; 6300 - 0x4b; 6301 - 0x2b; 6302 - 0x0d; 6303 - 0xab; 6304 - 0xb7; 6305 - 0x63; 6306 - 0xb9; 6307 - 0x35; 6308 - 0xb7; 6309 - 0x7d; 6310 - 0x14; 6311 - 0xbc; 6312 - 0x59; 6313 - 0x4b; 6314 - 0xdf; 6315 - 0x51; 6316 - 0x4a; 6317 - 0xd2; 6318 - 0xa1; 6319 - 0xe2; 6320 - 0x0c; 6321 - 0xe2; 6322 - 0x90; 6323 - 0x82; 6324 - 0x87; 6325 - 0x6a; 6326 - 0xae; 6327 - 0xea; 6328 - 0xd7; 6329 - 0x64; 6330 - 0xd6; 6331 - 0x98; 6332 - 0x55; 6333 - 0xe8; 6334 - 0xfd; 6335 - 0xaf; 6336 - 0x1a; 6337 - 0x50; 6338 - 0x6c; 6339 - 0x54; 6340 - 0xbc; 6341 - 0x11; 6342 - 0xf2; 6343 - 0xfd; 6344 - 0x4a; 6345 - 0xf2; 6346 - 0x9d; 6347 - 0xbb; 6348 - 0x7f; 6349 - 0x0e; 6350 - 0xf4; 6351 - 0xd5; 6352 - 0xbe; 6353 - 0x8e; 6354 - 0x16; 6355 - 0x89; 6356 - 0x12; 6357 - 0x55; 6358 - 0xd8; 6359 - 0xc0; 6360 - 0x71; 6361 - 0x34; 6362 - 0xee; 6363 - 0xf6; 6364 - 0xdc; 6365 - 0x2d; 6366 - 0xec; 6367 - 0xc4; 6368 - 0x87; 6369 - 0x25; 6370 - 0x86; 6371 - 0x8d; 6372 - 0xd8; 6373 - 0x21; 6374 - 0xe4; 6375 - 0xb0; 6376 - 0x4d; 6377 - 0x0c; 6378 - 0x89; 6379 - 0xdc; 6380 - 0x39; 6381 - 0x26; 6382 - 0x17; 6383 - 0xdd; 6384 - 0xf6; 6385 - 0xd7; 6386 - 0x94; 6387 - 0x85; 6388 - 0xd8; 6389 - 0x04; 6390 - 0x21; 6391 - 0x70; 6392 - 0x9d; 6393 - 0x6f; 6394 - 0x6f; 6395 - 0xff; 6396 - 0x5c; 6397 - 0xba; 6398 - 0x19; 6399 - 0xe1; 6400 - 0x45; 6401 - 0xcb; 6402 - 0x56; 6403 - 0x57; 6404 - 0x28; 6405 - 0x7e; 6406 - 0x1c; 6407 - 0x0d; 6408 - 0x41; 6409 - 0x57; 6410 - 0xaa; 6411 - 0xb7; 6412 - 0xb8; 6413 - 0x27; 6414 - 0xbb; 6415 - 0xb1; 6416 - 0xe4; 6417 - 0xfa; 6418 - 0x2a; 6419 - 0xef; 6420 - 0x21; 6421 - 0x23; 6422 - 0x75; 6423 - 0x1a; 6424 - 0xad; 6425 - 0x2d; 6426 - 0x9b; 6427 - 0x86; 6428 - 0x35; 6429 - 0x8c; 6430 - 0x9c; 6431 - 0x77; 6432 - 0xb5; 6433 - 0x73; 6434 - 0xad; 6435 - 0xd8; 6436 - 0x94; 6437 - 0x2d; 6438 - 0xe4; 6439 - 0xf3; 6440 - 0x0c; 6441 - 0x9d; 6442 - 0xee; 6443 - 0xc1; 6444 - 0x4e; 6445 - 0x62; 6446 - 0x7e; 6447 - 0x17; 6448 - 0xc0; 6449 - 0x71; 6450 - 0x9e; 6451 - 0x2c; 6452 - 0xde; 6453 - 0xf1; 6454 - 0xf9; 6455 - 0x10; 6456 - 0x28; 6457 - 0x19; 6458 - 0x33; 6459 - 0x02; 6460 - 0x03; 6461 - 0x01; 6462 - 0x00; 6463 - 0x01; 6464 - 0xa3; 6465 - 0x82; 6466 - 0x01; 6467 - 0x49; 6468 - 0x30; 6469 - 0x82; 6470 - 0x01; 6471 - 0x45; 6472 - 0x30; 6473 - 0x12; 6474 - 0x06; 6475 - 0x03; 6476 - 0x55; 6477 - 0x1d; 6478 - 0x13; 6479 - 0x01; 6480 - 0x01; 6481 - 0xff; 6482 - 0x04; 6483 - 0x08; 6484 - 0x30; 6485 - 0x06; 6486 - 0x01; 6487 - 0x01; 6488 - 0xff; 6489 - 0x02; 6490 - 0x01; 6491 - 0x00; 6492 - 0x30; 6493 - 0x0e; 6494 - 0x06; 6495 - 0x03; 6496 - 0x55; 6497 - 0x1d; 6498 - 0x0f; 6499 - 0x01; 6500 - 0x01; 6501 - 0xff; 6502 - 0x04; 6503 - 0x04; 6504 - 0x03; 6505 - 0x02; 6506 - 0x01; 6507 - 0x86; 6508 - 0x30; 6509 - 0x1d; 6510 - 0x06; 6511 - 0x03; 6512 - 0x55; 6513 - 0x1d; 6514 - 0x25; 6515 - 0x04; 6516 - 0x16; 6517 - 0x30; 6518 - 0x14; 6519 - 0x06; 6520 - 0x08; 6521 - 0x2b; 6522 - 0x06; 6523 - 0x01; 6524 - 0x05; 6525 - 0x05; 6526 - 0x07; 6527 - 0x03; 6528 - 0x01; 6529 - 0x06; 6530 - 0x08; 6531 - 0x2b; 6532 - 0x06; 6533 - 0x01; 6534 - 0x05; 6535 - 0x05; 6536 - 0x07; 6537 - 0x03; 6538 - 0x02; 6539 - 0x30; 6540 - 0x34; 6541 - 0x06; 6542 - 0x08; 6543 - 0x2b; 6544 - 0x06; 6545 - 0x01; 6546 - 0x05; 6547 - 0x05; 6548 - 0x07; 6549 - 0x01; 6550 - 0x01; 6551 - 0x04; 6552 - 0x28; 6553 - 0x30; 6554 - 0x26; 6555 - 0x30; 6556 - 0x24; 6557 - 0x06; 6558 - 0x08; 6559 - 0x2b; 6560 - 0x06; 6561 - 0x01; 6562 - 0x05; 6563 - 0x05; 6564 - 0x07; 6565 - 0x30; 6566 - 0x01; 6567 - 0x86; 6568 - 0x18; 6569 - 0x68; 6570 - 0x74; 6571 - 0x74; 6572 - 0x70; 6573 - 0x3a; 6574 - 0x2f; 6575 - 0x2f; 6576 - 0x6f; 6577 - 0x63; 6578 - 0x73; 6579 - 0x70; 6580 - 0x2e; 6581 - 0x64; 6582 - 0x69; 6583 - 0x67; 6584 - 0x69; 6585 - 0x63; 6586 - 0x65; 6587 - 0x72; 6588 - 0x74; 6589 - 0x2e; 6590 - 0x63; 6591 - 0x6f; 6592 - 0x6d; 6593 - 0x30; 6594 - 0x4b; 6595 - 0x06; 6596 - 0x03; 6597 - 0x55; 6598 - 0x1d; 6599 - 0x1f; 6600 - 0x04; 6601 - 0x44; 6602 - 0x30; 6603 - 0x42; 6604 - 0x30; 6605 - 0x40; 6606 - 0xa0; 6607 - 0x3e; 6608 - 0xa0; 6609 - 0x3c; 6610 - 0x86; 6611 - 0x3a; 6612 - 0x68; 6613 - 0x74; 6614 - 0x74; 6615 - 0x70; 6616 - 0x3a; 6617 - 0x2f; 6618 - 0x2f; 6619 - 0x63; 6620 - 0x72; 6621 - 0x6c; 6622 - 0x34; 6623 - 0x2e; 6624 - 0x64; 6625 - 0x69; 6626 - 0x67; 6627 - 0x69; 6628 - 0x63; 6629 - 0x65; 6630 - 0x72; 6631 - 0x74; 6632 - 0x2e; 6633 - 0x63; 6634 - 0x6f; 6635 - 0x6d; 6636 - 0x2f; 6637 - 0x44; 6638 - 0x69; 6639 - 0x67; 6640 - 0x69; 6641 - 0x43; 6642 - 0x65; 6643 - 0x72; 6644 - 0x74; 6645 - 0x48; 6646 - 0x69; 6647 - 0x67; 6648 - 0x68; 6649 - 0x41; 6650 - 0x73; 6651 - 0x73; 6652 - 0x75; 6653 - 0x72; 6654 - 0x61; 6655 - 0x6e; 6656 - 0x63; 6657 - 0x65; 6658 - 0x45; 6659 - 0x56; 6660 - 0x52; 6661 - 0x6f; 6662 - 0x6f; 6663 - 0x74; 6664 - 0x43; 6665 - 0x41; 6666 - 0x2e; 6667 - 0x63; 6668 - 0x72; 6669 - 0x6c; 6670 - 0x30; 6671 - 0x3d; 6672 - 0x06; 6673 - 0x03; 6674 - 0x55; 6675 - 0x1d; 6676 - 0x20; 6677 - 0x04; 6678 - 0x36; 6679 - 0x30; 6680 - 0x34; 6681 - 0x30; 6682 - 0x32; 6683 - 0x06; 6684 - 0x04; 6685 - 0x55; 6686 - 0x1d; 6687 - 0x20; 6688 - 0x00; 6689 - 0x30; 6690 - 0x2a; 6691 - 0x30; 6692 - 0x28; 6693 - 0x06; 6694 - 0x08; 6695 - 0x2b; 6696 - 0x06; 6697 - 0x01; 6698 - 0x05; 6699 - 0x05; 6700 - 0x07; 6701 - 0x02; 6702 - 0x01; 6703 - 0x16; 6704 - 0x1c; 6705 - 0x68; 6706 - 0x74; 6707 - 0x74; 6708 - 0x70; 6709 - 0x73; 6710 - 0x3a; 6711 - 0x2f; 6712 - 0x2f; 6713 - 0x77; 6714 - 0x77; 6715 - 0x77; 6716 - 0x2e; 6717 - 0x64; 6718 - 0x69; 6719 - 0x67; 6720 - 0x69; 6721 - 0x63; 6722 - 0x65; 6723 - 0x72; 6724 - 0x74; 6725 - 0x2e; 6726 - 0x63; 6727 - 0x6f; 6728 - 0x6d; 6729 - 0x2f; 6730 - 0x43; 6731 - 0x50; 6732 - 0x53; 6733 - 0x30; 6734 - 0x1d; 6735 - 0x06; 6736 - 0x03; 6737 - 0x55; 6738 - 0x1d; 6739 - 0x0e; 6740 - 0x04; 6741 - 0x16; 6742 - 0x04; 6743 - 0x14; 6744 - 0x3d; 6745 - 0xd3; 6746 - 0x50; 6747 - 0xa5; 6748 - 0xd6; 6749 - 0xa0; 6750 - 0xad; 6751 - 0xee; 6752 - 0xf3; 6753 - 0x4a; 6754 - 0x60; 6755 - 0x0a; 6756 - 0x65; 6757 - 0xd3; 6758 - 0x21; 6759 - 0xd4; 6760 - 0xf8; 6761 - 0xf8; 6762 - 0xd6; 6763 - 0x0f; 6764 - 0x30; 6765 - 0x1f; 6766 - 0x06; 6767 - 0x03; 6768 - 0x55; 6769 - 0x1d; 6770 - 0x23; 6771 - 0x04; 6772 - 0x18; 6773 - 0x30; 6774 - 0x16; 6775 - 0x80; 6776 - 0x14; 6777 - 0xb1; 6778 - 0x3e; 6779 - 0xc3; 6780 - 0x69; 6781 - 0x03; 6782 - 0xf8; 6783 - 0xbf; 6784 - 0x47; 6785 - 0x01; 6786 - 0xd4; 6787 - 0x98; 6788 - 0x26; 6789 - 0x1a; 6790 - 0x08; 6791 - 0x02; 6792 - 0xef; 6793 - 0x63; 6794 - 0x64; 6795 - 0x2b; 6796 - 0xc3; 6797 - 0x30; 6798 - 0x0d; 6799 - 0x06; 6800 - 0x09; 6801 - 0x2a; 6802 - 0x86; 6803 - 0x48; 6804 - 0x86; 6805 - 0xf7; 6806 - 0x0d; 6807 - 0x01; 6808 - 0x01; 6809 - 0x0b; 6810 - 0x05; 6811 - 0x00; 6812 - 0x03; 6813 - 0x82; 6814 - 0x01; 6815 - 0x01; 6816 - 0x00; 6817 - 0x9d; 6818 - 0xb6; 6819 - 0xd0; 6820 - 0x90; 6821 - 0x86; 6822 - 0xe1; 6823 - 0x86; 6824 - 0x02; 6825 - 0xed; 6826 - 0xc5; 6827 - 0xa0; 6828 - 0xf0; 6829 - 0x34; 6830 - 0x1c; 6831 - 0x74; 6832 - 0xc1; 6833 - 0x8d; 6834 - 0x76; 6835 - 0xcc; 6836 - 0x86; 6837 - 0x0a; 6838 - 0xa8; 6839 - 0xf0; 6840 - 0x4a; 6841 - 0x8a; 6842 - 0x42; 6843 - 0xd6; 6844 - 0x3f; 6845 - 0xc8; 6846 - 0xa9; 6847 - 0x4d; 6848 - 0xad; 6849 - 0x7c; 6850 - 0x08; 6851 - 0xad; 6852 - 0xe6; 6853 - 0xb6; 6854 - 0x50; 6855 - 0xb8; 6856 - 0xa2; 6857 - 0x1a; 6858 - 0x4d; 6859 - 0x88; 6860 - 0x07; 6861 - 0xb1; 6862 - 0x29; 6863 - 0x21; 6864 - 0xdc; 6865 - 0xe7; 6866 - 0xda; 6867 - 0xc6; 6868 - 0x3c; 6869 - 0x21; 6870 - 0xe0; 6871 - 0xe3; 6872 - 0x11; 6873 - 0x49; 6874 - 0x70; 6875 - 0xac; 6876 - 0x7a; 6877 - 0x1d; 6878 - 0x01; 6879 - 0xa4; 6880 - 0xca; 6881 - 0x11; 6882 - 0x3a; 6883 - 0x57; 6884 - 0xab; 6885 - 0x7d; 6886 - 0x57; 6887 - 0x2a; 6888 - 0x40; 6889 - 0x74; 6890 - 0xfd; 6891 - 0xd3; 6892 - 0x1d; 6893 - 0x85; 6894 - 0x18; 6895 - 0x50; 6896 - 0xdf; 6897 - 0x57; 6898 - 0x47; 6899 - 0x75; 6900 - 0xa1; 6901 - 0x7d; 6902 - 0x55; 6903 - 0x20; 6904 - 0x2e; 6905 - 0x47; 6906 - 0x37; 6907 - 0x50; 6908 - 0x72; 6909 - 0x8c; 6910 - 0x7f; 6911 - 0x82; 6912 - 0x1b; 6913 - 0xd2; 6914 - 0x62; 6915 - 0x8f; 6916 - 0x2d; 6917 - 0x03; 6918 - 0x5a; 6919 - 0xda; 6920 - 0xc3; 6921 - 0xc8; 6922 - 0xa1; 6923 - 0xce; 6924 - 0x2c; 6925 - 0x52; 6926 - 0xa2; 6927 - 0x00; 6928 - 0x63; 6929 - 0xeb; 6930 - 0x73; 6931 - 0xba; 6932 - 0x71; 6933 - 0xc8; 6934 - 0x49; 6935 - 0x27; 6936 - 0x23; 6937 - 0x97; 6938 - 0x64; 6939 - 0x85; 6940 - 0x9e; 6941 - 0x38; 6942 - 0x0e; 6943 - 0xad; 6944 - 0x63; 6945 - 0x68; 6946 - 0x3c; 6947 - 0xba; 6948 - 0x52; 6949 - 0x81; 6950 - 0x58; 6951 - 0x79; 6952 - 0xa3; 6953 - 0x2c; 6954 - 0x0c; 6955 - 0xdf; 6956 - 0xde; 6957 - 0x6d; 6958 - 0xeb; 6959 - 0x31; 6960 - 0xf2; 6961 - 0xba; 6962 - 0xa0; 6963 - 0x7c; 6964 - 0x6c; 6965 - 0xf1; 6966 - 0x2c; 6967 - 0xd4; 6968 - 0xe1; 6969 - 0xbd; 6970 - 0x77; 6971 - 0x84; 6972 - 0x37; 6973 - 0x03; 6974 - 0xce; 6975 - 0x32; 6976 - 0xb5; 6977 - 0xc8; 6978 - 0x9a; 6979 - 0x81; 6980 - 0x1a; 6981 - 0x4a; 6982 - 0x92; 6983 - 0x4e; 6984 - 0x3b; 6985 - 0x46; 6986 - 0x9a; 6987 - 0x85; 6988 - 0xfe; 6989 - 0x83; 6990 - 0xa2; 6991 - 0xf9; 6992 - 0x9e; 6993 - 0x8c; 6994 - 0xa3; 6995 - 0xcc; 6996 - 0x0d; 6997 - 0x5e; 6998 - 0xb3; 6999 - 0x3d; 7000 - 0xcf; 7001 - 0x04; 7002 - 0x78; 7003 - 0x8f; 7004 - 0x14; 7005 - 0x14; 7006 - 0x7b; 7007 - 0x32; 7008 - 0x9c; 7009 - 0xc7; 7010 - 0x00; 7011 - 0xa6; 7012 - 0x5c; 7013 - 0xc4; 7014 - 0xb5; 7015 - 0xa1; 7016 - 0x55; 7017 - 0x8d; 7018 - 0x5a; 7019 - 0x56; 7020 - 0x68; 7021 - 0xa4; 7022 - 0x22; 7023 - 0x70; 7024 - 0xaa; 7025 - 0x3c; 7026 - 0x81; 7027 - 0x71; 7028 - 0xd9; 7029 - 0x9d; 7030 - 0xa8; 7031 - 0x45; 7032 - 0x3b; 7033 - 0xf4; 7034 - 0xe5; 7035 - 0xf6; 7036 - 0xa2; 7037 - 0x51; 7038 - 0xdd; 7039 - 0xc7; 7040 - 0x7b; 7041 - 0x62; 7042 - 0xe8; 7043 - 0x6f; 7044 - 0x0c; 7045 - 0x74; 7046 - 0xeb; 7047 - 0xb8; 7048 - 0xda; 7049 - 0xf8; 7050 - 0xbf; 7051 - 0x87; 7052 - 0x0d; 7053 - 0x79; 7054 - 0x50; 7055 - 0x91; 7056 - 0x90; 7057 - 0x9b; 7058 - 0x18; 7059 - 0x3b; 7060 - 0x91; 7061 - 0x59; 7062 - 0x27; 7063 - 0xf1; 7064 - 0x35; 7065 - 0x28; 7066 - 0x13; 7067 - 0xab; 7068 - 0x26; 7069 - 0x7e; 7070 - 0xd5; 7071 - 0xf7; 7072 - 0x7a; 7073 - ] 7074 - in 7075 - 7076 - [ 7077 - ([ 12; 0; 0; 12 ] @ data, Core.ServerKeyExchange data_cs); 7078 - ([ 20; 0; 0; 12 ] @ data, Core.Finished data_cs); 7079 - ([ 16; 0; 0; 12 ] @ data, Core.ClientKeyExchange data_cs); 7080 - ( [ 11; 0; 0; 3; 0; 0; 0 ], 7081 - Core.Certificate (Writer.assemble_certificates []) ); 7082 - ( [ 11; 0; 0; 18; 0; 0; 15; 0; 0; 12 ] @ data, 7083 - Core.Certificate (Writer.assemble_certificates [ data_cs ]) ); 7084 - ( [ 11; 0; 0; 33; 0; 0; 30; 0; 0; 12 ] @ data @ [ 0; 0; 12 ] @ data, 7085 - Core.Certificate (Writer.assemble_certificates [ data_cs; data_cs ]) ); 7086 - ( [ 7087 - 0x0b; 7088 - 0x00; 7089 - 0x0a; 7090 - 0xa7; 7091 - 0x00; 7092 - 0x0a; 7093 - 0xa4; 7094 - 0x00; 7095 - 0x05; 7096 - 0xe4; 7097 - 0x30; 7098 - 0x82; 7099 - 0x05; 7100 - 0xe0; 7101 - 0x30; 7102 - 0x82; 7103 - 0x04; 7104 - 0xc8; 7105 - 0xa0; 7106 - 0x03; 7107 - 0x02; 7108 - 0x01; 7109 - 0x02; 7110 - 0x02; 7111 - 0x10; 7112 - 0x0c; 7113 - 0x00; 7114 - 0x93; 7115 - 0x10; 7116 - 0xd2; 7117 - 0x06; 7118 - 0xdb; 7119 - 0xe3; 7120 - 0x37; 7121 - 0x55; 7122 - 0x35; 7123 - 0x80; 7124 - 0x11; 7125 - 0x8d; 7126 - 0xdc; 7127 - 0x87; 7128 - 0x30; 7129 - 0x0d; 7130 - 0x06; 7131 - 0x09; 7132 - 0x2a; 7133 - 0x86; 7134 - 0x48; 7135 - 0x86; 7136 - 0xf7; 7137 - 0x0d; 7138 - 0x01; 7139 - 0x01; 7140 - 0x0b; 7141 - 0x05; 7142 - 0x00; 7143 - 0x30; 7144 - 0x75; 7145 - 0x31; 7146 - 0x0b; 7147 - 0x30; 7148 - 0x09; 7149 - 0x06; 7150 - 0x03; 7151 - 0x55; 7152 - 0x04; 7153 - 0x06; 7154 - 0x13; 7155 - 0x02; 7156 - 0x55; 7157 - 0x53; 7158 - 0x31; 7159 - 0x15; 7160 - 0x30; 7161 - 0x13; 7162 - 0x06; 7163 - 0x03; 7164 - 0x55; 7165 - 0x04; 7166 - 0x0a; 7167 - 0x13; 7168 - 0x0c; 7169 - 0x44; 7170 - 0x69; 7171 - 0x67; 7172 - 0x69; 7173 - 0x43; 7174 - 0x65; 7175 - 0x72; 7176 - 0x74; 7177 - 0x20; 7178 - 0x49; 7179 - 0x6e; 7180 - 0x63; 7181 - 0x31; 7182 - 0x19; 7183 - 0x30; 7184 - 0x17; 7185 - 0x06; 7186 - 0x03; 7187 - 0x55; 7188 - 0x04; 7189 - 0x0b; 7190 - 0x13; 7191 - 0x10; 7192 - 0x77; 7193 - 0x77; 7194 - 0x77; 7195 - 0x2e; 7196 - 0x64; 7197 - 0x69; 7198 - 0x67; 7199 - 0x69; 7200 - 0x63; 7201 - 0x65; 7202 - 0x72; 7203 - 0x74; 7204 - 0x2e; 7205 - 0x63; 7206 - 0x6f; 7207 - 0x6d; 7208 - 0x31; 7209 - 0x34; 7210 - 0x30; 7211 - 0x32; 7212 - 0x06; 7213 - 0x03; 7214 - 0x55; 7215 - 0x04; 7216 - 0x03; 7217 - 0x13; 7218 - 0x2b; 7219 - 0x44; 7220 - 0x69; 7221 - 0x67; 7222 - 0x69; 7223 - 0x43; 7224 - 0x65; 7225 - 0x72; 7226 - 0x74; 7227 - 0x20; 7228 - 0x53; 7229 - 0x48; 7230 - 0x41; 7231 - 0x32; 7232 - 0x20; 7233 - 0x45; 7234 - 0x78; 7235 - 0x74; 7236 - 0x65; 7237 - 0x6e; 7238 - 0x64; 7239 - 0x65; 7240 - 0x64; 7241 - 0x20; 7242 - 0x56; 7243 - 0x61; 7244 - 0x6c; 7245 - 0x69; 7246 - 0x64; 7247 - 0x61; 7248 - 0x74; 7249 - 0x69; 7250 - 0x6f; 7251 - 0x6e; 7252 - 0x20; 7253 - 0x53; 7254 - 0x65; 7255 - 0x72; 7256 - 0x76; 7257 - 0x65; 7258 - 0x72; 7259 - 0x20; 7260 - 0x43; 7261 - 0x41; 7262 - 0x30; 7263 - 0x1e; 7264 - 0x17; 7265 - 0x0d; 7266 - 0x31; 7267 - 0x34; 7268 - 0x30; 7269 - 0x34; 7270 - 0x30; 7271 - 0x38; 7272 - 0x30; 7273 - 0x30; 7274 - 0x30; 7275 - 0x30; 7276 - 0x30; 7277 - 0x30; 7278 - 0x5a; 7279 - 0x17; 7280 - 0x0d; 7281 - 0x31; 7282 - 0x36; 7283 - 0x30; 7284 - 0x34; 7285 - 0x31; 7286 - 0x32; 7287 - 0x31; 7288 - 0x32; 7289 - 0x30; 7290 - 0x30; 7291 - 0x30; 7292 - 0x30; 7293 - 0x5a; 7294 - 0x30; 7295 - 0x81; 7296 - 0xf0; 7297 - 0x31; 7298 - 0x1d; 7299 - 0x30; 7300 - 0x1b; 7301 - 0x06; 7302 - 0x03; 7303 - 0x55; 7304 - 0x04; 7305 - 0x0f; 7306 - 0x0c; 7307 - 0x14; 7308 - 0x50; 7309 - 0x72; 7310 - 0x69; 7311 - 0x76; 7312 - 0x61; 7313 - 0x74; 7314 - 0x65; 7315 - 0x20; 7316 - 0x4f; 7317 - 0x72; 7318 - 0x67; 7319 - 0x61; 7320 - 0x6e; 7321 - 0x69; 7322 - 0x7a; 7323 - 0x61; 7324 - 0x74; 7325 - 0x69; 7326 - 0x6f; 7327 - 0x6e; 7328 - 0x31; 7329 - 0x13; 7330 - 0x30; 7331 - 0x11; 7332 - 0x06; 7333 - 0x0b; 7334 - 0x2b; 7335 - 0x06; 7336 - 0x01; 7337 - 0x04; 7338 - 0x01; 7339 - 0x82; 7340 - 0x37; 7341 - 0x3c; 7342 - 0x02; 7343 - 0x01; 7344 - 0x03; 7345 - 0x13; 7346 - 0x02; 7347 - 0x55; 7348 - 0x53; 7349 - 0x31; 7350 - 0x19; 7351 - 0x30; 7352 - 0x17; 7353 - 0x06; 7354 - 0x0b; 7355 - 0x2b; 7356 - 0x06; 7357 - 0x01; 7358 - 0x04; 7359 - 0x01; 7360 - 0x82; 7361 - 0x37; 7362 - 0x3c; 7363 - 0x02; 7364 - 0x01; 7365 - 0x02; 7366 - 0x13; 7367 - 0x08; 7368 - 0x44; 7369 - 0x65; 7370 - 0x6c; 7371 - 0x61; 7372 - 0x77; 7373 - 0x61; 7374 - 0x72; 7375 - 0x65; 7376 - 0x31; 7377 - 0x10; 7378 - 0x30; 7379 - 0x0e; 7380 - 0x06; 7381 - 0x03; 7382 - 0x55; 7383 - 0x04; 7384 - 0x05; 7385 - 0x13; 7386 - 0x07; 7387 - 0x35; 7388 - 0x31; 7389 - 0x35; 7390 - 0x37; 7391 - 0x35; 7392 - 0x35; 7393 - 0x30; 7394 - 0x31; 7395 - 0x17; 7396 - 0x30; 7397 - 0x15; 7398 - 0x06; 7399 - 0x03; 7400 - 0x55; 7401 - 0x04; 7402 - 0x09; 7403 - 0x13; 7404 - 0x0e; 7405 - 0x35; 7406 - 0x34; 7407 - 0x38; 7408 - 0x20; 7409 - 0x34; 7410 - 0x74; 7411 - 0x68; 7412 - 0x20; 7413 - 0x53; 7414 - 0x74; 7415 - 0x72; 7416 - 0x65; 7417 - 0x65; 7418 - 0x74; 7419 - 0x31; 7420 - 0x0e; 7421 - 0x30; 7422 - 0x0c; 7423 - 0x06; 7424 - 0x03; 7425 - 0x55; 7426 - 0x04; 7427 - 0x11; 7428 - 0x13; 7429 - 0x05; 7430 - 0x39; 7431 - 0x34; 7432 - 0x31; 7433 - 0x30; 7434 - 0x37; 7435 - 0x31; 7436 - 0x0b; 7437 - 0x30; 7438 - 0x09; 7439 - 0x06; 7440 - 0x03; 7441 - 0x55; 7442 - 0x04; 7443 - 0x06; 7444 - 0x13; 7445 - 0x02; 7446 - 0x55; 7447 - 0x53; 7448 - 0x31; 7449 - 0x13; 7450 - 0x30; 7451 - 0x11; 7452 - 0x06; 7453 - 0x03; 7454 - 0x55; 7455 - 0x04; 7456 - 0x08; 7457 - 0x13; 7458 - 0x0a; 7459 - 0x43; 7460 - 0x61; 7461 - 0x6c; 7462 - 0x69; 7463 - 0x66; 7464 - 0x6f; 7465 - 0x72; 7466 - 0x6e; 7467 - 0x69; 7468 - 0x61; 7469 - 0x31; 7470 - 0x16; 7471 - 0x30; 7472 - 0x14; 7473 - 0x06; 7474 - 0x03; 7475 - 0x55; 7476 - 0x04; 7477 - 0x07; 7478 - 0x13; 7479 - 0x0d; 7480 - 0x53; 7481 - 0x61; 7482 - 0x6e; 7483 - 0x20; 7484 - 0x46; 7485 - 0x72; 7486 - 0x61; 7487 - 0x6e; 7488 - 0x63; 7489 - 0x69; 7490 - 0x73; 7491 - 0x63; 7492 - 0x6f; 7493 - 0x31; 7494 - 0x15; 7495 - 0x30; 7496 - 0x13; 7497 - 0x06; 7498 - 0x03; 7499 - 0x55; 7500 - 0x04; 7501 - 0x0a; 7502 - 0x13; 7503 - 0x0c; 7504 - 0x47; 7505 - 0x69; 7506 - 0x74; 7507 - 0x48; 7508 - 0x75; 7509 - 0x62; 7510 - 0x2c; 7511 - 0x20; 7512 - 0x49; 7513 - 0x6e; 7514 - 0x63; 7515 - 0x2e; 7516 - 0x31; 7517 - 0x13; 7518 - 0x30; 7519 - 0x11; 7520 - 0x06; 7521 - 0x03; 7522 - 0x55; 7523 - 0x04; 7524 - 0x03; 7525 - 0x13; 7526 - 0x0a; 7527 - 0x67; 7528 - 0x69; 7529 - 0x74; 7530 - 0x68; 7531 - 0x75; 7532 - 0x62; 7533 - 0x2e; 7534 - 0x63; 7535 - 0x6f; 7536 - 0x6d; 7537 - 0x30; 7538 - 0x82; 7539 - 0x01; 7540 - 0x22; 7541 - 0x30; 7542 - 0x0d; 7543 - 0x06; 7544 - 0x09; 7545 - 0x2a; 7546 - 0x86; 7547 - 0x48; 7548 - 0x86; 7549 - 0xf7; 7550 - 0x0d; 7551 - 0x01; 7552 - 0x01; 7553 - 0x01; 7554 - 0x05; 7555 - 0x00; 7556 - 0x03; 7557 - 0x82; 7558 - 0x01; 7559 - 0x0f; 7560 - 0x00; 7561 - 0x30; 7562 - 0x82; 7563 - 0x01; 7564 - 0x0a; 7565 - 0x02; 7566 - 0x82; 7567 - 0x01; 7568 - 0x01; 7569 - 0x00; 7570 - 0xb1; 7571 - 0xd4; 7572 - 0xdc; 7573 - 0x3c; 7574 - 0xaf; 7575 - 0xfd; 7576 - 0xf3; 7577 - 0x4e; 7578 - 0xed; 7579 - 0xc1; 7580 - 0x67; 7581 - 0xad; 7582 - 0xe6; 7583 - 0xcb; 7584 - 0x22; 7585 - 0xe8; 7586 - 0xb7; 7587 - 0xe2; 7588 - 0xab; 7589 - 0x28; 7590 - 0xf2; 7591 - 0xf7; 7592 - 0xdc; 7593 - 0x62; 7594 - 0x70; 7595 - 0x08; 7596 - 0xd1; 7597 - 0x0c; 7598 - 0xaf; 7599 - 0xd6; 7600 - 0x16; 7601 - 0x6a; 7602 - 0x21; 7603 - 0xb0; 7604 - 0x36; 7605 - 0x4b; 7606 - 0x17; 7607 - 0x0d; 7608 - 0x36; 7609 - 0x63; 7610 - 0x04; 7611 - 0xae; 7612 - 0xbf; 7613 - 0xea; 7614 - 0x20; 7615 - 0x51; 7616 - 0x95; 7617 - 0x65; 7618 - 0x66; 7619 - 0xf2; 7620 - 0xbf; 7621 - 0xb9; 7622 - 0x4d; 7623 - 0xa4; 7624 - 0x0c; 7625 - 0x29; 7626 - 0xeb; 7627 - 0xf5; 7628 - 0x15; 7629 - 0xb1; 7630 - 0xe8; 7631 - 0x35; 7632 - 0xb3; 7633 - 0x70; 7634 - 0x10; 7635 - 0x94; 7636 - 0xd5; 7637 - 0x1b; 7638 - 0x59; 7639 - 0xb4; 7640 - 0x26; 7641 - 0x0f; 7642 - 0xd6; 7643 - 0x83; 7644 - 0x57; 7645 - 0x59; 7646 - 0x9d; 7647 - 0xe1; 7648 - 0x7c; 7649 - 0x09; 7650 - 0xdd; 7651 - 0xe0; 7652 - 0x13; 7653 - 0xca; 7654 - 0x4d; 7655 - 0x6f; 7656 - 0x43; 7657 - 0x9b; 7658 - 0xcd; 7659 - 0xcf; 7660 - 0x87; 7661 - 0x3a; 7662 - 0x15; 7663 - 0xa7; 7664 - 0x85; 7665 - 0xdd; 7666 - 0x66; 7667 - 0x83; 7668 - 0xed; 7669 - 0x93; 7670 - 0x0c; 7671 - 0xfe; 7672 - 0x2b; 7673 - 0x6d; 7674 - 0x38; 7675 - 0x1c; 7676 - 0x79; 7677 - 0x88; 7678 - 0x90; 7679 - 0xcf; 7680 - 0xad; 7681 - 0x58; 7682 - 0x18; 7683 - 0x2d; 7684 - 0x51; 7685 - 0xd1; 7686 - 0xc2; 7687 - 0xa3; 7688 - 0xf2; 7689 - 0x47; 7690 - 0x8c; 7691 - 0x6f; 7692 - 0x38; 7693 - 0x09; 7694 - 0xb9; 7695 - 0xb8; 7696 - 0xef; 7697 - 0x4c; 7698 - 0x93; 7699 - 0x0b; 7700 - 0xcb; 7701 - 0x83; 7702 - 0x94; 7703 - 0x87; 7704 - 0xea; 7705 - 0xe0; 7706 - 0xa3; 7707 - 0xb5; 7708 - 0xd9; 7709 - 0x7b; 7710 - 0x9b; 7711 - 0x6b; 7712 - 0x0f; 7713 - 0x43; 7714 - 0xf9; 7715 - 0xca; 7716 - 0xee; 7717 - 0x80; 7718 - 0x0d; 7719 - 0x28; 7720 - 0xa7; 7721 - 0x76; 7722 - 0xf1; 7723 - 0x25; 7724 - 0xf4; 7725 - 0xc1; 7726 - 0x35; 7727 - 0x3c; 7728 - 0xf6; 7729 - 0x74; 7730 - 0xad; 7731 - 0xde; 7732 - 0x6a; 7733 - 0x33; 7734 - 0x82; 7735 - 0x7b; 7736 - 0xdc; 7737 - 0xfd; 7738 - 0x4b; 7739 - 0x76; 7740 - 0xa7; 7741 - 0xc2; 7742 - 0xee; 7743 - 0xf2; 7744 - 0x6a; 7745 - 0xbf; 7746 - 0xa9; 7747 - 0x24; 7748 - 0xa6; 7749 - 0x5f; 7750 - 0xe7; 7751 - 0x2e; 7752 - 0x7c; 7753 - 0x0e; 7754 - 0xdb; 7755 - 0xc3; 7756 - 0x74; 7757 - 0x73; 7758 - 0xfa; 7759 - 0x7e; 7760 - 0xc6; 7761 - 0xd8; 7762 - 0xcf; 7763 - 0x60; 7764 - 0xeb; 7765 - 0x36; 7766 - 0x56; 7767 - 0x21; 7768 - 0xb6; 7769 - 0xc1; 7770 - 0x8a; 7771 - 0xb8; 7772 - 0x24; 7773 - 0x82; 7774 - 0x4d; 7775 - 0x78; 7776 - 0x24; 7777 - 0xba; 7778 - 0xe9; 7779 - 0x1d; 7780 - 0xa1; 7781 - 0x8a; 7782 - 0xa7; 7783 - 0x87; 7784 - 0xbe; 7785 - 0x66; 7786 - 0x25; 7787 - 0x69; 7788 - 0xbf; 7789 - 0xbe; 7790 - 0x3b; 7791 - 0x72; 7792 - 0x6e; 7793 - 0x4f; 7794 - 0xe0; 7795 - 0xe4; 7796 - 0x85; 7797 - 0x25; 7798 - 0x08; 7799 - 0xb1; 7800 - 0x91; 7801 - 0x89; 7802 - 0xb8; 7803 - 0xd6; 7804 - 0x74; 7805 - 0x65; 7806 - 0x76; 7807 - 0x9b; 7808 - 0x2c; 7809 - 0x4f; 7810 - 0x62; 7811 - 0x1f; 7812 - 0xa1; 7813 - 0xfa; 7814 - 0x3a; 7815 - 0xbe; 7816 - 0x9c; 7817 - 0x24; 7818 - 0xbf; 7819 - 0x9f; 7820 - 0xca; 7821 - 0xb0; 7822 - 0xc5; 7823 - 0xc0; 7824 - 0x67; 7825 - 0x8d; 7826 - 0x02; 7827 - 0x03; 7828 - 0x01; 7829 - 0x00; 7830 - 0x01; 7831 - 0xa3; 7832 - 0x82; 7833 - 0x01; 7834 - 0xee; 7835 - 0x30; 7836 - 0x82; 7837 - 0x01; 7838 - 0xea; 7839 - 0x30; 7840 - 0x1f; 7841 - 0x06; 7842 - 0x03; 7843 - 0x55; 7844 - 0x1d; 7845 - 0x23; 7846 - 0x04; 7847 - 0x18; 7848 - 0x30; 7849 - 0x16; 7850 - 0x80; 7851 - 0x14; 7852 - 0x3d; 7853 - 0xd3; 7854 - 0x50; 7855 - 0xa5; 7856 - 0xd6; 7857 - 0xa0; 7858 - 0xad; 7859 - 0xee; 7860 - 0xf3; 7861 - 0x4a; 7862 - 0x60; 7863 - 0x0a; 7864 - 0x65; 7865 - 0xd3; 7866 - 0x21; 7867 - 0xd4; 7868 - 0xf8; 7869 - 0xf8; 7870 - 0xd6; 7871 - 0x0f; 7872 - 0x30; 7873 - 0x1d; 7874 - 0x06; 7875 - 0x03; 7876 - 0x55; 7877 - 0x1d; 7878 - 0x0e; 7879 - 0x04; 7880 - 0x16; 7881 - 0x04; 7882 - 0x14; 7883 - 0x6a; 7884 - 0x43; 7885 - 0x90; 7886 - 0x7d; 7887 - 0x3b; 7888 - 0x98; 7889 - 0x14; 7890 - 0x72; 7891 - 0x52; 7892 - 0x95; 7893 - 0x3a; 7894 - 0xaa; 7895 - 0x28; 7896 - 0x0a; 7897 - 0x43; 7898 - 0xf8; 7899 - 0x51; 7900 - 0x7e; 7901 - 0xd3; 7902 - 0xa6; 7903 - 0x30; 7904 - 0x25; 7905 - 0x06; 7906 - 0x03; 7907 - 0x55; 7908 - 0x1d; 7909 - 0x11; 7910 - 0x04; 7911 - 0x1e; 7912 - 0x30; 7913 - 0x1c; 7914 - 0x82; 7915 - 0x0a; 7916 - 0x67; 7917 - 0x69; 7918 - 0x74; 7919 - 0x68; 7920 - 0x75; 7921 - 0x62; 7922 - 0x2e; 7923 - 0x63; 7924 - 0x6f; 7925 - 0x6d; 7926 - 0x82; 7927 - 0x0e; 7928 - 0x77; 7929 - 0x77; 7930 - 0x77; 7931 - 0x2e; 7932 - 0x67; 7933 - 0x69; 7934 - 0x74; 7935 - 0x68; 7936 - 0x75; 7937 - 0x62; 7938 - 0x2e; 7939 - 0x63; 7940 - 0x6f; 7941 - 0x6d; 7942 - 0x30; 7943 - 0x0e; 7944 - 0x06; 7945 - 0x03; 7946 - 0x55; 7947 - 0x1d; 7948 - 0x0f; 7949 - 0x01; 7950 - 0x01; 7951 - 0xff; 7952 - 0x04; 7953 - 0x04; 7954 - 0x03; 7955 - 0x02; 7956 - 0x05; 7957 - 0xa0; 7958 - 0x30; 7959 - 0x1d; 7960 - 0x06; 7961 - 0x03; 7962 - 0x55; 7963 - 0x1d; 7964 - 0x25; 7965 - 0x04; 7966 - 0x16; 7967 - 0x30; 7968 - 0x14; 7969 - 0x06; 7970 - 0x08; 7971 - 0x2b; 7972 - 0x06; 7973 - 0x01; 7974 - 0x05; 7975 - 0x05; 7976 - 0x07; 7977 - 0x03; 7978 - 0x01; 7979 - 0x06; 7980 - 0x08; 7981 - 0x2b; 7982 - 0x06; 7983 - 0x01; 7984 - 0x05; 7985 - 0x05; 7986 - 0x07; 7987 - 0x03; 7988 - 0x02; 7989 - 0x30; 7990 - 0x75; 7991 - 0x06; 7992 - 0x03; 7993 - 0x55; 7994 - 0x1d; 7995 - 0x1f; 7996 - 0x04; 7997 - 0x6e; 7998 - 0x30; 7999 - 0x6c; 8000 - 0x30; 8001 - 0x34; 8002 - 0xa0; 8003 - 0x32; 8004 - 0xa0; 8005 - 0x30; 8006 - 0x86; 8007 - 0x2e; 8008 - 0x68; 8009 - 0x74; 8010 - 0x74; 8011 - 0x70; 8012 - 0x3a; 8013 - 0x2f; 8014 - 0x2f; 8015 - 0x63; 8016 - 0x72; 8017 - 0x6c; 8018 - 0x33; 8019 - 0x2e; 8020 - 0x64; 8021 - 0x69; 8022 - 0x67; 8023 - 0x69; 8024 - 0x63; 8025 - 0x65; 8026 - 0x72; 8027 - 0x74; 8028 - 0x2e; 8029 - 0x63; 8030 - 0x6f; 8031 - 0x6d; 8032 - 0x2f; 8033 - 0x73; 8034 - 0x68; 8035 - 0x61; 8036 - 0x32; 8037 - 0x2d; 8038 - 0x65; 8039 - 0x76; 8040 - 0x2d; 8041 - 0x73; 8042 - 0x65; 8043 - 0x72; 8044 - 0x76; 8045 - 0x65; 8046 - 0x72; 8047 - 0x2d; 8048 - 0x67; 8049 - 0x31; 8050 - 0x2e; 8051 - 0x63; 8052 - 0x72; 8053 - 0x6c; 8054 - 0x30; 8055 - 0x34; 8056 - 0xa0; 8057 - 0x32; 8058 - 0xa0; 8059 - 0x30; 8060 - 0x86; 8061 - 0x2e; 8062 - 0x68; 8063 - 0x74; 8064 - 0x74; 8065 - 0x70; 8066 - 0x3a; 8067 - 0x2f; 8068 - 0x2f; 8069 - 0x63; 8070 - 0x72; 8071 - 0x6c; 8072 - 0x34; 8073 - 0x2e; 8074 - 0x64; 8075 - 0x69; 8076 - 0x67; 8077 - 0x69; 8078 - 0x63; 8079 - 0x65; 8080 - 0x72; 8081 - 0x74; 8082 - 0x2e; 8083 - 0x63; 8084 - 0x6f; 8085 - 0x6d; 8086 - 0x2f; 8087 - 0x73; 8088 - 0x68; 8089 - 0x61; 8090 - 0x32; 8091 - 0x2d; 8092 - 0x65; 8093 - 0x76; 8094 - 0x2d; 8095 - 0x73; 8096 - 0x65; 8097 - 0x72; 8098 - 0x76; 8099 - 0x65; 8100 - 0x72; 8101 - 0x2d; 8102 - 0x67; 8103 - 0x31; 8104 - 0x2e; 8105 - 0x63; 8106 - 0x72; 8107 - 0x6c; 8108 - 0x30; 8109 - 0x42; 8110 - 0x06; 8111 - 0x03; 8112 - 0x55; 8113 - 0x1d; 8114 - 0x20; 8115 - 0x04; 8116 - 0x3b; 8117 - 0x30; 8118 - 0x39; 8119 - 0x30; 8120 - 0x37; 8121 - 0x06; 8122 - 0x09; 8123 - 0x60; 8124 - 0x86; 8125 - 0x48; 8126 - 0x01; 8127 - 0x86; 8128 - 0xfd; 8129 - 0x6c; 8130 - 0x02; 8131 - 0x01; 8132 - 0x30; 8133 - 0x2a; 8134 - 0x30; 8135 - 0x28; 8136 - 0x06; 8137 - 0x08; 8138 - 0x2b; 8139 - 0x06; 8140 - 0x01; 8141 - 0x05; 8142 - 0x05; 8143 - 0x07; 8144 - 0x02; 8145 - 0x01; 8146 - 0x16; 8147 - 0x1c; 8148 - 0x68; 8149 - 0x74; 8150 - 0x74; 8151 - 0x70; 8152 - 0x73; 8153 - 0x3a; 8154 - 0x2f; 8155 - 0x2f; 8156 - 0x77; 8157 - 0x77; 8158 - 0x77; 8159 - 0x2e; 8160 - 0x64; 8161 - 0x69; 8162 - 0x67; 8163 - 0x69; 8164 - 0x63; 8165 - 0x65; 8166 - 0x72; 8167 - 0x74; 8168 - 0x2e; 8169 - 0x63; 8170 - 0x6f; 8171 - 0x6d; 8172 - 0x2f; 8173 - 0x43; 8174 - 0x50; 8175 - 0x53; 8176 - 0x30; 8177 - 0x81; 8178 - 0x88; 8179 - 0x06; 8180 - 0x08; 8181 - 0x2b; 8182 - 0x06; 8183 - 0x01; 8184 - 0x05; 8185 - 0x05; 8186 - 0x07; 8187 - 0x01; 8188 - 0x01; 8189 - 0x04; 8190 - 0x7c; 8191 - 0x30; 8192 - 0x7a; 8193 - 0x30; 8194 - 0x24; 8195 - 0x06; 8196 - 0x08; 8197 - 0x2b; 8198 - 0x06; 8199 - 0x01; 8200 - 0x05; 8201 - 0x05; 8202 - 0x07; 8203 - 0x30; 8204 - 0x01; 8205 - 0x86; 8206 - 0x18; 8207 - 0x68; 8208 - 0x74; 8209 - 0x74; 8210 - 0x70; 8211 - 0x3a; 8212 - 0x2f; 8213 - 0x2f; 8214 - 0x6f; 8215 - 0x63; 8216 - 0x73; 8217 - 0x70; 8218 - 0x2e; 8219 - 0x64; 8220 - 0x69; 8221 - 0x67; 8222 - 0x69; 8223 - 0x63; 8224 - 0x65; 8225 - 0x72; 8226 - 0x74; 8227 - 0x2e; 8228 - 0x63; 8229 - 0x6f; 8230 - 0x6d; 8231 - 0x30; 8232 - 0x52; 8233 - 0x06; 8234 - 0x08; 8235 - 0x2b; 8236 - 0x06; 8237 - 0x01; 8238 - 0x05; 8239 - 0x05; 8240 - 0x07; 8241 - 0x30; 8242 - 0x02; 8243 - 0x86; 8244 - 0x46; 8245 - 0x68; 8246 - 0x74; 8247 - 0x74; 8248 - 0x70; 8249 - 0x3a; 8250 - 0x2f; 8251 - 0x2f; 8252 - 0x63; 8253 - 0x61; 8254 - 0x63; 8255 - 0x65; 8256 - 0x72; 8257 - 0x74; 8258 - 0x73; 8259 - 0x2e; 8260 - 0x64; 8261 - 0x69; 8262 - 0x67; 8263 - 0x69; 8264 - 0x63; 8265 - 0x65; 8266 - 0x72; 8267 - 0x74; 8268 - 0x2e; 8269 - 0x63; 8270 - 0x6f; 8271 - 0x6d; 8272 - 0x2f; 8273 - 0x44; 8274 - 0x69; 8275 - 0x67; 8276 - 0x69; 8277 - 0x43; 8278 - 0x65; 8279 - 0x72; 8280 - 0x74; 8281 - 0x53; 8282 - 0x48; 8283 - 0x41; 8284 - 0x32; 8285 - 0x45; 8286 - 0x78; 8287 - 0x74; 8288 - 0x65; 8289 - 0x6e; 8290 - 0x64; 8291 - 0x65; 8292 - 0x64; 8293 - 0x56; 8294 - 0x61; 8295 - 0x6c; 8296 - 0x69; 8297 - 0x64; 8298 - 0x61; 8299 - 0x74; 8300 - 0x69; 8301 - 0x6f; 8302 - 0x6e; 8303 - 0x53; 8304 - 0x65; 8305 - 0x72; 8306 - 0x76; 8307 - 0x65; 8308 - 0x72; 8309 - 0x43; 8310 - 0x41; 8311 - 0x2e; 8312 - 0x63; 8313 - 0x72; 8314 - 0x74; 8315 - 0x30; 8316 - 0x0c; 8317 - 0x06; 8318 - 0x03; 8319 - 0x55; 8320 - 0x1d; 8321 - 0x13; 8322 - 0x01; 8323 - 0x01; 8324 - 0xff; 8325 - 0x04; 8326 - 0x02; 8327 - 0x30; 8328 - 0x00; 8329 - 0x30; 8330 - 0x0d; 8331 - 0x06; 8332 - 0x09; 8333 - 0x2a; 8334 - 0x86; 8335 - 0x48; 8336 - 0x86; 8337 - 0xf7; 8338 - 0x0d; 8339 - 0x01; 8340 - 0x01; 8341 - 0x0b; 8342 - 0x05; 8343 - 0x00; 8344 - 0x03; 8345 - 0x82; 8346 - 0x01; 8347 - 0x01; 8348 - 0x00; 8349 - 0x6f; 8350 - 0xe7; 8351 - 0x6d; 8352 - 0xcb; 8353 - 0x82; 8354 - 0xf3; 8355 - 0xef; 8356 - 0x90; 8357 - 0x87; 8358 - 0x09; 8359 - 0xd7; 8360 - 0x0f; 8361 - 0x15; 8362 - 0x22; 8363 - 0x2c; 8364 - 0x8c; 8365 - 0xfe; 8366 - 0xd3; 8367 - 0xab; 8368 - 0x1c; 8369 - 0x8a; 8370 - 0x96; 8371 - 0xdb; 8372 - 0x5d; 8373 - 0x12; 8374 - 0x5d; 8375 - 0xd1; 8376 - 0x78; 8377 - 0xc0; 8378 - 0x31; 8379 - 0xb0; 8380 - 0xff; 8381 - 0x45; 8382 - 0xc8; 8383 - 0x89; 8384 - 0xf7; 8385 - 0x08; 8386 - 0x98; 8387 - 0x52; 8388 - 0x17; 8389 - 0x1f; 8390 - 0x4c; 8391 - 0x4b; 8392 - 0x20; 8393 - 0x64; 8394 - 0x6a; 8395 - 0x6d; 8396 - 0xdb; 8397 - 0x50; 8398 - 0xd7; 8399 - 0x10; 8400 - 0xbe; 8401 - 0x7e; 8402 - 0xab; 8403 - 0xfe; 8404 - 0x2f; 8405 - 0x80; 8406 - 0xd8; 8407 - 0xa9; 8408 - 0x4a; 8409 - 0x58; 8410 - 0x41; 8411 - 0x69; 8412 - 0x81; 8413 - 0x72; 8414 - 0x19; 8415 - 0x08; 8416 - 0x83; 8417 - 0x9b; 8418 - 0x92; 8419 - 0x10; 8420 - 0x4e; 8421 - 0x62; 8422 - 0x2d; 8423 - 0x7b; 8424 - 0x46; 8425 - 0x70; 8426 - 0x43; 8427 - 0x6e; 8428 - 0xa3; 8429 - 0x53; 8430 - 0x13; 8431 - 0x1f; 8432 - 0xe2; 8433 - 0x93; 8434 - 0xa6; 8435 - 0x23; 8436 - 0x5b; 8437 - 0xf7; 8438 - 0x92; 8439 - 0x3e; 8440 - 0x37; 8441 - 0x14; 8442 - 0x75; 8443 - 0x3b; 8444 - 0xb9; 8445 - 0x4b; 8446 - 0x24; 8447 - 0x41; 8448 - 0x2e; 8449 - 0xa5; 8450 - 0x3d; 8451 - 0x48; 8452 - 0x0d; 8453 - 0x0f; 8454 - 0x99; 8455 - 0xea; 8456 - 0x1e; 8457 - 0x42; 8458 - 0x97; 8459 - 0xc6; 8460 - 0xfe; 8461 - 0x95; 8462 - 0xda; 8463 - 0xab; 8464 - 0x47; 8465 - 0x9a; 8466 - 0xcb; 8467 - 0x2b; 8468 - 0x03; 8469 - 0xd6; 8470 - 0x0d; 8471 - 0x40; 8472 - 0xc1; 8473 - 0x0a; 8474 - 0xf7; 8475 - 0x78; 8476 - 0x1a; 8477 - 0xda; 8478 - 0xb5; 8479 - 0x83; 8480 - 0xa4; 8481 - 0xad; 8482 - 0xb5; 8483 - 0x99; 8484 - 0x49; 8485 - 0x20; 8486 - 0x2e; 8487 - 0xf8; 8488 - 0x93; 8489 - 0x3c; 8490 - 0x1e; 8491 - 0x6c; 8492 - 0x3d; 8493 - 0xd1; 8494 - 0x3b; 8495 - 0x23; 8496 - 0x3a; 8497 - 0x6b; 8498 - 0x38; 8499 - 0x2a; 8500 - 0x7e; 8501 - 0x62; 8502 - 0x7a; 8503 - 0x5f; 8504 - 0xdd; 8505 - 0x17; 8506 - 0x05; 8507 - 0x75; 8508 - 0xd0; 8509 - 0x24; 8510 - 0x5d; 8511 - 0xbe; 8512 - 0x8d; 8513 - 0xa8; 8514 - 0x9a; 8515 - 0x10; 8516 - 0x44; 8517 - 0xfa; 8518 - 0xd2; 8519 - 0xb4; 8520 - 0xca; 8521 - 0xef; 8522 - 0xd7; 8523 - 0xd0; 8524 - 0xb5; 8525 - 0x76; 8526 - 0xa5; 8527 - 0x26; 8528 - 0x25; 8529 - 0x1c; 8530 - 0x08; 8531 - 0x41; 8532 - 0xd8; 8533 - 0x64; 8534 - 0x92; 8535 - 0xa7; 8536 - 0xaf; 8537 - 0x7d; 8538 - 0xfe; 8539 - 0x88; 8540 - 0x40; 8541 - 0x39; 8542 - 0x61; 8543 - 0x0b; 8544 - 0xc0; 8545 - 0x48; 8546 - 0x30; 8547 - 0xa9; 8548 - 0x82; 8549 - 0x34; 8550 - 0xad; 8551 - 0xf7; 8552 - 0x70; 8553 - 0x46; 8554 - 0x03; 8555 - 0x7c; 8556 - 0x35; 8557 - 0x91; 8558 - 0x3a; 8559 - 0xd5; 8560 - 0xbb; 8561 - 0x24; 8562 - 0xd8; 8563 - 0x01; 8564 - 0xbc; 8565 - 0x14; 8566 - 0xf0; 8567 - 0xc3; 8568 - 0x0f; 8569 - 0x23; 8570 - 0x3b; 8571 - 0x58; 8572 - 0x32; 8573 - 0xba; 8574 - 0x0f; 8575 - 0x12; 8576 - 0x6c; 8577 - 0x66; 8578 - 0x7a; 8579 - 0x6d; 8580 - 0x9d; 8581 - 0xe4; 8582 - 0xf0; 8583 - 0xe5; 8584 - 0x7c; 8585 - 0x5d; 8586 - 0x7e; 8587 - 0x02; 8588 - 0xd8; 8589 - 0xd7; 8590 - 0xac; 8591 - 0x89; 8592 - 0x97; 8593 - 0x0b; 8594 - 0x61; 8595 - 0xb7; 8596 - 0x36; 8597 - 0x9f; 8598 - 0xb0; 8599 - 0x7d; 8600 - 0x3b; 8601 - 0xee; 8602 - 0xb7; 8603 - 0x33; 8604 - 0x69; 8605 - 0x00; 8606 - 0x04; 8607 - 0xba; 8608 - 0x30; 8609 - 0x82; 8610 - 0x04; 8611 - 0xb6; 8612 - 0x30; 8613 - 0x82; 8614 - 0x03; 8615 - 0x9e; 8616 - 0xa0; 8617 - 0x03; 8618 - 0x02; 8619 - 0x01; 8620 - 0x02; 8621 - 0x02; 8622 - 0x10; 8623 - 0x0c; 8624 - 0x79; 8625 - 0xa9; 8626 - 0x44; 8627 - 0xb0; 8628 - 0x8c; 8629 - 0x11; 8630 - 0x95; 8631 - 0x20; 8632 - 0x92; 8633 - 0x61; 8634 - 0x5f; 8635 - 0xe2; 8636 - 0x6b; 8637 - 0x1d; 8638 - 0x83; 8639 - 0x30; 8640 - 0x0d; 8641 - 0x06; 8642 - 0x09; 8643 - 0x2a; 8644 - 0x86; 8645 - 0x48; 8646 - 0x86; 8647 - 0xf7; 8648 - 0x0d; 8649 - 0x01; 8650 - 0x01; 8651 - 0x0b; 8652 - 0x05; 8653 - 0x00; 8654 - 0x30; 8655 - 0x6c; 8656 - 0x31; 8657 - 0x0b; 8658 - 0x30; 8659 - 0x09; 8660 - 0x06; 8661 - 0x03; 8662 - 0x55; 8663 - 0x04; 8664 - 0x06; 8665 - 0x13; 8666 - 0x02; 8667 - 0x55; 8668 - 0x53; 8669 - 0x31; 8670 - 0x15; 8671 - 0x30; 8672 - 0x13; 8673 - 0x06; 8674 - 0x03; 8675 - 0x55; 8676 - 0x04; 8677 - 0x0a; 8678 - 0x13; 8679 - 0x0c; 8680 - 0x44; 8681 - 0x69; 8682 - 0x67; 8683 - 0x69; 8684 - 0x43; 8685 - 0x65; 8686 - 0x72; 8687 - 0x74; 8688 - 0x20; 8689 - 0x49; 8690 - 0x6e; 8691 - 0x63; 8692 - 0x31; 8693 - 0x19; 8694 - 0x30; 8695 - 0x17; 8696 - 0x06; 8697 - 0x03; 8698 - 0x55; 8699 - 0x04; 8700 - 0x0b; 8701 - 0x13; 8702 - 0x10; 8703 - 0x77; 8704 - 0x77; 8705 - 0x77; 8706 - 0x2e; 8707 - 0x64; 8708 - 0x69; 8709 - 0x67; 8710 - 0x69; 8711 - 0x63; 8712 - 0x65; 8713 - 0x72; 8714 - 0x74; 8715 - 0x2e; 8716 - 0x63; 8717 - 0x6f; 8718 - 0x6d; 8719 - 0x31; 8720 - 0x2b; 8721 - 0x30; 8722 - 0x29; 8723 - 0x06; 8724 - 0x03; 8725 - 0x55; 8726 - 0x04; 8727 - 0x03; 8728 - 0x13; 8729 - 0x22; 8730 - 0x44; 8731 - 0x69; 8732 - 0x67; 8733 - 0x69; 8734 - 0x43; 8735 - 0x65; 8736 - 0x72; 8737 - 0x74; 8738 - 0x20; 8739 - 0x48; 8740 - 0x69; 8741 - 0x67; 8742 - 0x68; 8743 - 0x20; 8744 - 0x41; 8745 - 0x73; 8746 - 0x73; 8747 - 0x75; 8748 - 0x72; 8749 - 0x61; 8750 - 0x6e; 8751 - 0x63; 8752 - 0x65; 8753 - 0x20; 8754 - 0x45; 8755 - 0x56; 8756 - 0x20; 8757 - 0x52; 8758 - 0x6f; 8759 - 0x6f; 8760 - 0x74; 8761 - 0x20; 8762 - 0x43; 8763 - 0x41; 8764 - 0x30; 8765 - 0x1e; 8766 - 0x17; 8767 - 0x0d; 8768 - 0x31; 8769 - 0x33; 8770 - 0x31; 8771 - 0x30; 8772 - 0x32; 8773 - 0x32; 8774 - 0x31; 8775 - 0x32; 8776 - 0x30; 8777 - 0x30; 8778 - 0x30; 8779 - 0x30; 8780 - 0x5a; 8781 - 0x17; 8782 - 0x0d; 8783 - 0x32; 8784 - 0x38; 8785 - 0x31; 8786 - 0x30; 8787 - 0x32; 8788 - 0x32; 8789 - 0x31; 8790 - 0x32; 8791 - 0x30; 8792 - 0x30; 8793 - 0x30; 8794 - 0x30; 8795 - 0x5a; 8796 - 0x30; 8797 - 0x75; 8798 - 0x31; 8799 - 0x0b; 8800 - 0x30; 8801 - 0x09; 8802 - 0x06; 8803 - 0x03; 8804 - 0x55; 8805 - 0x04; 8806 - 0x06; 8807 - 0x13; 8808 - 0x02; 8809 - 0x55; 8810 - 0x53; 8811 - 0x31; 8812 - 0x15; 8813 - 0x30; 8814 - 0x13; 8815 - 0x06; 8816 - 0x03; 8817 - 0x55; 8818 - 0x04; 8819 - 0x0a; 8820 - 0x13; 8821 - 0x0c; 8822 - 0x44; 8823 - 0x69; 8824 - 0x67; 8825 - 0x69; 8826 - 0x43; 8827 - 0x65; 8828 - 0x72; 8829 - 0x74; 8830 - 0x20; 8831 - 0x49; 8832 - 0x6e; 8833 - 0x63; 8834 - 0x31; 8835 - 0x19; 8836 - 0x30; 8837 - 0x17; 8838 - 0x06; 8839 - 0x03; 8840 - 0x55; 8841 - 0x04; 8842 - 0x0b; 8843 - 0x13; 8844 - 0x10; 8845 - 0x77; 8846 - 0x77; 8847 - 0x77; 8848 - 0x2e; 8849 - 0x64; 8850 - 0x69; 8851 - 0x67; 8852 - 0x69; 8853 - 0x63; 8854 - 0x65; 8855 - 0x72; 8856 - 0x74; 8857 - 0x2e; 8858 - 0x63; 8859 - 0x6f; 8860 - 0x6d; 8861 - 0x31; 8862 - 0x34; 8863 - 0x30; 8864 - 0x32; 8865 - 0x06; 8866 - 0x03; 8867 - 0x55; 8868 - 0x04; 8869 - 0x03; 8870 - 0x13; 8871 - 0x2b; 8872 - 0x44; 8873 - 0x69; 8874 - 0x67; 8875 - 0x69; 8876 - 0x43; 8877 - 0x65; 8878 - 0x72; 8879 - 0x74; 8880 - 0x20; 8881 - 0x53; 8882 - 0x48; 8883 - 0x41; 8884 - 0x32; 8885 - 0x20; 8886 - 0x45; 8887 - 0x78; 8888 - 0x74; 8889 - 0x65; 8890 - 0x6e; 8891 - 0x64; 8892 - 0x65; 8893 - 0x64; 8894 - 0x20; 8895 - 0x56; 8896 - 0x61; 8897 - 0x6c; 8898 - 0x69; 8899 - 0x64; 8900 - 0x61; 8901 - 0x74; 8902 - 0x69; 8903 - 0x6f; 8904 - 0x6e; 8905 - 0x20; 8906 - 0x53; 8907 - 0x65; 8908 - 0x72; 8909 - 0x76; 8910 - 0x65; 8911 - 0x72; 8912 - 0x20; 8913 - 0x43; 8914 - 0x41; 8915 - 0x30; 8916 - 0x82; 8917 - 0x01; 8918 - 0x22; 8919 - 0x30; 8920 - 0x0d; 8921 - 0x06; 8922 - 0x09; 8923 - 0x2a; 8924 - 0x86; 8925 - 0x48; 8926 - 0x86; 8927 - 0xf7; 8928 - 0x0d; 8929 - 0x01; 8930 - 0x01; 8931 - 0x01; 8932 - 0x05; 8933 - 0x00; 8934 - 0x03; 8935 - 0x82; 8936 - 0x01; 8937 - 0x0f; 8938 - 0x00; 8939 - 0x30; 8940 - 0x82; 8941 - 0x01; 8942 - 0x0a; 8943 - 0x02; 8944 - 0x82; 8945 - 0x01; 8946 - 0x01; 8947 - 0x00; 8948 - 0xd7; 8949 - 0x53; 8950 - 0xa4; 8951 - 0x04; 8952 - 0x51; 8953 - 0xf8; 8954 - 0x99; 8955 - 0xa6; 8956 - 0x16; 8957 - 0x48; 8958 - 0x4b; 8959 - 0x67; 8960 - 0x27; 8961 - 0xaa; 8962 - 0x93; 8963 - 0x49; 8964 - 0xd0; 8965 - 0x39; 8966 - 0xed; 8967 - 0x0c; 8968 - 0xb0; 8969 - 0xb0; 8970 - 0x00; 8971 - 0x87; 8972 - 0xf1; 8973 - 0x67; 8974 - 0x28; 8975 - 0x86; 8976 - 0x85; 8977 - 0x8c; 8978 - 0x8e; 8979 - 0x63; 8980 - 0xda; 8981 - 0xbc; 8982 - 0xb1; 8983 - 0x40; 8984 - 0x38; 8985 - 0xe2; 8986 - 0xd3; 8987 - 0xf5; 8988 - 0xec; 8989 - 0xa5; 8990 - 0x05; 8991 - 0x18; 8992 - 0xb8; 8993 - 0x3d; 8994 - 0x3e; 8995 - 0xc5; 8996 - 0x99; 8997 - 0x17; 8998 - 0x32; 8999 - 0xec; 9000 - 0x18; 9001 - 0x8c; 9002 - 0xfa; 9003 - 0xf1; 9004 - 0x0c; 9005 - 0xa6; 9006 - 0x64; 9007 - 0x21; 9008 - 0x85; 9009 - 0xcb; 9010 - 0x07; 9011 - 0x10; 9012 - 0x34; 9013 - 0xb0; 9014 - 0x52; 9015 - 0x88; 9016 - 0x2b; 9017 - 0x1f; 9018 - 0x68; 9019 - 0x9b; 9020 - 0xd2; 9021 - 0xb1; 9022 - 0x8f; 9023 - 0x12; 9024 - 0xb0; 9025 - 0xb3; 9026 - 0xd2; 9027 - 0xe7; 9028 - 0x88; 9029 - 0x1f; 9030 - 0x1f; 9031 - 0xef; 9032 - 0x38; 9033 - 0x77; 9034 - 0x54; 9035 - 0x53; 9036 - 0x5f; 9037 - 0x80; 9038 - 0x79; 9039 - 0x3f; 9040 - 0x2e; 9041 - 0x1a; 9042 - 0xaa; 9043 - 0xa8; 9044 - 0x1e; 9045 - 0x4b; 9046 - 0x2b; 9047 - 0x0d; 9048 - 0xab; 9049 - 0xb7; 9050 - 0x63; 9051 - 0xb9; 9052 - 0x35; 9053 - 0xb7; 9054 - 0x7d; 9055 - 0x14; 9056 - 0xbc; 9057 - 0x59; 9058 - 0x4b; 9059 - 0xdf; 9060 - 0x51; 9061 - 0x4a; 9062 - 0xd2; 9063 - 0xa1; 9064 - 0xe2; 9065 - 0x0c; 9066 - 0xe2; 9067 - 0x90; 9068 - 0x82; 9069 - 0x87; 9070 - 0x6a; 9071 - 0xae; 9072 - 0xea; 9073 - 0xd7; 9074 - 0x64; 9075 - 0xd6; 9076 - 0x98; 9077 - 0x55; 9078 - 0xe8; 9079 - 0xfd; 9080 - 0xaf; 9081 - 0x1a; 9082 - 0x50; 9083 - 0x6c; 9084 - 0x54; 9085 - 0xbc; 9086 - 0x11; 9087 - 0xf2; 9088 - 0xfd; 9089 - 0x4a; 9090 - 0xf2; 9091 - 0x9d; 9092 - 0xbb; 9093 - 0x7f; 9094 - 0x0e; 9095 - 0xf4; 9096 - 0xd5; 9097 - 0xbe; 9098 - 0x8e; 9099 - 0x16; 9100 - 0x89; 9101 - 0x12; 9102 - 0x55; 9103 - 0xd8; 9104 - 0xc0; 9105 - 0x71; 9106 - 0x34; 9107 - 0xee; 9108 - 0xf6; 9109 - 0xdc; 9110 - 0x2d; 9111 - 0xec; 9112 - 0xc4; 9113 - 0x87; 9114 - 0x25; 9115 - 0x86; 9116 - 0x8d; 9117 - 0xd8; 9118 - 0x21; 9119 - 0xe4; 9120 - 0xb0; 9121 - 0x4d; 9122 - 0x0c; 9123 - 0x89; 9124 - 0xdc; 9125 - 0x39; 9126 - 0x26; 9127 - 0x17; 9128 - 0xdd; 9129 - 0xf6; 9130 - 0xd7; 9131 - 0x94; 9132 - 0x85; 9133 - 0xd8; 9134 - 0x04; 9135 - 0x21; 9136 - 0x70; 9137 - 0x9d; 9138 - 0x6f; 9139 - 0x6f; 9140 - 0xff; 9141 - 0x5c; 9142 - 0xba; 9143 - 0x19; 9144 - 0xe1; 9145 - 0x45; 9146 - 0xcb; 9147 - 0x56; 9148 - 0x57; 9149 - 0x28; 9150 - 0x7e; 9151 - 0x1c; 9152 - 0x0d; 9153 - 0x41; 9154 - 0x57; 9155 - 0xaa; 9156 - 0xb7; 9157 - 0xb8; 9158 - 0x27; 9159 - 0xbb; 9160 - 0xb1; 9161 - 0xe4; 9162 - 0xfa; 9163 - 0x2a; 9164 - 0xef; 9165 - 0x21; 9166 - 0x23; 9167 - 0x75; 9168 - 0x1a; 9169 - 0xad; 9170 - 0x2d; 9171 - 0x9b; 9172 - 0x86; 9173 - 0x35; 9174 - 0x8c; 9175 - 0x9c; 9176 - 0x77; 9177 - 0xb5; 9178 - 0x73; 9179 - 0xad; 9180 - 0xd8; 9181 - 0x94; 9182 - 0x2d; 9183 - 0xe4; 9184 - 0xf3; 9185 - 0x0c; 9186 - 0x9d; 9187 - 0xee; 9188 - 0xc1; 9189 - 0x4e; 9190 - 0x62; 9191 - 0x7e; 9192 - 0x17; 9193 - 0xc0; 9194 - 0x71; 9195 - 0x9e; 9196 - 0x2c; 9197 - 0xde; 9198 - 0xf1; 9199 - 0xf9; 9200 - 0x10; 9201 - 0x28; 9202 - 0x19; 9203 - 0x33; 9204 - 0x02; 9205 - 0x03; 9206 - 0x01; 9207 - 0x00; 9208 - 0x01; 9209 - 0xa3; 9210 - 0x82; 9211 - 0x01; 9212 - 0x49; 9213 - 0x30; 9214 - 0x82; 9215 - 0x01; 9216 - 0x45; 9217 - 0x30; 9218 - 0x12; 9219 - 0x06; 9220 - 0x03; 9221 - 0x55; 9222 - 0x1d; 9223 - 0x13; 9224 - 0x01; 9225 - 0x01; 9226 - 0xff; 9227 - 0x04; 9228 - 0x08; 9229 - 0x30; 9230 - 0x06; 9231 - 0x01; 9232 - 0x01; 9233 - 0xff; 9234 - 0x02; 9235 - 0x01; 9236 - 0x00; 9237 - 0x30; 9238 - 0x0e; 9239 - 0x06; 9240 - 0x03; 9241 - 0x55; 9242 - 0x1d; 9243 - 0x0f; 9244 - 0x01; 9245 - 0x01; 9246 - 0xff; 9247 - 0x04; 9248 - 0x04; 9249 - 0x03; 9250 - 0x02; 9251 - 0x01; 9252 - 0x86; 9253 - 0x30; 9254 - 0x1d; 9255 - 0x06; 9256 - 0x03; 9257 - 0x55; 9258 - 0x1d; 9259 - 0x25; 9260 - 0x04; 9261 - 0x16; 9262 - 0x30; 9263 - 0x14; 9264 - 0x06; 9265 - 0x08; 9266 - 0x2b; 9267 - 0x06; 9268 - 0x01; 9269 - 0x05; 9270 - 0x05; 9271 - 0x07; 9272 - 0x03; 9273 - 0x01; 9274 - 0x06; 9275 - 0x08; 9276 - 0x2b; 9277 - 0x06; 9278 - 0x01; 9279 - 0x05; 9280 - 0x05; 9281 - 0x07; 9282 - 0x03; 9283 - 0x02; 9284 - 0x30; 9285 - 0x34; 9286 - 0x06; 9287 - 0x08; 9288 - 0x2b; 9289 - 0x06; 9290 - 0x01; 9291 - 0x05; 9292 - 0x05; 9293 - 0x07; 9294 - 0x01; 9295 - 0x01; 9296 - 0x04; 9297 - 0x28; 9298 - 0x30; 9299 - 0x26; 9300 - 0x30; 9301 - 0x24; 9302 - 0x06; 9303 - 0x08; 9304 - 0x2b; 9305 - 0x06; 9306 - 0x01; 9307 - 0x05; 9308 - 0x05; 9309 - 0x07; 9310 - 0x30; 9311 - 0x01; 9312 - 0x86; 9313 - 0x18; 9314 - 0x68; 9315 - 0x74; 9316 - 0x74; 9317 - 0x70; 9318 - 0x3a; 9319 - 0x2f; 9320 - 0x2f; 9321 - 0x6f; 9322 - 0x63; 9323 - 0x73; 9324 - 0x70; 9325 - 0x2e; 9326 - 0x64; 9327 - 0x69; 9328 - 0x67; 9329 - 0x69; 9330 - 0x63; 9331 - 0x65; 9332 - 0x72; 9333 - 0x74; 9334 - 0x2e; 9335 - 0x63; 9336 - 0x6f; 9337 - 0x6d; 9338 - 0x30; 9339 - 0x4b; 9340 - 0x06; 9341 - 0x03; 9342 - 0x55; 9343 - 0x1d; 9344 - 0x1f; 9345 - 0x04; 9346 - 0x44; 9347 - 0x30; 9348 - 0x42; 9349 - 0x30; 9350 - 0x40; 9351 - 0xa0; 9352 - 0x3e; 9353 - 0xa0; 9354 - 0x3c; 9355 - 0x86; 9356 - 0x3a; 9357 - 0x68; 9358 - 0x74; 9359 - 0x74; 9360 - 0x70; 9361 - 0x3a; 9362 - 0x2f; 9363 - 0x2f; 9364 - 0x63; 9365 - 0x72; 9366 - 0x6c; 9367 - 0x34; 9368 - 0x2e; 9369 - 0x64; 9370 - 0x69; 9371 - 0x67; 9372 - 0x69; 9373 - 0x63; 9374 - 0x65; 9375 - 0x72; 9376 - 0x74; 9377 - 0x2e; 9378 - 0x63; 9379 - 0x6f; 9380 - 0x6d; 9381 - 0x2f; 9382 - 0x44; 9383 - 0x69; 9384 - 0x67; 9385 - 0x69; 9386 - 0x43; 9387 - 0x65; 9388 - 0x72; 9389 - 0x74; 9390 - 0x48; 9391 - 0x69; 9392 - 0x67; 9393 - 0x68; 9394 - 0x41; 9395 - 0x73; 9396 - 0x73; 9397 - 0x75; 9398 - 0x72; 9399 - 0x61; 9400 - 0x6e; 9401 - 0x63; 9402 - 0x65; 9403 - 0x45; 9404 - 0x56; 9405 - 0x52; 9406 - 0x6f; 9407 - 0x6f; 9408 - 0x74; 9409 - 0x43; 9410 - 0x41; 9411 - 0x2e; 9412 - 0x63; 9413 - 0x72; 9414 - 0x6c; 9415 - 0x30; 9416 - 0x3d; 9417 - 0x06; 9418 - 0x03; 9419 - 0x55; 9420 - 0x1d; 9421 - 0x20; 9422 - 0x04; 9423 - 0x36; 9424 - 0x30; 9425 - 0x34; 9426 - 0x30; 9427 - 0x32; 9428 - 0x06; 9429 - 0x04; 9430 - 0x55; 9431 - 0x1d; 9432 - 0x20; 9433 - 0x00; 9434 - 0x30; 9435 - 0x2a; 9436 - 0x30; 9437 - 0x28; 9438 - 0x06; 9439 - 0x08; 9440 - 0x2b; 9441 - 0x06; 9442 - 0x01; 9443 - 0x05; 9444 - 0x05; 9445 - 0x07; 9446 - 0x02; 9447 - 0x01; 9448 - 0x16; 9449 - 0x1c; 9450 - 0x68; 9451 - 0x74; 9452 - 0x74; 9453 - 0x70; 9454 - 0x73; 9455 - 0x3a; 9456 - 0x2f; 9457 - 0x2f; 9458 - 0x77; 9459 - 0x77; 9460 - 0x77; 9461 - 0x2e; 9462 - 0x64; 9463 - 0x69; 9464 - 0x67; 9465 - 0x69; 9466 - 0x63; 9467 - 0x65; 9468 - 0x72; 9469 - 0x74; 9470 - 0x2e; 9471 - 0x63; 9472 - 0x6f; 9473 - 0x6d; 9474 - 0x2f; 9475 - 0x43; 9476 - 0x50; 9477 - 0x53; 9478 - 0x30; 9479 - 0x1d; 9480 - 0x06; 9481 - 0x03; 9482 - 0x55; 9483 - 0x1d; 9484 - 0x0e; 9485 - 0x04; 9486 - 0x16; 9487 - 0x04; 9488 - 0x14; 9489 - 0x3d; 9490 - 0xd3; 9491 - 0x50; 9492 - 0xa5; 9493 - 0xd6; 9494 - 0xa0; 9495 - 0xad; 9496 - 0xee; 9497 - 0xf3; 9498 - 0x4a; 9499 - 0x60; 9500 - 0x0a; 9501 - 0x65; 9502 - 0xd3; 9503 - 0x21; 9504 - 0xd4; 9505 - 0xf8; 9506 - 0xf8; 9507 - 0xd6; 9508 - 0x0f; 9509 - 0x30; 9510 - 0x1f; 9511 - 0x06; 9512 - 0x03; 9513 - 0x55; 9514 - 0x1d; 9515 - 0x23; 9516 - 0x04; 9517 - 0x18; 9518 - 0x30; 9519 - 0x16; 9520 - 0x80; 9521 - 0x14; 9522 - 0xb1; 9523 - 0x3e; 9524 - 0xc3; 9525 - 0x69; 9526 - 0x03; 9527 - 0xf8; 9528 - 0xbf; 9529 - 0x47; 9530 - 0x01; 9531 - 0xd4; 9532 - 0x98; 9533 - 0x26; 9534 - 0x1a; 9535 - 0x08; 9536 - 0x02; 9537 - 0xef; 9538 - 0x63; 9539 - 0x64; 9540 - 0x2b; 9541 - 0xc3; 9542 - 0x30; 9543 - 0x0d; 9544 - 0x06; 9545 - 0x09; 9546 - 0x2a; 9547 - 0x86; 9548 - 0x48; 9549 - 0x86; 9550 - 0xf7; 9551 - 0x0d; 9552 - 0x01; 9553 - 0x01; 9554 - 0x0b; 9555 - 0x05; 9556 - 0x00; 9557 - 0x03; 9558 - 0x82; 9559 - 0x01; 9560 - 0x01; 9561 - 0x00; 9562 - 0x9d; 9563 - 0xb6; 9564 - 0xd0; 9565 - 0x90; 9566 - 0x86; 9567 - 0xe1; 9568 - 0x86; 9569 - 0x02; 9570 - 0xed; 9571 - 0xc5; 9572 - 0xa0; 9573 - 0xf0; 9574 - 0x34; 9575 - 0x1c; 9576 - 0x74; 9577 - 0xc1; 9578 - 0x8d; 9579 - 0x76; 9580 - 0xcc; 9581 - 0x86; 9582 - 0x0a; 9583 - 0xa8; 9584 - 0xf0; 9585 - 0x4a; 9586 - 0x8a; 9587 - 0x42; 9588 - 0xd6; 9589 - 0x3f; 9590 - 0xc8; 9591 - 0xa9; 9592 - 0x4d; 9593 - 0xad; 9594 - 0x7c; 9595 - 0x08; 9596 - 0xad; 9597 - 0xe6; 9598 - 0xb6; 9599 - 0x50; 9600 - 0xb8; 9601 - 0xa2; 9602 - 0x1a; 9603 - 0x4d; 9604 - 0x88; 9605 - 0x07; 9606 - 0xb1; 9607 - 0x29; 9608 - 0x21; 9609 - 0xdc; 9610 - 0xe7; 9611 - 0xda; 9612 - 0xc6; 9613 - 0x3c; 9614 - 0x21; 9615 - 0xe0; 9616 - 0xe3; 9617 - 0x11; 9618 - 0x49; 9619 - 0x70; 9620 - 0xac; 9621 - 0x7a; 9622 - 0x1d; 9623 - 0x01; 9624 - 0xa4; 9625 - 0xca; 9626 - 0x11; 9627 - 0x3a; 9628 - 0x57; 9629 - 0xab; 9630 - 0x7d; 9631 - 0x57; 9632 - 0x2a; 9633 - 0x40; 9634 - 0x74; 9635 - 0xfd; 9636 - 0xd3; 9637 - 0x1d; 9638 - 0x85; 9639 - 0x18; 9640 - 0x50; 9641 - 0xdf; 9642 - 0x57; 9643 - 0x47; 9644 - 0x75; 9645 - 0xa1; 9646 - 0x7d; 9647 - 0x55; 9648 - 0x20; 9649 - 0x2e; 9650 - 0x47; 9651 - 0x37; 9652 - 0x50; 9653 - 0x72; 9654 - 0x8c; 9655 - 0x7f; 9656 - 0x82; 9657 - 0x1b; 9658 - 0xd2; 9659 - 0x62; 9660 - 0x8f; 9661 - 0x2d; 9662 - 0x03; 9663 - 0x5a; 9664 - 0xda; 9665 - 0xc3; 9666 - 0xc8; 9667 - 0xa1; 9668 - 0xce; 9669 - 0x2c; 9670 - 0x52; 9671 - 0xa2; 9672 - 0x00; 9673 - 0x63; 9674 - 0xeb; 9675 - 0x73; 9676 - 0xba; 9677 - 0x71; 9678 - 0xc8; 9679 - 0x49; 9680 - 0x27; 9681 - 0x23; 9682 - 0x97; 9683 - 0x64; 9684 - 0x85; 9685 - 0x9e; 9686 - 0x38; 9687 - 0x0e; 9688 - 0xad; 9689 - 0x63; 9690 - 0x68; 9691 - 0x3c; 9692 - 0xba; 9693 - 0x52; 9694 - 0x81; 9695 - 0x58; 9696 - 0x79; 9697 - 0xa3; 9698 - 0x2c; 9699 - 0x0c; 9700 - 0xdf; 9701 - 0xde; 9702 - 0x6d; 9703 - 0xeb; 9704 - 0x31; 9705 - 0xf2; 9706 - 0xba; 9707 - 0xa0; 9708 - 0x7c; 9709 - 0x6c; 9710 - 0xf1; 9711 - 0x2c; 9712 - 0xd4; 9713 - 0xe1; 9714 - 0xbd; 9715 - 0x77; 9716 - 0x84; 9717 - 0x37; 9718 - 0x03; 9719 - 0xce; 9720 - 0x32; 9721 - 0xb5; 9722 - 0xc8; 9723 - 0x9a; 9724 - 0x81; 9725 - 0x1a; 9726 - 0x4a; 9727 - 0x92; 9728 - 0x4e; 9729 - 0x3b; 9730 - 0x46; 9731 - 0x9a; 9732 - 0x85; 9733 - 0xfe; 9734 - 0x83; 9735 - 0xa2; 9736 - 0xf9; 9737 - 0x9e; 9738 - 0x8c; 9739 - 0xa3; 9740 - 0xcc; 9741 - 0x0d; 9742 - 0x5e; 9743 - 0xb3; 9744 - 0x3d; 9745 - 0xcf; 9746 - 0x04; 9747 - 0x78; 9748 - 0x8f; 9749 - 0x14; 9750 - 0x14; 9751 - 0x7b; 9752 - 0x32; 9753 - 0x9c; 9754 - 0xc7; 9755 - 0x00; 9756 - 0xa6; 9757 - 0x5c; 9758 - 0xc4; 9759 - 0xb5; 9760 - 0xa1; 9761 - 0x55; 9762 - 0x8d; 9763 - 0x5a; 9764 - 0x56; 9765 - 0x68; 9766 - 0xa4; 9767 - 0x22; 9768 - 0x70; 9769 - 0xaa; 9770 - 0x3c; 9771 - 0x81; 9772 - 0x71; 9773 - 0xd9; 9774 - 0x9d; 9775 - 0xa8; 9776 - 0x45; 9777 - 0x3b; 9778 - 0xf4; 9779 - 0xe5; 9780 - 0xf6; 9781 - 0xa2; 9782 - 0x51; 9783 - 0xdd; 9784 - 0xc7; 9785 - 0x7b; 9786 - 0x62; 9787 - 0xe8; 9788 - 0x6f; 9789 - 0x0c; 9790 - 0x74; 9791 - 0xeb; 9792 - 0xb8; 9793 - 0xda; 9794 - 0xf8; 9795 - 0xbf; 9796 - 0x87; 9797 - 0x0d; 9798 - 0x79; 9799 - 0x50; 9800 - 0x91; 9801 - 0x90; 9802 - 0x9b; 9803 - 0x18; 9804 - 0x3b; 9805 - 0x91; 9806 - 0x59; 9807 - 0x27; 9808 - 0xf1; 9809 - 0x35; 9810 - 0x28; 9811 - 0x13; 9812 - 0xab; 9813 - 0x26; 9814 - 0x7e; 9815 - 0xd5; 9816 - 0xf7; 9817 - 0x7a; 9818 - ], 9819 - Core.Certificate (Writer.assemble_certificates [ gh1; gh2 ]) ); 9820 - ] 9821 - 9822 - let cmp_handshake_cstruct hs hs' = 9823 - Core.( 9824 - match (hs, hs') with 9825 - | Finished xs, Finished ys -> assert_cs_eq xs ys 9826 - | ServerKeyExchange xs, ServerKeyExchange ys -> assert_cs_eq xs ys 9827 - | Certificate xs, Certificate ys -> assert_cs_eq xs ys 9828 - | ClientKeyExchange xs, ClientKeyExchange ys -> assert_cs_eq xs ys 9829 - | _ -> assert_failure "handshake cstruct data parser broken") 9830 - 9831 - let good_handshake_cstruct_data_parser (xs, res) _ = 9832 - let buf = list_to_cstruct xs in 9833 - match Reader.parse_handshake buf with 9834 - | Ok r -> cmp_handshake_cstruct r res 9835 - | Error _ -> assert_failure "handshake cstruct data parser failed" 9836 - 9837 - let good_handshake_cstruct_data_tests = 9838 - List.mapi 9839 - (fun i f -> 9840 - "Parse good handshake " ^ string_of_int i 9841 - >:: good_handshake_cstruct_data_parser f) 9842 - good_handshake_cstruct_data 9843 - 9844 - let bad_handshake_cstruct_data = 9845 - let data = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 ] in 9846 - [ 9847 - [ 12; 0; 0; 13 ] @ data; 9848 - [ 12; 0; 0; 11 ] @ data; 9849 - [ 20; 0; 1; 12 ] @ data; 9850 - [ 20; 0; 0; 11 ] @ data; 9851 - [ 16; 0; 0; 15; 0; 12 ] @ data; 9852 - [ 25; 0; 0; 14; 0; 12 ] @ data; 9853 - [ 255; 0; 0; 14; 0; 12 ] @ data; 9854 - [ 11; 0; 0; 17; 0; 0; 15; 0; 0; 12 ] @ data; 9855 - ] 9856 - 9857 - let bad_handshake_cstruct_data_parser xs _ = 9858 - let buf = list_to_cstruct xs in 9859 - match Reader.parse_handshake buf with 9860 - | Ok _ -> assert_failure "bad handshake cstruct parser won" 9861 - | Error _ -> () 9862 - 9863 - let bad_handshake_cstruct_data_tests = 9864 - List.mapi 9865 - (fun i f -> 9866 - "Parse bad handshake " ^ string_of_int i 9867 - >:: bad_handshake_cstruct_data_parser f) 9868 - bad_handshake_cstruct_data 9869 - 9870 - let bad_certificate_cstruct_data = 9871 - let data = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 ] in 9872 - [ 9873 - [ 11; 0; 0; 3; 0; 0; 2 ]; 9874 - [ 11; 0; 0; 4; 0; 0; 0; 0 ]; 9875 - [ 11; 0; 0; 18; 0; 0; 15; 0; 0; 11 ] @ data; 9876 - [ 11; 0; 0; 18; 0; 0; 14; 0; 0; 11 ] @ data; 9877 - [ 11; 0; 0; 33; 0; 0; 29; 0; 0; 12 ] @ data @ [ 0; 0; 12 ] @ data; 9878 - [ 11; 0; 0; 33; 0; 0; 31; 0; 0; 12 ] @ data @ [ 0; 0; 12 ] @ data; 9879 - [ 11; 0; 0; 33; 0; 0; 30; 0; 0; 11 ] @ data @ [ 0; 0; 12 ] @ data; 9880 - ] 9881 - 9882 - let bad_certificate_cstruct_data_parser xs _ = 9883 - let buf = list_to_cstruct xs in 9884 - Reader.( 9885 - match parse_handshake buf with 9886 - | Ok (Core.Certificate cs) -> ( 9887 - match Reader.parse_certificates cs with 9888 - | Ok _ -> assert_failure "bad certificate parser won" 9889 - | Error _ -> ()) 9890 - | _ -> assert_failure "should've been a certificate") 9891 - 9892 - let bad_certificate_cstruct_data_tests = 9893 - List.mapi 9894 - (fun i f -> 9895 - "Parse bad certificate " ^ string_of_int i 9896 - >:: bad_certificate_cstruct_data_parser f) 9897 - bad_certificate_cstruct_data 9898 - 9899 - let good_client_hellos = 9900 - (* I rolled the dice 16 times *) 9901 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 9902 - let rand = rnd @ rnd in 9903 - let client_random = list_to_cstruct rand in 9904 - Core.( 9905 - let ch : client_hello = 9906 - { 9907 - client_version = `TLS_1_2; 9908 - client_random; 9909 - sessionid = None; 9910 - ciphersuites = []; 9911 - extensions = []; 9912 - } 9913 - in 9914 - [ 9915 - (* versions *) 9916 - ( [ 1; 0; 0; 38; 3; 3 ] @ rand 9917 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9918 - ch ); 9919 - ( [ 1; 0; 0; 38; 3; 0 ] @ rand 9920 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9921 - { ch with client_version = `SSL_3 } ); 9922 - ( [ 1; 0; 0; 38; 3; 1 ] @ rand 9923 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9924 - { ch with client_version = `TLS_1_0 } ); 9925 - ( [ 1; 0; 0; 38; 3; 2 ] @ rand 9926 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9927 - { ch with client_version = `TLS_1_1 } ); 9928 - ( [ 1; 0; 0; 38; 3; 4 ] @ rand 9929 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9930 - { ch with client_version = `TLS_1_3 } ); 9931 - ( [ 1; 0; 0; 38; 3; 5 ] @ rand 9932 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ], 9933 - { ch with client_version = `TLS_1_X 5 } ); 9934 - (* well-formed compression (not available in higher layer) *) 9935 - ( [ 1; 0; 0; 39; 3; 3 ] @ rand 9936 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 1; 0 (* exts *) ], 9937 - ch ); 9938 - ( [ 1; 0; 0; 40; 3; 3 ] @ rand 9939 - @ [ 9940 - (* session id *) 0; (* cipher *) 0; 0; (* comp *) 2; 0; 1; (* exts *) 9941 - ], 9942 - ch ); 9943 - (* ciphersuites *) 9944 - ( [ 1; 0; 0; 40; 3; 3 ] @ rand 9945 - @ [ 9946 - (* session id *) 9947 - 0; 9948 - (* cipher *) 9949 - 0; 9950 - 2; 9951 - 0; 9952 - 0x0A; 9953 - (* comp *) 9954 - 0; 9955 - (* exts *) 9956 - ], 9957 - { ch with ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ] } ); 9958 - ( [ 1; 0; 0; 42; 3; 3 ] @ rand 9959 - @ [ 9960 - (* session id *) 9961 - 0; 9962 - (* cipher *) 9963 - 0; 9964 - 4; 9965 - 0; 9966 - 0x0A; 9967 - 0; 9968 - 0x16; 9969 - (* comp *) 9970 - 0; 9971 - (* exts *) 9972 - ], 9973 - { 9974 - ch with 9975 - ciphersuites = 9976 - Packet. 9977 - [ 9978 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 9979 - ]; 9980 - } ); 9981 - (* ignore unknown ciphersuite *) 9982 - ( [ 1; 0; 0; 42; 3; 3 ] @ rand 9983 - @ [ 9984 - (* session id *) 9985 - 0; 9986 - (* cipher *) 9987 - 0; 9988 - 4; 9989 - 0; 9990 - 0x0A; 9991 - 0; 9992 - 0x47; 9993 - (* comp *) 9994 - 0; 9995 - (* exts *) 9996 - ], 9997 - { ch with ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ] } ); 9998 - (* ignore unknown compression method *) 9999 - ( [ 1; 0; 0; 40; 3; 3 ] @ rand 10000 - @ [ 10001 - (* session id *) 10002 - 0; 10003 - (* cipher *) 10004 - 0; 10005 - 0; 10006 - (* comp *) 10007 - 2; 10008 - 0; 10009 - 42; 10010 - (* exts *) 10011 - ], 10012 - ch ); 10013 - (* TODO: unknown extensions should be ignored (check again with rfc) *) 10014 - (* TODO: validate client_hello: 10015 - - non-empty ciphersuites 10016 - - no duplicated ciphersuites 10017 - - those required by protocol version should be in the list! 10018 - - no duplicated extensions 10019 - - no unsupported extensions (SignatureAlgorithms in TLS < 1.2) 10020 - - empty ServerName extension is useless 10021 - *) 10022 - 10023 - (* combine ciphersuite + compression *) 10024 - ( [ 1; 0; 0; 44; 3; 3 ] @ rand 10025 - @ [ 10026 - (* session id *) 10027 - 0; 10028 - (* cipher *) 10029 - 0; 10030 - 4; 10031 - 0; 10032 - 0x0A; 10033 - 0; 10034 - 0x16; 10035 - (* comp *) 10036 - 2; 10037 - 0; 10038 - 1; 10039 - (* exts *) 10040 - ], 10041 - { 10042 - ch with 10043 - ciphersuites = 10044 - Packet. 10045 - [ 10046 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 10047 - ]; 10048 - } ); 10049 - (* session id *) 10050 - ( [ 1; 0; 0; 41; 3; 3 ] @ rand 10051 - @ [ 10052 - (* session id *) 10053 - 3; 10054 - 1; 10055 - 2; 10056 - 3; 10057 - (* cipher *) 10058 - 0; 10059 - 0; 10060 - (* comp *) 10061 - 0; 10062 - (* exts *) 10063 - ], 10064 - { ch with sessionid = Some (list_to_cstruct [ 1; 2; 3 ]) } ); 10065 - (* combine ciphersuite + compression + session id *) 10066 - ( [ 1; 0; 0; 47; 3; 3 ] @ rand 10067 - @ [ 10068 - (* session id *) 10069 - 3; 10070 - 1; 10071 - 2; 10072 - 3; 10073 - (* cipher *) 10074 - 0; 10075 - 4; 10076 - 0; 10077 - 0x0A; 10078 - 0; 10079 - 0x16; 10080 - (* comp *) 10081 - 2; 10082 - 0; 10083 - 1; 10084 - (* exts *) 10085 - ], 10086 - { 10087 - ch with 10088 - ciphersuites = 10089 - Packet. 10090 - [ 10091 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 10092 - ]; 10093 - sessionid = Some (list_to_cstruct [ 1; 2; 3 ]); 10094 - } ); 10095 - (* extensions *) 10096 - (* empty *) 10097 - ( [ 1; 0; 0; 40; 3; 3 ] @ rand 10098 - @ [ 10099 - (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0; (* exts *) 0; 0; 10100 - ], 10101 - ch ); 10102 - (* some hostname *) 10103 - ( [ 1; 0; 0; 52; 3; 3 ] @ rand 10104 - @ [ 10105 - (* session id *) 10106 - 0; 10107 - (* cipher *) 10108 - 0; 10109 - 0; 10110 - (* comp *) 10111 - 0; 10112 - (* exts *) 10113 - 0; 10114 - 12; 10115 - 0; 10116 - 0; 10117 - 0; 10118 - 8; 10119 - 0; 10120 - 6; 10121 - 0; 10122 - 0; 10123 - 3; 10124 - 102; 10125 - 111; 10126 - 111; 10127 - ], 10128 - { ch with extensions = [ make_hostname_ext "foo" ] } ); 10129 - (* some other hostname *) 10130 - ( [ 1; 0; 0; 59; 3; 3 ] @ rand 10131 - @ [ 10132 - (* session id *) 10133 - 0; 10134 - (* cipher *) 10135 - 0; 10136 - 0; 10137 - (* comp *) 10138 - 0; 10139 - (* exts *) 10140 - 0; 10141 - 19; 10142 - 0; 10143 - 0; 10144 - 0; 10145 - 15; 10146 - 0; 10147 - 13; 10148 - 0; 10149 - 0; 10150 - 10; 10151 - 102; 10152 - 111; 10153 - 111; 10154 - 98; 10155 - 97; 10156 - 114; 10157 - 46; 10158 - 99; 10159 - 111; 10160 - 109; 10161 - ], 10162 - { ch with extensions = [ make_hostname_ext "foobar.com" ] } ); 10163 - (* max fragment length *) 10164 - ( [ 1; 0; 0; 45; 3; 3 ] @ rand 10165 - @ [ 10166 - (* session id *) 10167 - 0; 10168 - (* cipher *) 10169 - 0; 10170 - 0; 10171 - (* comp *) 10172 - 0; 10173 - (* exts *) 10174 - 0; 10175 - 5; 10176 - 0; 10177 - 1; 10178 - 0; 10179 - 1; 10180 - 3; 10181 - ], 10182 - { ch with extensions = [ `MaxFragmentLength Packet.TWO_11 ] } ); 10183 - (* empty SupportedGroups *) 10184 - ( [ 1; 0; 0; 46; 3; 3 ] @ rand 10185 - @ [ 10186 - (* session id *) 10187 - 0; 10188 - (* cipher *) 10189 - 0; 10190 - 0; 10191 - (* comp *) 10192 - 0; 10193 - (* exts *) 10194 - 0; 10195 - 6; 10196 - 0; 10197 - 0xA; 10198 - 0; 10199 - 2; 10200 - 0; 10201 - 0; 10202 - ], 10203 - { ch with extensions = [ `SupportedGroups [] ] } ); 10204 - (* one supported group *) 10205 - ( [ 1; 0; 0; 48; 3; 3 ] @ rand 10206 - @ [ 10207 - (* session id *) 10208 - 0; 10209 - (* cipher *) 10210 - 0; 10211 - 0; 10212 - (* comp *) 10213 - 0; 10214 - (* exts *) 10215 - 0; 10216 - 8; 10217 - 0; 10218 - 0xA; 10219 - 0; 10220 - 4; 10221 - 0; 10222 - 2; 10223 - 0; 10224 - 25; 10225 - ], 10226 - { ch with extensions = [ `SupportedGroups [ Packet.SECP521R1 ] ] } ); 10227 - (* two supported groups *) 10228 - ( [ 1; 0; 0; 50; 3; 3 ] @ rand 10229 - @ [ 10230 - (* session id *) 10231 - 0; 10232 - (* cipher *) 10233 - 0; 10234 - 0; 10235 - (* comp *) 10236 - 0; 10237 - (* exts *) 10238 - 0; 10239 - 10; 10240 - 0; 10241 - 0xA; 10242 - 0; 10243 - 6; 10244 - 0; 10245 - 4; 10246 - 0; 10247 - 25; 10248 - 0; 10249 - 24; 10250 - ], 10251 - { 10252 - ch with 10253 - extensions = [ `SupportedGroups Packet.[ SECP521R1; SECP384R1 ] ]; 10254 - } ); 10255 - (* three supported groups, one unknown *) 10256 - ( [ 1; 0; 0; 52; 3; 3 ] @ rand 10257 - @ [ 10258 - (* session id *) 10259 - 0; 10260 - (* cipher *) 10261 - 0; 10262 - 0; 10263 - (* comp *) 10264 - 0; 10265 - (* exts *) 10266 - 0; 10267 - 12; 10268 - 0; 10269 - 0xA; 10270 - 0; 10271 - 8; 10272 - 0; 10273 - 6; 10274 - 0; 10275 - 25; 10276 - 0xFF; 10277 - 0xFF; 10278 - 0; 10279 - 24; 10280 - ], 10281 - { 10282 - ch with 10283 - extensions = [ `SupportedGroups Packet.[ SECP521R1; SECP384R1 ] ]; 10284 - } ); 10285 - (* secure renegotiation *) 10286 - ( [ 1; 0; 0; 47; 3; 3 ] @ rand 10287 - @ [ 10288 - (* session id *) 10289 - 0; 10290 - (* cipher *) 10291 - 0; 10292 - 0; 10293 - (* comp *) 10294 - 0; 10295 - (* exts *) 10296 - 0; 10297 - 7; 10298 - 0xFF; 10299 - 1; 10300 - 0; 10301 - 3; 10302 - 2; 10303 - 1; 10304 - 2; 10305 - ], 10306 - { 10307 - ch with 10308 - extensions = [ `SecureRenegotiation (list_to_cstruct [ 1; 2 ]) ]; 10309 - } ); 10310 - (* Padding *) 10311 - ( [ 1; 0; 0; 47; 3; 3 ] @ rand 10312 - @ [ 10313 - (* session id *) 10314 - 0; 10315 - (* cipher *) 10316 - 0; 10317 - 0; 10318 - (* comp *) 10319 - 0; 10320 - (* exts *) 10321 - 0; 10322 - 7; 10323 - 0; 10324 - 21; 10325 - 0; 10326 - 3; 10327 - 0; 10328 - 0; 10329 - 0; 10330 - ], 10331 - { ch with extensions = [ `Padding 3 ] } ); 10332 - (* signature algorithm *) 10333 - ( [ 1; 0; 0; 46; 3; 3 ] @ rand 10334 - @ [ 10335 - (* session id *) 10336 - 0; 10337 - (* cipher *) 10338 - 0; 10339 - 0; 10340 - (* comp *) 10341 - 0; 10342 - (* exts *) 10343 - 0; 10344 - 6; 10345 - 0; 10346 - 13; 10347 - 0; 10348 - 2; 10349 - 0; 10350 - 0; 10351 - ], 10352 - { ch with extensions = [ `SignatureAlgorithms [] ] } ); 10353 - ( [ 1; 0; 0; 48; 3; 3 ] @ rand 10354 - @ [ 10355 - (* session id *) 10356 - 0; 10357 - (* cipher *) 10358 - 0; 10359 - 0; 10360 - (* comp *) 10361 - 0; 10362 - (* exts *) 10363 - 0; 10364 - 8; 10365 - 0; 10366 - 13; 10367 - 0; 10368 - 4; 10369 - 0; 10370 - 2; 10371 - 1; 10372 - 1; 10373 - ], 10374 - { ch with extensions = [ `SignatureAlgorithms [ `RSA_PKCS1_MD5 ] ] } ); 10375 - ( [ 1; 0; 0; 50; 3; 3 ] @ rand 10376 - @ [ 10377 - (* session id *) 10378 - 0; 10379 - (* cipher *) 10380 - 0; 10381 - 0; 10382 - (* comp *) 10383 - 0; 10384 - (* exts *) 10385 - 0; 10386 - 10; 10387 - 0; 10388 - 13; 10389 - 0; 10390 - 6; 10391 - 0; 10392 - 4; 10393 - 2; 10394 - 1; 10395 - 1; 10396 - 1; 10397 - ], 10398 - { 10399 - ch with 10400 - extensions = 10401 - [ `SignatureAlgorithms [ `RSA_PKCS1_SHA1; `RSA_PKCS1_MD5 ] ]; 10402 - } ); 10403 - (* unknown one *) 10404 - ( [ 1; 0; 0; 52; 3; 3 ] @ rand 10405 - @ [ 10406 - (* session id *) 10407 - 0; 10408 - (* cipher *) 10409 - 0; 10410 - 0; 10411 - (* comp *) 10412 - 0; 10413 - (* exts *) 10414 - 0; 10415 - 12; 10416 - 0; 10417 - 13; 10418 - 0; 10419 - 8; 10420 - 0; 10421 - 6; 10422 - 42; 10423 - 42; 10424 - 2; 10425 - 1; 10426 - 1; 10427 - 1; 10428 - ], 10429 - { 10430 - ch with 10431 - extensions = 10432 - [ `SignatureAlgorithms [ `RSA_PKCS1_SHA1; `RSA_PKCS1_MD5 ] ]; 10433 - } ); 10434 - (* ALPN *) 10435 - ( [ 1; 0; 0; 58; 3; 3 ] @ rand 10436 - @ [ 10437 - (* session id *) 10438 - 0; 10439 - (* cipher *) 10440 - 0; 10441 - 0; 10442 - (* comp *) 10443 - 0; 10444 - (* exts *) 10445 - 0; 10446 - 18; 10447 - 0; 10448 - 16; 10449 - 0; 10450 - 14; 10451 - 0; 10452 - 12; 10453 - (* h2 *) 10454 - 2; 10455 - 104; 10456 - 50; 10457 - (* http/1.1*) 10458 - 8; 10459 - 104; 10460 - 116; 10461 - 116; 10462 - 112; 10463 - 47; 10464 - 49; 10465 - 46; 10466 - 49; 10467 - ], 10468 - { ch with extensions = [ `ALPN [ "h2"; "http/1.1" ] ] } ); 10469 - (* combinations from the real world *) 10470 - ( [ 10471 - 0x01; 10472 - (* hello *) 10473 - 0x00; 10474 - 0x00; 10475 - 0xaf; 10476 - (* length *) 10477 - 0x03; 10478 - 0x01; 10479 - (* version *) 10480 - 0x7c; 10481 - 0x53; 10482 - 0x05; 10483 - 0x72; 10484 - 0x7a; 10485 - 0x1b; 10486 - 0x84; 10487 - 0x70; 10488 - 0x30; 10489 - 0x89; 10490 - 0xef; 10491 - 0xad; 10492 - 0xfb; 10493 - 0x56; 10494 - 0xc1; 10495 - 0x3d; 10496 - 0x73; 10497 - 0x4b; 10498 - 0xc7; 10499 - 0xcb; 10500 - 0x8c; 10501 - 0xc8; 10502 - 0x75; 10503 - 0x43; 10504 - 0x01; 10505 - 0x12; 10506 - 0x32; 10507 - 0xd6; 10508 - 0x74; 10509 - 0x87; 10510 - 0xcb; 10511 - 0x18; 10512 - (* random *) 10513 - 0x00; 10514 - (* session id *) 10515 - 0x00; 10516 - 0x68; 10517 - (* ciphersuites *) 10518 - 0xc0; 10519 - 0x14; 10520 - 0xc0; 10521 - 0x0a; 10522 - 0xc0; 10523 - 0x22; 10524 - 0xc0; 10525 - 0x21; 10526 - 0x00; 10527 - 0x39; 10528 - 0x00; 10529 - 0x38; 10530 - 0x00; 10531 - 0x88; 10532 - 0x00; 10533 - 0x87; 10534 - 0xc0; 10535 - 0x0f; 10536 - 0xc0; 10537 - 0x05; 10538 - 0x00; 10539 - 0x35; 10540 - 0x00; 10541 - 0x84; 10542 - 0xc0; 10543 - 0x12; 10544 - 0xc0; 10545 - 0x08; 10546 - 0xc0; 10547 - 0x1c; 10548 - 0xc0; 10549 - 0x1b; 10550 - 0x00; 10551 - 0x16; 10552 - 0x00; 10553 - 0x13; 10554 - 0xc0; 10555 - 0x0d; 10556 - 0xc0; 10557 - 0x03; 10558 - 0x00; 10559 - 0x0a; 10560 - 0xc0; 10561 - 0x13; 10562 - 0xc0; 10563 - 0x09; 10564 - 0xc0; 10565 - 0x1f; 10566 - 0xc0; 10567 - 0x1e; 10568 - 0x00; 10569 - 0x33; 10570 - 0x00; 10571 - 0x32; 10572 - 0x00; 10573 - 0x9a; 10574 - 0x00; 10575 - 0x99; 10576 - 0x00; 10577 - 0x45; 10578 - 0x00; 10579 - 0x44; 10580 - 0xc0; 10581 - 0x0e; 10582 - 0xc0; 10583 - 0x04; 10584 - 0x00; 10585 - 0x2f; 10586 - 0x00; 10587 - 0x96; 10588 - 0x00; 10589 - 0x41; 10590 - 0x00; 10591 - 0x07; 10592 - 0xc0; 10593 - 0x11; 10594 - 0xc0; 10595 - 0x07; 10596 - 0xc0; 10597 - 0x0c; 10598 - 0xc0; 10599 - 0x02; 10600 - 0x00; 10601 - 0x05; 10602 - 0x00; 10603 - 0x04; 10604 - 0x00; 10605 - 0x15; 10606 - 0x00; 10607 - 0x12; 10608 - 0x00; 10609 - 0x09; 10610 - 0x00; 10611 - 0x14; 10612 - 0x00; 10613 - 0x11; 10614 - 0x00; 10615 - 0x08; 10616 - 0x00; 10617 - 0x06; 10618 - 0x00; 10619 - 0x03; 10620 - 0x00; 10621 - 0xff; 10622 - 0x01; 10623 - 0x00; 10624 - (* compression *) 10625 - 0x00; 10626 - 0x1e; 10627 - (* extensions *) 10628 - 0x00; 10629 - 0x0a; 10630 - 0x00; 10631 - 0x08; 10632 - (* elliptic curves *) 10633 - 0x00; 10634 - 0x06; 10635 - 0x00; 10636 - 0x19; 10637 - 0x00; 10638 - 0x18; 10639 - 0x00; 10640 - 0x17; 10641 - 0x00; 10642 - 0x10; 10643 - 0x00; 10644 - 0x0e; 10645 - 0x00; 10646 - 0x0c; 10647 - (* ALPN *) 10648 - 0x02; 10649 - 0x68; 10650 - 0x32; 10651 - 0x08; 10652 - 0x68; 10653 - 0x74; 10654 - 0x74; 10655 - 0x70; 10656 - 0x2f; 10657 - 0x31; 10658 - 0x2e; 10659 - 0x31; 10660 - ] 10661 - (* 0x00; 0x23; 0x00; 0x00; (* sessionticket_tls *) 10662 - 0x00; 0x0f; 0x00; 0x01; 0x01 (* heartbeat *) *), 10663 - { 10664 - ch with 10665 - client_version = `TLS_1_0; 10666 - client_random = 10667 - list_to_cstruct 10668 - [ 10669 - 0x7c; 10670 - 0x53; 10671 - 0x05; 10672 - 0x72; 10673 - 0x7a; 10674 - 0x1b; 10675 - 0x84; 10676 - 0x70; 10677 - 0x30; 10678 - 0x89; 10679 - 0xef; 10680 - 0xad; 10681 - 0xfb; 10682 - 0x56; 10683 - 0xc1; 10684 - 0x3d; 10685 - 0x73; 10686 - 0x4b; 10687 - 0xc7; 10688 - 0xcb; 10689 - 0x8c; 10690 - 0xc8; 10691 - 0x75; 10692 - 0x43; 10693 - 0x01; 10694 - 0x12; 10695 - 0x32; 10696 - 0xd6; 10697 - 0x74; 10698 - 0x87; 10699 - 0xcb; 10700 - 0x18; 10701 - ]; 10702 - ciphersuites = 10703 - Packet. 10704 - [ 10705 - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; 10706 - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA; 10707 - TLS_DHE_RSA_WITH_AES_256_CBC_SHA; 10708 - TLS_RSA_WITH_AES_256_CBC_SHA; 10709 - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA; 10710 - TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA; 10711 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 10712 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 10713 - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA; 10714 - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA; 10715 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA; 10716 - TLS_RSA_WITH_AES_128_CBC_SHA; 10717 - TLS_EMPTY_RENEGOTIATION_INFO_SCSV; 10718 - ]; 10719 - extensions = 10720 - [ 10721 - `SupportedGroups Packet.[ SECP521R1; SECP384R1; SECP256R1 ]; 10722 - `ALPN [ "h2"; "http/1.1" ]; 10723 - ]; 10724 - } ); 10725 - ( [ 10726 - 0x01; 10727 - (* client hello *) 10728 - 0x00; 10729 - 0x01; 10730 - 0xc6; 10731 - (* length *) 10732 - 0x03; 10733 - 0x03; 10734 - (* protocol version *) 10735 - 0xb7; 10736 - 0x36; 10737 - 0xeb; 10738 - 0x21; 10739 - 0xec; 10740 - 0x81; 10741 - 0x4d; 10742 - 0x01; 10743 - 0xfc; 10744 - 0xf4; 10745 - 0xe2; 10746 - 0x06; 10747 - 0x9a; 10748 - 0x34; 10749 - 0xb7; 10750 - 0x21; 10751 - 0xe1; 10752 - 0x23; 10753 - 0x6f; 10754 - 0xbe; 10755 - 0x50; 10756 - 0xbf; 10757 - 0xfe; 10758 - 0x33; 10759 - 0x9b; 10760 - 0xc9; 10761 - 0x5b; 10762 - 0x20; 10763 - 0x0e; 10764 - 0x15; 10765 - 0x02; 10766 - 0x27; 10767 - (* random *) 10768 - 0x00; 10769 - (* session id *) 10770 - 0x00; 10771 - 0xa0; 10772 - (* ciphersuites *) 10773 - 0xc0; 10774 - 0x30; 10775 - 0xc0; 10776 - 0x2c; 10777 - 0xc0; 10778 - 0x28; 10779 - 0xc0; 10780 - 0x24; 10781 - 0xc0; 10782 - 0x14; 10783 - 0xc0; 10784 - 0x0a; 10785 - 0xc0; 10786 - 0x22; 10787 - 0xc0; 10788 - 0x21; 10789 - 0x00; 10790 - 0xa3; 10791 - 0x00; 10792 - 0x9f; 10793 - 0x00; 10794 - 0x6b; 10795 - 0x00; 10796 - 0x6a; 10797 - 0x00; 10798 - 0x39; 10799 - 0x00; 10800 - 0x38; 10801 - 0x00; 10802 - 0x88; 10803 - 0x00; 10804 - 0x87; 10805 - 0xc0; 10806 - 0x32; 10807 - 0xc0; 10808 - 0x2e; 10809 - 0xc0; 10810 - 0x2a; 10811 - 0xc0; 10812 - 0x26; 10813 - 0xc0; 10814 - 0x0f; 10815 - 0xc0; 10816 - 0x05; 10817 - 0x00; 10818 - 0x9d; 10819 - 0x00; 10820 - 0x3d; 10821 - 0x00; 10822 - 0x35; 10823 - 0x00; 10824 - 0x84; 10825 - 0xc0; 10826 - 0x12; 10827 - 0xc0; 10828 - 0x08; 10829 - 0xc0; 10830 - 0x1c; 10831 - 0xc0; 10832 - 0x1b; 10833 - 0x00; 10834 - 0x16; 10835 - 0x00; 10836 - 0x13; 10837 - 0xc0; 10838 - 0x0d; 10839 - 0xc0; 10840 - 0x03; 10841 - 0x00; 10842 - 0x0a; 10843 - 0xc0; 10844 - 0x2f; 10845 - 0xc0; 10846 - 0x2b; 10847 - 0xc0; 10848 - 0x27; 10849 - 0xc0; 10850 - 0x23; 10851 - 0xc0; 10852 - 0x13; 10853 - 0xc0; 10854 - 0x09; 10855 - 0xc0; 10856 - 0x1f; 10857 - 0xc0; 10858 - 0x1e; 10859 - 0x00; 10860 - 0xa2; 10861 - 0x00; 10862 - 0x9e; 10863 - 0x00; 10864 - 0x67; 10865 - 0x00; 10866 - 0x40; 10867 - 0x00; 10868 - 0x33; 10869 - 0x00; 10870 - 0x32; 10871 - 0x00; 10872 - 0x9a; 10873 - 0x00; 10874 - 0x99; 10875 - 0x00; 10876 - 0x45; 10877 - 0x00; 10878 - 0x44; 10879 - 0xc0; 10880 - 0x31; 10881 - 0xc0; 10882 - 0x2d; 10883 - 0xc0; 10884 - 0x29; 10885 - 0xc0; 10886 - 0x25; 10887 - 0xc0; 10888 - 0x0e; 10889 - 0xc0; 10890 - 0x04; 10891 - 0x00; 10892 - 0x9c; 10893 - 0x00; 10894 - 0x3c; 10895 - 0x00; 10896 - 0x2f; 10897 - 0x00; 10898 - 0x96; 10899 - 0x00; 10900 - 0x41; 10901 - 0x00; 10902 - 0x07; 10903 - 0xc0; 10904 - 0x11; 10905 - 0xc0; 10906 - 0x07; 10907 - 0xc0; 10908 - 0x0c; 10909 - 0xc0; 10910 - 0x02; 10911 - 0x00; 10912 - 0x05; 10913 - 0x00; 10914 - 0x04; 10915 - 0x00; 10916 - 0x15; 10917 - 0x00; 10918 - 0x12; 10919 - 0x00; 10920 - 0x09; 10921 - 0x00; 10922 - 0x14; 10923 - 0x00; 10924 - 0x11; 10925 - 0x00; 10926 - 0x08; 10927 - 0x00; 10928 - 0x06; 10929 - 0x00; 10930 - 0x03; 10931 - 0x00; 10932 - 0xff; 10933 - 0x01; 10934 - 0x00; 10935 - (* compression *) 10936 - 0x00; 10937 - 0xFD; 10938 - (* extensions *) 10939 - 0x00; 10940 - 0x0a; 10941 - 0x00; 10942 - 0x08; 10943 - (* ec curves *) 10944 - 0x00; 10945 - 0x06; 10946 - 0x00; 10947 - 0x19; 10948 - 0x00; 10949 - 0x18; 10950 - 0x00; 10951 - 0x17; 10952 - (* 0x00; 0x23; 0x00; 0x00; *) 10953 - 0x00; 10954 - 0x0d; 10955 - 0x00; 10956 - 0x0c; 10957 - (* signature algorithms *) 10958 - 0x00; 10959 - 0x0a; 10960 - 0x06; 10961 - 0x01; 10962 - 0x05; 10963 - 0x01; 10964 - 0x04; 10965 - 0x01; 10966 - 0x03; 10967 - 0x01; 10968 - 0x02; 10969 - 0x01; 10970 - 0x00; 10971 - 0x15; 10972 - 0x00; 10973 - 0xcb; 10974 - (* padding *) 10975 - 0x00; 10976 - 0x00; 10977 - 0x00; 10978 - 0x00; 10979 - 0x00; 10980 - 0x00; 10981 - 0x00; 10982 - 0x00; 10983 - 0x00; 10984 - 0x00; 10985 - 0x00; 10986 - 0x00; 10987 - 0x00; 10988 - 0x00; 10989 - 0x00; 10990 - 0x00; 10991 - 0x00; 10992 - 0x00; 10993 - 0x00; 10994 - 0x00; 10995 - 0x00; 10996 - 0x00; 10997 - 0x00; 10998 - 0x00; 10999 - 0x00; 11000 - 0x00; 11001 - 0x00; 11002 - 0x00; 11003 - 0x00; 11004 - 0x00; 11005 - 0x00; 11006 - 0x00; 11007 - 0x00; 11008 - 0x00; 11009 - 0x00; 11010 - 0x00; 11011 - 0x00; 11012 - 0x00; 11013 - 0x00; 11014 - 0x00; 11015 - 0x00; 11016 - 0x00; 11017 - 0x00; 11018 - 0x00; 11019 - 0x00; 11020 - 0x00; 11021 - 0x00; 11022 - 0x00; 11023 - 0x00; 11024 - 0x00; 11025 - 0x00; 11026 - 0x00; 11027 - 0x00; 11028 - 0x00; 11029 - 0x00; 11030 - 0x00; 11031 - 0x00; 11032 - 0x00; 11033 - 0x00; 11034 - 0x00; 11035 - 0x00; 11036 - 0x00; 11037 - 0x00; 11038 - 0x00; 11039 - 0x00; 11040 - 0x00; 11041 - 0x00; 11042 - 0x00; 11043 - 0x00; 11044 - 0x00; 11045 - 0x00; 11046 - 0x00; 11047 - 0x00; 11048 - 0x00; 11049 - 0x00; 11050 - 0x00; 11051 - 0x00; 11052 - 0x00; 11053 - 0x00; 11054 - 0x00; 11055 - 0x00; 11056 - 0x00; 11057 - 0x00; 11058 - 0x00; 11059 - 0x00; 11060 - 0x00; 11061 - 0x00; 11062 - 0x00; 11063 - 0x00; 11064 - 0x00; 11065 - 0x00; 11066 - 0x00; 11067 - 0x00; 11068 - 0x00; 11069 - 0x00; 11070 - 0x00; 11071 - 0x00; 11072 - 0x00; 11073 - 0x00; 11074 - 0x00; 11075 - 0x00; 11076 - 0x00; 11077 - 0x00; 11078 - 0x00; 11079 - 0x00; 11080 - 0x00; 11081 - 0x00; 11082 - 0x00; 11083 - 0x00; 11084 - 0x00; 11085 - 0x00; 11086 - 0x00; 11087 - 0x00; 11088 - 0x00; 11089 - 0x00; 11090 - 0x00; 11091 - 0x00; 11092 - 0x00; 11093 - 0x00; 11094 - 0x00; 11095 - 0x00; 11096 - 0x00; 11097 - 0x00; 11098 - 0x00; 11099 - 0x00; 11100 - 0x00; 11101 - 0x00; 11102 - 0x00; 11103 - 0x00; 11104 - 0x00; 11105 - 0x00; 11106 - 0x00; 11107 - 0x00; 11108 - 0x00; 11109 - 0x00; 11110 - 0x00; 11111 - 0x00; 11112 - 0x00; 11113 - 0x00; 11114 - 0x00; 11115 - 0x00; 11116 - 0x00; 11117 - 0x00; 11118 - 0x00; 11119 - 0x00; 11120 - 0x00; 11121 - 0x00; 11122 - 0x00; 11123 - 0x00; 11124 - 0x00; 11125 - 0x00; 11126 - 0x00; 11127 - 0x00; 11128 - 0x00; 11129 - 0x00; 11130 - 0x00; 11131 - 0x00; 11132 - 0x00; 11133 - 0x00; 11134 - 0x00; 11135 - 0x00; 11136 - 0x00; 11137 - 0x00; 11138 - 0x00; 11139 - 0x00; 11140 - 0x00; 11141 - 0x00; 11142 - 0x00; 11143 - 0x00; 11144 - 0x00; 11145 - 0x00; 11146 - 0x00; 11147 - 0x00; 11148 - 0x00; 11149 - 0x00; 11150 - 0x00; 11151 - 0x00; 11152 - 0x00; 11153 - 0x00; 11154 - 0x00; 11155 - 0x00; 11156 - 0x00; 11157 - 0x00; 11158 - 0x00; 11159 - 0x00; 11160 - 0x00; 11161 - 0x00; 11162 - 0x00; 11163 - 0x00; 11164 - 0x00; 11165 - 0x00; 11166 - 0x00; 11167 - 0x00; 11168 - 0x00; 11169 - 0x00; 11170 - 0x00; 11171 - 0x00; 11172 - 0x00; 11173 - 0x00; 11174 - 0x00; 11175 - 0x00; 11176 - 0x00; 11177 - 0x00; 11178 - 0x00; 11179 - 0x10; 11180 - 0x00; 11181 - 0x0e; 11182 - 0x00; 11183 - 0x0c; 11184 - (* ALPN *) 11185 - 0x02; 11186 - 0x68; 11187 - 0x32; 11188 - 0x08; 11189 - 0x68; 11190 - 0x74; 11191 - 0x74; 11192 - 0x70; 11193 - 0x2f; 11194 - 0x31; 11195 - 0x2e; 11196 - 0x31; 11197 - ], 11198 - { 11199 - ch with 11200 - client_version = `TLS_1_2; 11201 - client_random = 11202 - list_to_cstruct 11203 - [ 11204 - 0xb7; 11205 - 0x36; 11206 - 0xeb; 11207 - 0x21; 11208 - 0xec; 11209 - 0x81; 11210 - 0x4d; 11211 - 0x01; 11212 - 0xfc; 11213 - 0xf4; 11214 - 0xe2; 11215 - 0x06; 11216 - 0x9a; 11217 - 0x34; 11218 - 0xb7; 11219 - 0x21; 11220 - 0xe1; 11221 - 0x23; 11222 - 0x6f; 11223 - 0xbe; 11224 - 0x50; 11225 - 0xbf; 11226 - 0xfe; 11227 - 0x33; 11228 - 0x9b; 11229 - 0xc9; 11230 - 0x5b; 11231 - 0x20; 11232 - 0x0e; 11233 - 0x15; 11234 - 0x02; 11235 - 0x27; 11236 - ]; 11237 - ciphersuites = 11238 - Packet. 11239 - [ 11240 - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384; 11241 - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384; 11242 - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384; 11243 - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384; 11244 - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; 11245 - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA; 11246 - TLS_DHE_RSA_WITH_AES_256_GCM_SHA384; 11247 - TLS_DHE_RSA_WITH_AES_256_CBC_SHA256; 11248 - TLS_DHE_RSA_WITH_AES_256_CBC_SHA; 11249 - TLS_RSA_WITH_AES_256_GCM_SHA384; 11250 - TLS_RSA_WITH_AES_256_CBC_SHA256; 11251 - TLS_RSA_WITH_AES_256_CBC_SHA; 11252 - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA; 11253 - TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA; 11254 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 11255 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 11256 - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256; 11257 - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256; 11258 - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256; 11259 - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; 11260 - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA; 11261 - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA; 11262 - TLS_DHE_RSA_WITH_AES_128_GCM_SHA256; 11263 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA256; 11264 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA; 11265 - TLS_RSA_WITH_AES_128_GCM_SHA256; 11266 - TLS_RSA_WITH_AES_128_CBC_SHA256; 11267 - TLS_RSA_WITH_AES_128_CBC_SHA; 11268 - TLS_EMPTY_RENEGOTIATION_INFO_SCSV; 11269 - ]; 11270 - extensions = 11271 - [ 11272 - `SupportedGroups Packet.[ SECP521R1; SECP384R1; SECP256R1 ]; 11273 - `SignatureAlgorithms 11274 - [ 11275 - `RSA_PKCS1_SHA512; 11276 - `RSA_PKCS1_SHA384; 11277 - `RSA_PKCS1_SHA256; 11278 - `RSA_PKCS1_SHA224; 11279 - `RSA_PKCS1_SHA1; 11280 - ]; 11281 - `Padding 203; 11282 - `ALPN [ "h2"; "http/1.1" ]; 11283 - ]; 11284 - } ); 11285 - ( [ 11286 - 0x01; 11287 - (* client hello *) 11288 - 0x00; 11289 - 0x00; 11290 - 0x74; 11291 - (* length *) 11292 - 0x03; 11293 - 0x04; 11294 - (* version *) 11295 - 0xf1; 11296 - 0xb2; 11297 - 0x50; 11298 - 0x16; 11299 - 0x4b; 11300 - 0x77; 11301 - 0x50; 11302 - 0xb3; 11303 - 0xdc; 11304 - 0xcb; 11305 - 0x1c; 11306 - 0x6a; 11307 - 0xae; 11308 - 0x1a; 11309 - 0x94; 11310 - 0x87; 11311 - 0xc4; 11312 - 0x17; 11313 - 0xbb; 11314 - 0xa4; 11315 - 0xf7; 11316 - 0x92; 11317 - 0xf8; 11318 - 0x16; 11319 - 0x56; 11320 - 0x12; 11321 - 0x03; 11322 - 0x38; 11323 - 0x1e; 11324 - 0xe5; 11325 - 0xc1; 11326 - 0xae; 11327 - (* client random *) 11328 - 0x00; 11329 - (* session id *) 11330 - 0x00; 11331 - 0x10; 11332 - 0x00; 11333 - 0x35; 11334 - 0x00; 11335 - 0x39; 11336 - 0x00; 11337 - 0x2f; 11338 - 0x00; 11339 - 0x33; 11340 - 0x00; 11341 - 0x16; 11342 - 0x00; 11343 - 0x0a; 11344 - 0x00; 11345 - 0x05; 11346 - 0x00; 11347 - 0x04; 11348 - (* ciphersuites *) 11349 - 0x01; 11350 - 0x00; 11351 - (* compression *) 11352 - 0x00; 11353 - 0x3b; 11354 - (* extensions *) 11355 - 0xff; 11356 - 0x01; 11357 - 0x00; 11358 - 0x01; 11359 - 0x00; 11360 - (* secure reneg *) 11361 - 0x00; 11362 - 0x00; 11363 - 0x00; 11364 - 0x10; 11365 - 0x00; 11366 - 0x0e; 11367 - 0x00; 11368 - 0x00; 11369 - 0x0b; 11370 - 0x65; 11371 - 0x78; 11372 - 0x61; 11373 - 0x6d; 11374 - 0x70; 11375 - 0x6c; 11376 - 0x65; 11377 - 0x2e; 11378 - 0x63; 11379 - 0x6f; 11380 - 0x6d; 11381 - (* SNI example.com *) 11382 - 0x00; 11383 - 0x0d; 11384 - 0x00; 11385 - 0x0c; 11386 - 0x00; 11387 - 0x0a; 11388 - 0x06; 11389 - 0x01; 11390 - 0x05; 11391 - 0x01; 11392 - 0x04; 11393 - 0x01; 11394 - 0x02; 11395 - 0x01; 11396 - 0x01; 11397 - 0x01; 11398 - (* SignatureAlgorithms *) 11399 - 0x00; 11400 - 0x10; 11401 - 0x00; 11402 - 0x0e; 11403 - 0x00; 11404 - 0x0c; 11405 - (* ALPN *) 11406 - 0x02; 11407 - 0x68; 11408 - 0x32; 11409 - 0x08; 11410 - 0x68; 11411 - 0x74; 11412 - 0x74; 11413 - 0x70; 11414 - 0x2f; 11415 - 0x31; 11416 - 0x2e; 11417 - 0x31; 11418 - ], 11419 - { 11420 - ch with 11421 - client_version = `TLS_1_3; 11422 - client_random = 11423 - list_to_cstruct 11424 - [ 11425 - 0xf1; 11426 - 0xb2; 11427 - 0x50; 11428 - 0x16; 11429 - 0x4b; 11430 - 0x77; 11431 - 0x50; 11432 - 0xb3; 11433 - 0xdc; 11434 - 0xcb; 11435 - 0x1c; 11436 - 0x6a; 11437 - 0xae; 11438 - 0x1a; 11439 - 0x94; 11440 - 0x87; 11441 - 0xc4; 11442 - 0x17; 11443 - 0xbb; 11444 - 0xa4; 11445 - 0xf7; 11446 - 0x92; 11447 - 0xf8; 11448 - 0x16; 11449 - 0x56; 11450 - 0x12; 11451 - 0x03; 11452 - 0x38; 11453 - 0x1e; 11454 - 0xe5; 11455 - 0xc1; 11456 - 0xae; 11457 - ]; 11458 - ciphersuites = 11459 - Packet. 11460 - [ 11461 - TLS_RSA_WITH_AES_256_CBC_SHA; 11462 - TLS_DHE_RSA_WITH_AES_256_CBC_SHA; 11463 - TLS_RSA_WITH_AES_128_CBC_SHA; 11464 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA; 11465 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 11466 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 11467 - ]; 11468 - extensions = 11469 - [ 11470 - `SecureRenegotiation ""; 11471 - make_hostname_ext "example.com"; 11472 - `SignatureAlgorithms 11473 - [ 11474 - `RSA_PKCS1_SHA512; 11475 - `RSA_PKCS1_SHA384; 11476 - `RSA_PKCS1_SHA256; 11477 - `RSA_PKCS1_SHA1; 11478 - `RSA_PKCS1_MD5; 11479 - ]; 11480 - `ALPN [ "h2"; "http/1.1" ]; 11481 - ]; 11482 - } ); 11483 - ]) 11484 - 11485 - let cmp_client_hellos ch ch' = 11486 - let open Core in 11487 - assert_equal ch.client_version ch'.client_version; 11488 - assert_cs_eq ch.client_random ch'.client_random; 11489 - assert_sessionid_equal ch.sessionid ch'.sessionid; 11490 - assert_lists_eq assert_equal ch.ciphersuites ch'.ciphersuites; 11491 - assert_lists_eq assert_client_extension_equal ch.extensions ch'.extensions 11492 - 11493 - let good_client_hellos_parser (xs, res) _ = 11494 - let buf = list_to_cstruct xs in 11495 - match Reader.parse_handshake buf with 11496 - | Ok (Core.ClientHello ch) -> cmp_client_hellos ch res 11497 - | _ -> assert_failure "handshake client hello parser failed" 11498 - 11499 - let good_client_hellos_tests = 11500 - List.mapi 11501 - (fun i f -> 11502 - "Parse good client hello " ^ string_of_int i 11503 - >:: good_client_hellos_parser f) 11504 - good_client_hellos 11505 - 11506 - let bad_client_hellos = 11507 - (* I rolled the dice 16 times *) 11508 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 11509 - let rand = rnd @ rnd in 11510 - [ 11511 - (* versions *) 11512 - [ 1; 0; 0; 38; 4; 3 ] @ rand 11513 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 11514 - (* invalid length *) 11515 - [ 1; 0; 0; 39; 3; 3 ] @ rand 11516 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 11517 - (* should be broken as well due to missing compression_algos *) 11518 - [ 1; 0; 0; 38; 3; 3 ] @ rand 11519 - @ [ (* session id *) 1; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 11520 - (* ciphersuites *) 11521 - [ 1; 0; 0; 40; 3; 3 ] @ rand 11522 - @ [ (* session id *) 0; (* cipher *) 0; 1; 0; 0; (* comp *) 0 (* exts *) ]; 11523 - [ 1; 0; 0; 40; 3; 3 ] @ rand 11524 - @ [ (* session id *) 0; (* cipher *) 0; 3; 0; 0; (* comp *) 0 (* exts *) ]; 11525 - [ 1; 0; 0; 40; 3; 3 ] @ rand 11526 - @ [ (* session id *) 0; (* cipher *) 1; 3; 0; 0; (* comp *) 0 (* exts *) ]; 11527 - (* extensions *) 11528 - (* empty *) 11529 - [ 1; 0; 0; 40; 3; 3 ] @ rand 11530 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0; (* exts *) 0; 1 ]; 11531 - (* some hostname *) 11532 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11533 - @ [ 11534 - (* session id *) 11535 - 0; 11536 - (* cipher *) 11537 - 0; 11538 - 0; 11539 - (* comp *) 11540 - 0; 11541 - (* exts *) 11542 - 0; 11543 - 12; 11544 - 0; 11545 - 0; 11546 - 0; 11547 - 8; 11548 - 0; 11549 - 6; 11550 - 0; 11551 - 0; 11552 - 4; 11553 - 102; 11554 - 111; 11555 - 111; 11556 - ]; 11557 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11558 - @ [ 11559 - (* session id *) 11560 - 0; 11561 - (* cipher *) 11562 - 0; 11563 - 0; 11564 - (* comp *) 11565 - 0; 11566 - (* exts *) 11567 - 0; 11568 - 12; 11569 - 0; 11570 - 0; 11571 - 0; 11572 - 8; 11573 - 0; 11574 - 6; 11575 - 0; 11576 - 0; 11577 - 4; 11578 - 102; 11579 - 111; 11580 - 111; 11581 - 111; 11582 - ]; 11583 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11584 - @ [ 11585 - (* session id *) 11586 - 0; 11587 - (* cipher *) 11588 - 0; 11589 - 0; 11590 - (* comp *) 11591 - 0; 11592 - (* exts *) 11593 - 0; 11594 - 12; 11595 - 0; 11596 - 0; 11597 - 0; 11598 - 8; 11599 - 0; 11600 - 7; 11601 - 0; 11602 - 0; 11603 - 4; 11604 - 102; 11605 - 111; 11606 - 111; 11607 - 111; 11608 - ]; 11609 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11610 - @ [ 11611 - (* session id *) 11612 - 0; 11613 - (* cipher *) 11614 - 0; 11615 - 0; 11616 - (* comp *) 11617 - 0; 11618 - (* exts *) 11619 - 0; 11620 - 12; 11621 - 0; 11622 - 0; 11623 - 0; 11624 - 9; 11625 - 0; 11626 - 7; 11627 - 0; 11628 - 0; 11629 - 4; 11630 - 102; 11631 - 111; 11632 - 111; 11633 - 111; 11634 - ]; 11635 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11636 - @ [ 11637 - (* session id *) 11638 - 0; 11639 - (* cipher *) 11640 - 0; 11641 - 0; 11642 - (* comp *) 11643 - 0; 11644 - (* exts *) 11645 - 0; 11646 - 13; 11647 - 0; 11648 - 0; 11649 - 0; 11650 - 9; 11651 - 0; 11652 - 7; 11653 - 0; 11654 - 0; 11655 - 4; 11656 - 102; 11657 - 111; 11658 - 111; 11659 - 111; 11660 - ]; 11661 - [ 1; 0; 0; 52; 3; 3 ] @ rand 11662 - @ [ 11663 - (* session id *) 11664 - 0; 11665 - (* cipher *) 11666 - 0; 11667 - 0; 11668 - (* comp *) 11669 - 0; 11670 - (* exts *) 11671 - 0; 11672 - 12; 11673 - 0; 11674 - 0; 11675 - 0; 11676 - 8; 11677 - 0; 11678 - 5; 11679 - 0; 11680 - 0; 11681 - 2; 11682 - 102; 11683 - 111; 11684 - 111; 11685 - ]; 11686 - (* multiple hostnames - legal in RFC, not accepted by any implementation *) 11687 - [ 1; 0; 0; 58; 3; 3 ] @ rand 11688 - @ [ 11689 - (* session id *) 11690 - 0; 11691 - (* cipher *) 11692 - 0; 11693 - 0; 11694 - (* comp *) 11695 - 0; 11696 - (* exts *) 11697 - 0; 11698 - 18; 11699 - 0; 11700 - 0; 11701 - 0; 11702 - 14; 11703 - 0; 11704 - 12; 11705 - 0; 11706 - 0; 11707 - 3; 11708 - 102; 11709 - 111; 11710 - 111; 11711 - 0; 11712 - 0; 11713 - 3; 11714 - 98; 11715 - 97; 11716 - 114; 11717 - ]; 11718 - (* empty SupportedGroups *) 11719 - [ 1; 0; 0; 46; 3; 3 ] @ rand 11720 - @ [ 11721 - (* session id *) 11722 - 0; 11723 - (* cipher *) 11724 - 0; 11725 - 0; 11726 - (* comp *) 11727 - 0; 11728 - (* exts *) 11729 - 0; 11730 - 6; 11731 - 0; 11732 - 0xA; 11733 - 0; 11734 - 1; 11735 - 0; 11736 - 0; 11737 - ]; 11738 - [ 1; 0; 0; 46; 3; 3 ] @ rand 11739 - @ [ 11740 - (* session id *) 11741 - 0; 11742 - (* cipher *) 11743 - 0; 11744 - 0; 11745 - (* comp *) 11746 - 0; 11747 - (* exts *) 11748 - 0; 11749 - 5; 11750 - 0; 11751 - 0xA; 11752 - 0; 11753 - 2; 11754 - 0; 11755 - 0; 11756 - ]; 11757 - [ 1; 0; 0; 46; 3; 3 ] @ rand 11758 - @ [ 11759 - (* session id *) 11760 - 0; 11761 - (* cipher *) 11762 - 0; 11763 - 0; 11764 - (* comp *) 11765 - 0; 11766 - (* exts *) 11767 - 0; 11768 - 6; 11769 - 0; 11770 - 0xA; 11771 - 0; 11772 - 2; 11773 - 0; 11774 - 1; 11775 - ]; 11776 - [ 1; 0; 0; 47; 3; 3 ] @ rand 11777 - @ [ 11778 - (* session id *) 11779 - 0; 11780 - (* cipher *) 11781 - 0; 11782 - 0; 11783 - (* comp *) 11784 - 0; 11785 - (* exts *) 11786 - 0; 11787 - 7; 11788 - 0; 11789 - 0xA; 11790 - 0; 11791 - 3; 11792 - 0; 11793 - 1; 11794 - 0; 11795 - ]; 11796 - [ 1; 0; 0; 50; 3; 3 ] @ rand 11797 - @ [ 11798 - (* session id *) 11799 - 0; 11800 - (* cipher *) 11801 - 0; 11802 - 0; 11803 - (* comp *) 11804 - 0; 11805 - (* exts *) 11806 - 0; 11807 - 10; 11808 - 0; 11809 - 0xA; 11810 - 0; 11811 - 6; 11812 - 0; 11813 - 2; 11814 - 0; 11815 - 25; 11816 - 0; 11817 - 20; 11818 - ]; 11819 - (* secure renegotiation *) 11820 - [ 1; 0; 0; 47; 3; 3 ] @ rand 11821 - @ [ 11822 - (* session id *) 11823 - 0; 11824 - (* cipher *) 11825 - 0; 11826 - 0; 11827 - (* comp *) 11828 - 0; 11829 - (* exts *) 11830 - 0; 11831 - 7; 11832 - 0xFF; 11833 - 1; 11834 - 0; 11835 - 5; 11836 - 2; 11837 - 1; 11838 - 2; 11839 - ]; 11840 - [ 1; 0; 0; 49; 3; 3 ] @ rand 11841 - @ [ 11842 - (* session id *) 11843 - 0; 11844 - (* cipher *) 11845 - 0; 11846 - 0; 11847 - (* comp *) 11848 - 0; 11849 - (* exts *) 11850 - 0; 11851 - 7; 11852 - 0xFF; 11853 - 1; 11854 - 0; 11855 - 5; 11856 - 2; 11857 - 1; 11858 - 2; 11859 - 3; 11860 - 4; 11861 - ]; 11862 - [ 1; 0; 0; 49; 3; 3 ] @ rand 11863 - @ [ 11864 - (* session id *) 11865 - 0; 11866 - (* cipher *) 11867 - 0; 11868 - 0; 11869 - (* comp *) 11870 - 0; 11871 - (* exts *) 11872 - 0; 11873 - 9; 11874 - 0xFF; 11875 - 1; 11876 - 0; 11877 - 3; 11878 - 2; 11879 - 1; 11880 - 2; 11881 - 3; 11882 - 4; 11883 - ]; 11884 - [ 1; 0; 0; 49; 3; 3 ] @ rand 11885 - @ [ 11886 - (* session id *) 11887 - 0; 11888 - (* cipher *) 11889 - 0; 11890 - 0; 11891 - (* comp *) 11892 - 0; 11893 - (* exts *) 11894 - 0; 11895 - 9; 11896 - 0xFF; 11897 - 1; 11898 - 0; 11899 - 5; 11900 - 10; 11901 - 1; 11902 - 2; 11903 - 3; 11904 - 4; 11905 - ]; 11906 - [ 1; 0; 0; 49; 3; 3 ] @ rand 11907 - @ [ 11908 - (* session id *) 11909 - 0; 11910 - (* cipher *) 11911 - 0; 11912 - 0; 11913 - (* comp *) 11914 - 0; 11915 - (* exts *) 11916 - 0; 11917 - 9; 11918 - 0xFF; 11919 - 1; 11920 - 0; 11921 - 5; 11922 - 2; 11923 - 1; 11924 - 2; 11925 - 3; 11926 - 4; 11927 - ]; 11928 - (* max fragment length *) 11929 - [ 1; 0; 0; 46; 3; 3 ] @ rand 11930 - @ [ 11931 - (* session id *) 11932 - 0; 11933 - (* cipher *) 11934 - 0; 11935 - 0; 11936 - (* comp *) 11937 - 0; 11938 - (* exts *) 11939 - 0; 11940 - 6; 11941 - 0; 11942 - 1; 11943 - 0; 11944 - 2; 11945 - 3; 11946 - 4; 11947 - ]; 11948 - [ 1; 0; 0; 44; 3; 3 ] @ rand 11949 - @ [ 11950 - (* session id *) 11951 - 0; 11952 - (* cipher *) 11953 - 0; 11954 - 0; 11955 - (* comp *) 11956 - 0; 11957 - (* exts *) 11958 - 0; 11959 - 4; 11960 - 0; 11961 - 1; 11962 - 0; 11963 - 0; 11964 - ]; 11965 - [ 1; 0; 0; 45; 3; 3 ] @ rand 11966 - @ [ 11967 - (* session id *) 11968 - 0; 11969 - (* cipher *) 11970 - 0; 11971 - 0; 11972 - (* comp *) 11973 - 0; 11974 - (* exts *) 11975 - 0; 11976 - 5; 11977 - 0; 11978 - 1; 11979 - 0; 11980 - 1; 11981 - 42; 11982 - ]; 11983 - (* Padding *) 11984 - [ 1; 0; 0; 47; 3; 3 ] @ rand 11985 - @ [ 11986 - (* session id *) 11987 - 0; 11988 - (* cipher *) 11989 - 0; 11990 - 0; 11991 - (* comp *) 11992 - 0; 11993 - (* exts *) 11994 - 0; 11995 - 7; 11996 - 0; 11997 - 21; 11998 - 0; 11999 - 3; 12000 - 1; 12001 - 2; 12002 - 3; 12003 - ]; 12004 - [ 1; 0; 0; 47; 3; 3 ] @ rand 12005 - @ [ 12006 - (* session id *) 12007 - 0; 12008 - (* cipher *) 12009 - 0; 12010 - 0; 12011 - (* comp *) 12012 - 0; 12013 - (* exts *) 12014 - 0; 12015 - 7; 12016 - 0; 12017 - 21; 12018 - 0; 12019 - 5; 12020 - 0; 12021 - 0; 12022 - 0; 12023 - ]; 12024 - [ 1; 0; 0; 47; 3; 3 ] @ rand 12025 - @ [ 12026 - (* session id *) 12027 - 0; 12028 - (* cipher *) 12029 - 0; 12030 - 0; 12031 - (* comp *) 12032 - 0; 12033 - (* exts *) 12034 - 0; 12035 - 9; 12036 - 0; 12037 - 21; 12038 - 0; 12039 - 5; 12040 - 0; 12041 - 0; 12042 - 0; 12043 - ]; 12044 - [ 1; 0; 0; 49; 3; 3 ] @ rand 12045 - @ [ 12046 - (* session id *) 12047 - 0; 12048 - (* cipher *) 12049 - 0; 12050 - 0; 12051 - (* comp *) 12052 - 0; 12053 - (* exts *) 12054 - 0; 12055 - 9; 12056 - 0; 12057 - 21; 12058 - 0; 12059 - 5; 12060 - 0; 12061 - 0; 12062 - 0; 12063 - ]; 12064 - [ 1; 0; 0; 46; 3; 3 ] @ rand 12065 - @ [ 12066 - (* session id *) 12067 - 0; 12068 - (* cipher *) 12069 - 0; 12070 - 0; 12071 - (* comp *) 12072 - 0; 12073 - (* exts *) 12074 - 0; 12075 - 7; 12076 - 0; 12077 - 21; 12078 - 0; 12079 - 3; 12080 - 0; 12081 - 0; 12082 - 0; 12083 - ]; 12084 - [ 1; 0; 0; 47; 3; 3 ] @ rand 12085 - @ [ 12086 - (* session id *) 12087 - 0; 12088 - (* cipher *) 12089 - 0; 12090 - 0; 12091 - (* comp *) 12092 - 0; 12093 - (* exts *) 12094 - 0; 12095 - 7; 12096 - 0; 12097 - 21; 12098 - 0; 12099 - 2; 12100 - 0; 12101 - 0; 12102 - 0; 12103 - ]; 12104 - (* sig hash *) 12105 - [ 1; 0; 0; 47; 3; 3 ] @ rand 12106 - @ [ 12107 - (* session id *) 12108 - 0; 12109 - (* cipher *) 12110 - 0; 12111 - 0; 12112 - (* comp *) 12113 - 0; 12114 - (* exts *) 12115 - 0; 12116 - 7; 12117 - 0; 12118 - 13; 12119 - 0; 12120 - 3; 12121 - 0; 12122 - 1; 12123 - 0; 12124 - ]; 12125 - [ 1; 0; 0; 47; 3; 3 ] @ rand 12126 - @ [ 12127 - (* session id *) 12128 - 0; 12129 - (* cipher *) 12130 - 0; 12131 - 0; 12132 - (* comp *) 12133 - 0; 12134 - (* exts *) 12135 - 0; 12136 - 7; 12137 - 0; 12138 - 13; 12139 - 0; 12140 - 3; 12141 - 0; 12142 - 0; 12143 - 0; 12144 - ]; 12145 - ] 12146 - 12147 - let bad_client_hello_parser xs _ = 12148 - let buf = list_to_cstruct xs in 12149 - match Reader.parse_handshake buf with 12150 - | Ok _ -> assert_failure "bad client hello parser won" 12151 - | Error _ -> () 12152 - 12153 - let bad_client_hello_tests = 12154 - List.mapi 12155 - (fun i f -> 12156 - "Parse bad client hello " ^ string_of_int i >:: bad_client_hello_parser f) 12157 - bad_client_hellos 12158 - 12159 - let good_server_hellos = 12160 - (* I rolled the dice 16 times *) 12161 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 12162 - let rand = rnd @ rnd in 12163 - let server_random = list_to_cstruct rand in 12164 - Core.( 12165 - let sh : server_hello = 12166 - { 12167 - server_version = `TLS_1_2; 12168 - server_random; 12169 - sessionid = None; 12170 - ciphersuite = `RSA_WITH_AES_128_CCM; 12171 - extensions = []; 12172 - } 12173 - in 12174 - [ 12175 - (* versions *) 12176 - ( [ 2; 0; 0; 38; 3; 3 ] @ rand 12177 - @ [ 12178 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 12179 - ], 12180 - sh ); 12181 - ( [ 2; 0; 0; 38; 3; 1 ] @ rand 12182 - @ [ 12183 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 12184 - ], 12185 - { sh with server_version = `TLS_1_0 } ); 12186 - ( [ 2; 0; 0; 38; 3; 2 ] @ rand 12187 - @ [ 12188 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 12189 - ], 12190 - { sh with server_version = `TLS_1_1 } ); 12191 - (* session id *) 12192 - ( [ 2; 0; 0; 41; 3; 3 ] @ rand 12193 - @ [ 12194 - (* session id *) 12195 - 3; 12196 - 1; 12197 - 2; 12198 - 3; 12199 - (* cipher *) 12200 - 0xc0; 12201 - 0x9c; 12202 - (* comp *) 12203 - 0; 12204 - (* exts *) 12205 - ], 12206 - { sh with sessionid = Some (list_to_cstruct [ 1; 2; 3 ]) } ); 12207 - (* ciphersuite *) 12208 - ( [ 2; 0; 0; 38; 3; 3 ] @ rand 12209 - @ [ 12210 - (* session id *) 0; (* cipher *) 0xc0; 0x9d; (* comp *) 0; (* exts *) 12211 - ], 12212 - { sh with ciphersuite = `RSA_WITH_AES_256_CCM } ); 12213 - (* extensions *) 12214 - (* empty *) 12215 - ( [ 2; 0; 0; 40; 3; 3 ] @ rand 12216 - @ [ 12217 - (* session id *) 12218 - 0; 12219 - (* cipher *) 12220 - 0xc0; 12221 - 0x9c; 12222 - (* comp *) 12223 - 0; 12224 - (* exts *) 12225 - 0; 12226 - 0; 12227 - ], 12228 - sh ); 12229 - (* empty hostname *) 12230 - ( [ 2; 0; 0; 44; 3; 3 ] @ rand 12231 - @ [ 12232 - (* session id *) 12233 - 0; 12234 - (* cipher *) 12235 - 0xc0; 12236 - 0x9c; 12237 - (* comp *) 12238 - 0; 12239 - (* exts *) 12240 - 0; 12241 - 4; 12242 - 0; 12243 - 0; 12244 - 0; 12245 - 0; 12246 - ], 12247 - { sh with extensions = [ `Hostname ] } ); 12248 - (* ALPN *) 12249 - ( [ 2; 0; 0; 49; 3; 3 ] @ rand 12250 - @ [ 12251 - (* session id *) 12252 - 0; 12253 - (* cipher *) 12254 - 0xc0; 12255 - 0x9c; 12256 - (* comp *) 12257 - 0; 12258 - (* exts *) 12259 - 0; 12260 - 9; 12261 - 0; 12262 - 16; 12263 - 0; 12264 - 5; 12265 - 0; 12266 - 3; 12267 - 2; 12268 - 104; 12269 - 50; 12270 - ], 12271 - { sh with extensions = [ `ALPN "h2" ] } ); 12272 - (* TODO: chosen ciphersuite must not be renegotiation (0x00ff) *) 12273 - 12274 - (* TODO: validation of extensions 12275 - - ServerName, if present, should be None 12276 - - Padding is not allowed 12277 - - EC stuff must be present if EC ciphersuite chosen 12278 - - protocol version dependencies (SignatureAlgorithm) 12279 - - no duplicates! 12280 - - only those which are in a client hello are allowed 12281 - - is there an ordering? 12282 - *) 12283 - ( [ 12284 - 0x02; 12285 - (* typ *) 12286 - 0x00; 12287 - 0x00; 12288 - 0x5A; 12289 - (* len *) 12290 - 0x03; 12291 - 0x03; 12292 - (* version *) 12293 - 0x53; 12294 - 0x66; 12295 - 0x2d; 12296 - 0xf0; 12297 - 0x1b; 12298 - 0x61; 12299 - 0x55; 12300 - 0x8f; 12301 - 0x74; 12302 - 0x2a; 12303 - 0xbf; 12304 - 0xf4; 12305 - 0x99; 12306 - 0x86; 12307 - 0x30; 12308 - 0x99; 12309 - 0x32; 12310 - 0xe4; 12311 - 0xd0; 12312 - 0x1e; 12313 - 0x2b; 12314 - 0xa9; 12315 - 0x2e; 12316 - 0x86; 12317 - 0x7b; 12318 - 0xeb; 12319 - 0x03; 12320 - 0x00; 12321 - 0xf9; 12322 - 0x11; 12323 - 0x3e; 12324 - 0xc5; 12325 - (* random *) 12326 - 0x20; 12327 - (* session ID *) 12328 - 0xd1; 12329 - 0x54; 12330 - 0xd9; 12331 - 0x05; 12332 - 0x61; 12333 - 0x41; 12334 - 0x53; 12335 - 0x33; 12336 - 0xb2; 12337 - 0xf0; 12338 - 0x13; 12339 - 0x78; 12340 - 0x1a; 12341 - 0x17; 12342 - 0xb3; 12343 - 0x1d; 12344 - 0x09; 12345 - 0xf6; 12346 - 0x59; 12347 - 0x70; 12348 - 0xfe; 12349 - 0x5d; 12350 - 0x58; 12351 - 0x22; 12352 - 0xfa; 12353 - 0x8c; 12354 - 0x5c; 12355 - 0x89; 12356 - 0xe9; 12357 - 0xa2; 12358 - 0xb4; 12359 - 0x70; 12360 - 0x00; 12361 - 0x2f; 12362 - (* cipher *) 12363 - 0x00; 12364 - (* compression *) 12365 - 0x00; 12366 - 0x12; 12367 - (* extensions *) 12368 - 0x00; 12369 - 0x00; 12370 - 0x00; 12371 - 0x00; 12372 - (* servername *) 12373 - 0xff; 12374 - 0x01; 12375 - 0x00; 12376 - 0x01; 12377 - 0x00; 12378 - (* secure renegotiation *) 12379 - 0x00; 12380 - 0x10; 12381 - 0x00; 12382 - 0x05; 12383 - 0x00; 12384 - 0x03; 12385 - (* ALPN *) 12386 - 0x02; 12387 - 0x68; 12388 - 0x32; 12389 - ], 12390 - { 12391 - sh with 12392 - ciphersuite = `RSA_WITH_AES_128_CBC_SHA; 12393 - server_random = 12394 - list_to_cstruct 12395 - [ 12396 - 0x53; 12397 - 0x66; 12398 - 0x2d; 12399 - 0xf0; 12400 - 0x1b; 12401 - 0x61; 12402 - 0x55; 12403 - 0x8f; 12404 - 0x74; 12405 - 0x2a; 12406 - 0xbf; 12407 - 0xf4; 12408 - 0x99; 12409 - 0x86; 12410 - 0x30; 12411 - 0x99; 12412 - 0x32; 12413 - 0xe4; 12414 - 0xd0; 12415 - 0x1e; 12416 - 0x2b; 12417 - 0xa9; 12418 - 0x2e; 12419 - 0x86; 12420 - 0x7b; 12421 - 0xeb; 12422 - 0x03; 12423 - 0x00; 12424 - 0xf9; 12425 - 0x11; 12426 - 0x3e; 12427 - 0xc5; 12428 - ]; 12429 - sessionid = 12430 - Some 12431 - (list_to_cstruct 12432 - [ 12433 - 0xd1; 12434 - 0x54; 12435 - 0xd9; 12436 - 0x05; 12437 - 0x61; 12438 - 0x41; 12439 - 0x53; 12440 - 0x33; 12441 - 0xb2; 12442 - 0xf0; 12443 - 0x13; 12444 - 0x78; 12445 - 0x1a; 12446 - 0x17; 12447 - 0xb3; 12448 - 0x1d; 12449 - 0x09; 12450 - 0xf6; 12451 - 0x59; 12452 - 0x70; 12453 - 0xfe; 12454 - 0x5d; 12455 - 0x58; 12456 - 0x22; 12457 - 0xfa; 12458 - 0x8c; 12459 - 0x5c; 12460 - 0x89; 12461 - 0xe9; 12462 - 0xa2; 12463 - 0xb4; 12464 - 0x70; 12465 - ]); 12466 - extensions = [ `Hostname; `SecureRenegotiation ""; `ALPN "h2" ]; 12467 - } ); 12468 - ( [ 12469 - 0x02; 12470 - 0x00; 12471 - 0x00; 12472 - 0x51; 12473 - 0x03; 12474 - 0x03; 12475 - 0x53; 12476 - 0x66; 12477 - 0x2f; 12478 - 0xb7; 12479 - 0x35; 12480 - 0x3a; 12481 - 0x42; 12482 - 0xee; 12483 - 0x1c; 12484 - 0xe6; 12485 - 0xed; 12486 - 0x63; 12487 - 0x8a; 12488 - 0x1d; 12489 - 0x3d; 12490 - 0xb3; 12491 - 0x71; 12492 - 0x9c; 12493 - 0xf5; 12494 - 0x64; 12495 - 0x45; 12496 - 0xc5; 12497 - 0xe9; 12498 - 0xf4; 12499 - 0x11; 12500 - 0x8b; 12501 - 0x9f; 12502 - 0x41; 12503 - 0x5a; 12504 - 0x5f; 12505 - 0xf1; 12506 - 0xf6; 12507 - 0x20; 12508 - 0xdf; 12509 - 0xe1; 12510 - 0x09; 12511 - 0x8a; 12512 - 0x42; 12513 - 0xf0; 12514 - 0x25; 12515 - 0xc7; 12516 - 0xbd; 12517 - 0xe5; 12518 - 0xe9; 12519 - 0x02; 12520 - 0x6a; 12521 - 0x03; 12522 - 0xaf; 12523 - 0xb4; 12524 - 0x70; 12525 - 0x80; 12526 - 0xe9; 12527 - 0x2f; 12528 - 0x07; 12529 - 0x3f; 12530 - 0x53; 12531 - 0xd3; 12532 - 0xc8; 12533 - 0x97; 12534 - 0x3f; 12535 - 0xc4; 12536 - 0x44; 12537 - 0x23; 12538 - 0xf5; 12539 - 0x94; 12540 - 0x00; 12541 - 0x2f; 12542 - 0x00; 12543 - 0x00; 12544 - 0x09; 12545 - 0x00; 12546 - 0x00; 12547 - 0x00; 12548 - 0x00; 12549 - 0xff; 12550 - 0x01; 12551 - 0x00; 12552 - 0x01; 12553 - 0x00; 12554 - ], 12555 - { 12556 - sh with 12557 - ciphersuite = `RSA_WITH_AES_128_CBC_SHA; 12558 - server_random = 12559 - list_to_cstruct 12560 - [ 12561 - 0x53; 12562 - 0x66; 12563 - 0x2f; 12564 - 0xb7; 12565 - 0x35; 12566 - 0x3a; 12567 - 0x42; 12568 - 0xee; 12569 - 0x1c; 12570 - 0xe6; 12571 - 0xed; 12572 - 0x63; 12573 - 0x8a; 12574 - 0x1d; 12575 - 0x3d; 12576 - 0xb3; 12577 - 0x71; 12578 - 0x9c; 12579 - 0xf5; 12580 - 0x64; 12581 - 0x45; 12582 - 0xc5; 12583 - 0xe9; 12584 - 0xf4; 12585 - 0x11; 12586 - 0x8b; 12587 - 0x9f; 12588 - 0x41; 12589 - 0x5a; 12590 - 0x5f; 12591 - 0xf1; 12592 - 0xf6; 12593 - ]; 12594 - sessionid = 12595 - Some 12596 - (list_to_cstruct 12597 - [ 12598 - 0xdf; 12599 - 0xe1; 12600 - 0x09; 12601 - 0x8a; 12602 - 0x42; 12603 - 0xf0; 12604 - 0x25; 12605 - 0xc7; 12606 - 0xbd; 12607 - 0xe5; 12608 - 0xe9; 12609 - 0x02; 12610 - 0x6a; 12611 - 0x03; 12612 - 0xaf; 12613 - 0xb4; 12614 - 0x70; 12615 - 0x80; 12616 - 0xe9; 12617 - 0x2f; 12618 - 0x07; 12619 - 0x3f; 12620 - 0x53; 12621 - 0xd3; 12622 - 0xc8; 12623 - 0x97; 12624 - 0x3f; 12625 - 0xc4; 12626 - 0x44; 12627 - 0x23; 12628 - 0xf5; 12629 - 0x94; 12630 - ]); 12631 - extensions = [ `Hostname; `SecureRenegotiation "" ]; 12632 - } ); 12633 - ]) 12634 - 12635 - let cmp_server_hellos sh sh' = 12636 - let open Core in 12637 - assert_equal sh.server_version sh'.server_version; 12638 - assert_cs_eq sh.server_random sh'.server_random; 12639 - assert_sessionid_equal sh.sessionid sh'.sessionid; 12640 - assert_equal sh.ciphersuite sh'.ciphersuite; 12641 - assert_lists_eq assert_server_extension_equal sh.extensions sh'.extensions 12642 - 12643 - let good_server_hellos_parser (xs, res) _ = 12644 - let buf = list_to_cstruct xs in 12645 - match Reader.parse_handshake buf with 12646 - | Ok (Core.ServerHello sh) -> cmp_server_hellos sh res 12647 - | _ -> assert_failure "handshake server hello parser failed" 12648 - 12649 - let good_server_hellos_tests = 12650 - List.mapi 12651 - (fun i f -> 12652 - "Parse good server hello " ^ string_of_int i 12653 - >:: good_server_hellos_parser f) 12654 - good_server_hellos 12655 - 12656 - let bad_server_hellos = 12657 - (* I rolled the dice 16 times *) 12658 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 12659 - let rand = rnd @ rnd in 12660 - [ 12661 - [ 2; 0; 0; 38; 3; 0 ] @ rand 12662 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12663 - [ 2; 0; 0; 38; 3; 4 ] @ rand 12664 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12665 - [ 2; 0; 0; 30; 4; 3 ] @ rand 12666 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12667 - [ 2; 0; 0; 38; 4; 3 ] @ rand 12668 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12669 - [ 2; 0; 0; 44; 3; 3 ] @ rand 12670 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12671 - [ 2; 0; 0; 38; 3; 3 ] @ rand 12672 - @ [ (* session id *) 0; (* cipher *) 0xFF; 0xFF; (* comp *) 0 (* exts *) ]; 12673 - [ 2; 0; 0; 38; 3; 3 ] @ rand 12674 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 42 (* exts *) ]; 12675 - (* session id *) 12676 - [ 2; 0; 0; 40; 3; 3 ] @ rand 12677 - @ [ (* session id *) 3; 1; 2; (* cipher *) 0; 0; (* comp *) 0 (* exts *) ]; 12678 - (* extensions *) 12679 - (* empty *) 12680 - [ 2; 0; 0; 40; 3; 3 ] @ rand 12681 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0; (* exts *) 0; 1 ]; 12682 - [ 2; 0; 0; 41; 3; 3 ] @ rand 12683 - @ [ (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0; (* exts *) 0; 1 ]; 12684 - [ 2; 0; 0; 41; 3; 3 ] @ rand 12685 - @ [ 12686 - (* session id *) 0; (* cipher *) 0; 0; (* comp *) 0; (* exts *) 0; 1; 0; 12687 - ]; 12688 - (* ALPN ext with a list of protocols *) 12689 - [ 2; 0; 0; 46; 3; 3 ] @ rand 12690 - @ [ 12691 - (* session id *) 12692 - 0; 12693 - (* cipher *) 12694 - 0; 12695 - 0; 12696 - (* comp *) 12697 - 0; 12698 - (* exts *) 12699 - 0; 12700 - 18; 12701 - 0; 12702 - 16; 12703 - 0; 12704 - 8; 12705 - 0; 12706 - 6; 12707 - 3; 12708 - 0x41; 12709 - 0x41; 12710 - 3; 12711 - 0x42; 12712 - 0x42; 12713 - ]; 12714 - ] 12715 - 12716 - let bad_server_hellos_parser xs _ = 12717 - let buf = list_to_cstruct xs in 12718 - match Reader.parse_handshake buf with 12719 - | Ok _ -> assert_failure "handshake server hello parser succeeded" 12720 - | Error _ -> () 12721 - 12722 - let bad_server_hellos_tests = 12723 - List.mapi 12724 - (fun i f -> 12725 - "Parse bad server hello " ^ string_of_int i >:: bad_server_hellos_parser f) 12726 - bad_server_hellos 12727 - 12728 - let reader_tests = 12729 - any_version_tests @ version_tests @ good_records_tests @ good_alert_tests 12730 - @ bad_alerts_tests @ good_dh_params_tests @ bad_dh_params_tests 12731 - @ good_digitally_signed_1_2_tests @ bad_digitally_signed_1_2_tests 12732 - @ good_digitally_signed_tests @ bad_digitally_signed_tests 12733 - @ good_handshake_hdr_tests @ good_handshake_no_data_tests 12734 - @ bad_handshake_no_data_tests @ good_handshake_cstruct_data_tests 12735 - @ bad_handshake_cstruct_data_tests @ bad_certificate_cstruct_data_tests 12736 - @ good_client_hellos_tests @ bad_client_hello_tests @ good_server_hellos_tests 12737 - @ bad_server_hellos_tests
-532
tests/readerwritertests.ml
··· 1 - open Tls 2 - open Testlib 3 - 4 - let readerwriter_version v _ = 5 - let buf = Writer.assemble_protocol_version v in 6 - match Reader.parse_version buf with 7 - | Ok ver -> ( 8 - assert_equal v ver; 9 - (* lets get crazy and do it one more time *) 10 - let buf' = Writer.assemble_protocol_version v in 11 - match Reader.parse_version buf' with 12 - | Ok ver' -> assert_equal v ver' 13 - | Error _ -> assert_failure "read and write version broken") 14 - | Error _ -> assert_failure "read and write version broken" 15 - 16 - let version_tests = 17 - [ 18 - "ReadWrite version TLS-1.0" >:: readerwriter_version `TLS_1_0; 19 - "ReadWrite version TLS-1.1" >:: readerwriter_version `TLS_1_1; 20 - "ReadWrite version TLS-1.2" >:: readerwriter_version `TLS_1_2; 21 - ] 22 - 23 - let readerwriter_header (v, ct, cs) _ = 24 - let buf = Writer.assemble_hdr v (ct, cs) in 25 - match Reader.parse_record buf with 26 - | Ok (`Record ((hdr, payload), f)) -> ( 27 - let open Core in 28 - assert_equal 0 (String.length f); 29 - assert_equal (v :> tls_any_version) hdr.version; 30 - assert_equal ct hdr.content_type; 31 - assert_cs_eq cs payload; 32 - let buf' = Writer.assemble_hdr v (hdr.content_type, payload) in 33 - match Reader.parse_record buf' with 34 - | Ok (`Record ((hdr, payload), f)) -> 35 - assert_equal 0 (String.length f); 36 - assert_equal (v :> tls_any_version) hdr.version; 37 - assert_equal ct hdr.content_type; 38 - assert_cs_eq cs payload 39 - | _ -> assert_failure "inner header broken") 40 - | _ -> assert_failure "header broken" 41 - 42 - let header_tests = 43 - let a = 44 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 45 - in 46 - [ 47 - "ReadWrite header" >:: readerwriter_header (`TLS_1_0, Packet.HANDSHAKE, a); 48 - "ReadWrite header" >:: readerwriter_header (`TLS_1_1, Packet.HANDSHAKE, a); 49 - "ReadWrite header" >:: readerwriter_header (`TLS_1_2, Packet.HANDSHAKE, a); 50 - "ReadWrite header" 51 - >:: readerwriter_header (`TLS_1_0, Packet.APPLICATION_DATA, a); 52 - "ReadWrite header" 53 - >:: readerwriter_header (`TLS_1_1, Packet.APPLICATION_DATA, a); 54 - "ReadWrite header" 55 - >:: readerwriter_header (`TLS_1_2, Packet.APPLICATION_DATA, a); 56 - "ReadWrite header" 57 - >:: readerwriter_header (`TLS_1_0, Packet.CHANGE_CIPHER_SPEC, a); 58 - "ReadWrite header" 59 - >:: readerwriter_header (`TLS_1_1, Packet.CHANGE_CIPHER_SPEC, a); 60 - "ReadWrite header" 61 - >:: readerwriter_header (`TLS_1_2, Packet.CHANGE_CIPHER_SPEC, a); 62 - "ReadWrite header" >:: readerwriter_header (`TLS_1_0, Packet.ALERT, a); 63 - "ReadWrite header" >:: readerwriter_header (`TLS_1_1, Packet.ALERT, a); 64 - "ReadWrite header" >:: readerwriter_header (`TLS_1_2, Packet.ALERT, a); 65 - ] 66 - 67 - let readerwriter_alert (lvl, typ) _ = 68 - let buf, expl = 69 - match lvl with 70 - | None -> (Writer.assemble_alert typ, Packet.FATAL) 71 - | Some l -> (Writer.assemble_alert ~level:l typ, l) 72 - in 73 - match Reader.parse_alert buf with 74 - | Ok (l', t') -> ( 75 - assert_equal expl l'; 76 - assert_equal typ t'; 77 - (* lets get crazy and do it one more time *) 78 - let buf' = Writer.assemble_alert ~level:l' t' in 79 - match Reader.parse_alert buf' with 80 - | Ok (l'', t'') -> 81 - assert_equal expl l''; 82 - assert_equal typ t'' 83 - | Error _ -> assert_failure "inner read and write alert broken") 84 - | Error _ -> assert_failure "read and write alert broken" 85 - 86 - let rw_alert_tests = 87 - Packet. 88 - [ 89 - (None, CLOSE_NOTIFY); 90 - (None, UNEXPECTED_MESSAGE); 91 - (None, BAD_RECORD_MAC); 92 - (None, RECORD_OVERFLOW); 93 - (None, HANDSHAKE_FAILURE); 94 - (None, BAD_CERTIFICATE); 95 - (None, CERTIFICATE_EXPIRED); 96 - (None, DECODE_ERROR); 97 - (None, PROTOCOL_VERSION); 98 - (None, UNSUPPORTED_EXTENSION); 99 - (None, UNRECOGNIZED_NAME); 100 - (None, NO_APPLICATION_PROTOCOL); 101 - (Some FATAL, CLOSE_NOTIFY); 102 - (Some FATAL, UNEXPECTED_MESSAGE); 103 - (Some FATAL, BAD_RECORD_MAC); 104 - (Some FATAL, RECORD_OVERFLOW); 105 - (Some FATAL, HANDSHAKE_FAILURE); 106 - (Some FATAL, BAD_CERTIFICATE); 107 - (Some FATAL, CERTIFICATE_EXPIRED); 108 - (Some FATAL, DECODE_ERROR); 109 - (Some FATAL, PROTOCOL_VERSION); 110 - (Some FATAL, UNSUPPORTED_EXTENSION); 111 - (Some FATAL, UNRECOGNIZED_NAME); 112 - (Some FATAL, NO_APPLICATION_PROTOCOL); 113 - (Some WARNING, CLOSE_NOTIFY); 114 - (* ( Some WARNING, UNEXPECTED_MESSAGE ) ; 115 - ( Some WARNING, BAD_RECORD_MAC ) ; 116 - ( Some WARNING, DECRYPTION_FAILED ) ; 117 - ( Some WARNING, RECORD_OVERFLOW ) ; 118 - ( Some WARNING, DECOMPRESSION_FAILURE ) ; 119 - ( Some WARNING, HANDSHAKE_FAILURE ) ; *) 120 - (Some FATAL, BAD_CERTIFICATE); 121 - (Some FATAL, CERTIFICATE_EXPIRED); 122 - (* ( Some WARNING, UNKNOWN_CA ) ; 123 - ( Some WARNING, ACCESS_DENIED ) ; 124 - ( Some WARNING, DECODE_ERROR ) ; 125 - ( Some WARNING, DECRYPT_ERROR ) ; *) 126 - (* ( Some WARNING, PROTOCOL_VERSION ) ; 127 - ( Some WARNING, INSUFFICIENT_SECURITY ) ; 128 - ( Some WARNING, INTERNAL_ERROR ) ; *) 129 - (Some WARNING, USER_CANCELED); 130 - (Some WARNING, NO_RENEGOTIATION); 131 - (* ( Some WARNING, UNSUPPORTED_EXTENSION ) ; *) 132 - (Some FATAL, UNRECOGNIZED_NAME); 133 - ] 134 - 135 - let rw_alert_tests = 136 - List.mapi 137 - (fun i f -> "RW alert " ^ string_of_int i >:: readerwriter_alert f) 138 - rw_alert_tests 139 - 140 - let assert_dh_eq a b = 141 - Core.(assert_cs_eq a.dh_p b.dh_p); 142 - Core.(assert_cs_eq a.dh_g b.dh_g); 143 - Core.(assert_cs_eq a.dh_Ys b.dh_Ys) 144 - 145 - let readerwriter_dh_params params _ = 146 - let buf = Writer.assemble_dh_parameters params in 147 - match Reader.parse_dh_parameters buf with 148 - | Ok (p, raw, rst) -> ( 149 - assert_equal (String.length rst) 0; 150 - assert_dh_eq p params; 151 - assert_equal buf raw; 152 - (* lets get crazy and do it one more time *) 153 - let buf' = Writer.assemble_dh_parameters p in 154 - match Reader.parse_dh_parameters buf' with 155 - | Ok (p', raw', rst') -> 156 - assert_equal (String.length rst') 0; 157 - assert_dh_eq p' params; 158 - assert_equal buf raw' 159 - | Error _ -> assert_failure "inner read and write dh params broken") 160 - | Error _ -> assert_failure "read and write dh params broken" 161 - 162 - let rw_dh_params = 163 - let a = 164 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 165 - in 166 - let emp = list_to_cstruct [] in 167 - Core. 168 - [ 169 - { dh_p = emp; dh_g = emp; dh_Ys = emp }; 170 - { dh_p = a; dh_g = emp; dh_Ys = emp }; 171 - { dh_p = emp; dh_g = a; dh_Ys = emp }; 172 - { dh_p = emp; dh_g = emp; dh_Ys = a }; 173 - { dh_p = a ^ a; dh_g = a ^ a; dh_Ys = a ^ a }; 174 - ] 175 - 176 - let rw_dh_tests = 177 - List.mapi 178 - (fun i f -> "RW dh_param " ^ string_of_int i >:: readerwriter_dh_params f) 179 - rw_dh_params 180 - 181 - let readerwriter_digitally_signed params _ = 182 - let buf = Writer.assemble_digitally_signed params in 183 - match Reader.parse_digitally_signed buf with 184 - | Ok params' -> ( 185 - assert_cs_eq params params'; 186 - (* lets get crazy and do it one more time *) 187 - let buf' = Writer.assemble_digitally_signed params' in 188 - match Reader.parse_digitally_signed buf' with 189 - | Ok params'' -> assert_cs_eq params params'' 190 - | Error _ -> assert_failure "inner read and write digitally signed broken" 191 - ) 192 - | Error _ -> assert_failure "read and write digitally signed broken" 193 - 194 - let rw_ds_params = 195 - let a = 196 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 197 - in 198 - let emp = list_to_cstruct [] in 199 - [ a; a ^ a; emp; emp ^ a ] 200 - 201 - let rw_ds_tests = 202 - List.mapi 203 - (fun i f -> 204 - "RW digitally signed " ^ string_of_int i 205 - >:: readerwriter_digitally_signed f) 206 - rw_ds_params 207 - 208 - let readerwriter_digitally_signed_1_2 (sigalg, params) _ = 209 - let buf = Writer.assemble_digitally_signed_1_2 sigalg params in 210 - match Reader.parse_digitally_signed_1_2 buf with 211 - | Ok (sigalg', params') -> ( 212 - assert_equal sigalg sigalg'; 213 - assert_cs_eq params params'; 214 - (* lets get crazy and do it one more time *) 215 - let buf' = Writer.assemble_digitally_signed_1_2 sigalg' params' in 216 - match Reader.parse_digitally_signed_1_2 buf' with 217 - | Ok (sigalg'', params'') -> 218 - assert_equal sigalg sigalg''; 219 - assert_cs_eq params params'' 220 - | Error _ -> 221 - assert_failure "inner read and write digitally signed 1.2 broken") 222 - | Error _ -> assert_failure "read and write digitally signed 1.2 broken" 223 - 224 - let rec cartesian_product f a b = 225 - match b with 226 - | [] -> [] 227 - | e :: rt -> List.map (fun x -> f x e) a @ cartesian_product f a rt 228 - 229 - let rw_ds_1_2_params = 230 - let a = 231 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 232 - in 233 - let emp = list_to_cstruct [] in 234 - let cs = [ a; a ^ a; emp; emp ^ a ] in 235 - let sig_algs = 236 - [ 237 - `RSA_PKCS1_MD5; 238 - `RSA_PKCS1_SHA1; 239 - `RSA_PKCS1_SHA224; 240 - `RSA_PKCS1_SHA256; 241 - `RSA_PKCS1_SHA384; 242 - `RSA_PKCS1_SHA512; 243 - `RSA_PSS_RSAENC_SHA256; 244 - `RSA_PSS_RSAENC_SHA384; 245 - `RSA_PSS_RSAENC_SHA512; 246 - ] 247 - in 248 - cartesian_product (fun sigalg c -> (sigalg, c)) sig_algs cs 249 - 250 - let rw_ds_1_2_tests = 251 - List.mapi 252 - (fun i f -> 253 - "RW digitally signed 1.2 " ^ string_of_int i 254 - >:: readerwriter_digitally_signed_1_2 f) 255 - rw_ds_1_2_params 256 - 257 - let rw_handshake_no_data hs _ = 258 - let buf = Writer.assemble_handshake hs in 259 - match Reader.parse_handshake buf with 260 - | Ok hs' -> ( 261 - assert_equal hs hs'; 262 - (* lets get crazy and do it one more time *) 263 - let buf' = Writer.assemble_handshake hs' in 264 - match Reader.parse_handshake buf' with 265 - | Ok hs'' -> assert_equal hs hs'' 266 - | Error _ -> assert_failure "handshake no data inner failed") 267 - | Error _ -> assert_failure "handshake no data failed" 268 - 269 - let rw_handshakes_no_data_vals = [ Core.HelloRequest; Core.ServerHelloDone ] 270 - 271 - let rw_handshake_no_data_tests = 272 - List.mapi 273 - (fun i f -> 274 - "handshake no data " ^ string_of_int i >:: rw_handshake_no_data f) 275 - rw_handshakes_no_data_vals 276 - 277 - let rw_handshake_cstruct_data hs _ = 278 - let buf = Writer.assemble_handshake hs in 279 - match Reader.parse_handshake buf with 280 - | Ok hs' -> ( 281 - Readertests.cmp_handshake_cstruct hs hs'; 282 - (* lets get crazy and do it one more time *) 283 - let buf' = Writer.assemble_handshake hs' in 284 - match Reader.parse_handshake buf' with 285 - | Ok hs'' -> Readertests.cmp_handshake_cstruct hs hs'' 286 - | Error _ -> assert_failure "handshake cstruct data inner failed") 287 - | Error _ -> assert_failure "handshake cstruct data failed" 288 - 289 - let rw_handshake_cstruct_data_vals = 290 - let data_cs = list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 ] in 291 - let emp = list_to_cstruct [] in 292 - Core. 293 - [ 294 - ServerKeyExchange emp; 295 - ServerKeyExchange data_cs; 296 - Finished emp; 297 - Finished data_cs; 298 - ClientKeyExchange emp; 299 - ClientKeyExchange data_cs; 300 - Certificate (Writer.assemble_certificates []); 301 - Certificate (Writer.assemble_certificates [ data_cs ]); 302 - Certificate (Writer.assemble_certificates [ data_cs; data_cs ]); 303 - Certificate (Writer.assemble_certificates [ data_cs; emp ]); 304 - Certificate (Writer.assemble_certificates [ emp; data_cs ]); 305 - Certificate (Writer.assemble_certificates [ emp; data_cs; emp ]); 306 - Certificate (Writer.assemble_certificates [ emp; data_cs; emp; data_cs ]); 307 - ] 308 - 309 - let rw_handshake_cstruct_data_tests = 310 - List.mapi 311 - (fun i f -> 312 - "handshake cstruct data " ^ string_of_int i 313 - >:: rw_handshake_cstruct_data f) 314 - rw_handshake_cstruct_data_vals 315 - 316 - let rw_handshake_client_hello hs _ = 317 - let buf = Writer.assemble_handshake hs in 318 - match Reader.parse_handshake buf with 319 - | Ok hs' -> ( 320 - Core.( 321 - match (hs, hs') with 322 - | ClientHello ch, ClientHello ch' -> 323 - Readertests.cmp_client_hellos ch ch' 324 - | _ -> assert_failure "handshake client hello broken"); 325 - (* lets get crazy and do it one more time *) 326 - let buf' = Writer.assemble_handshake hs' in 327 - match Reader.parse_handshake buf' with 328 - | Ok hs'' -> ( 329 - Core.( 330 - match (hs, hs'') with 331 - | ClientHello ch, ClientHello ch'' -> 332 - Readertests.cmp_client_hellos ch ch'' 333 - | _ -> assert_failure "handshake client hello broken")) 334 - | Error _ -> assert_failure "handshake client hello inner failed") 335 - | Error _ -> assert_failure "handshake client hello failed" 336 - 337 - let rw_handshake_client_hello_vals = 338 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 339 - let client_random = list_to_cstruct (rnd @ rnd) in 340 - Core.( 341 - let ch : client_hello = 342 - { 343 - client_version = `TLS_1_2; 344 - client_random; 345 - sessionid = None; 346 - ciphersuites = []; 347 - extensions = []; 348 - } 349 - in 350 - [ 351 - ClientHello ch; 352 - ClientHello { ch with client_version = `TLS_1_0 }; 353 - ClientHello { ch with client_version = `TLS_1_1 }; 354 - ClientHello 355 - { ch with ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ] }; 356 - ClientHello 357 - { 358 - ch with 359 - ciphersuites = 360 - Packet. 361 - [ 362 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 363 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 364 - TLS_RSA_WITH_AES_256_CBC_SHA; 365 - ]; 366 - }; 367 - ClientHello { ch with sessionid = Some (list_to_cstruct rnd) }; 368 - ClientHello { ch with sessionid = Some client_random }; 369 - ClientHello 370 - { 371 - ch with 372 - ciphersuites = 373 - Packet. 374 - [ 375 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 376 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 377 - TLS_RSA_WITH_AES_256_CBC_SHA; 378 - ]; 379 - sessionid = Some client_random; 380 - }; 381 - ClientHello { ch with extensions = [ make_hostname_ext "foobar" ] }; 382 - ClientHello { ch with extensions = [ make_hostname_ext "foobarblubb" ] }; 383 - ClientHello 384 - { 385 - ch with 386 - extensions = 387 - [ 388 - make_hostname_ext "foobarblubb"; 389 - `SupportedGroups Packet.[ SECP521R1; SECP384R1 ]; 390 - ]; 391 - }; 392 - ClientHello { ch with extensions = [ `ALPN [ "h2"; "http/1.1" ] ] }; 393 - ClientHello 394 - { 395 - ch with 396 - extensions = 397 - [ 398 - make_hostname_ext "foobarblubb"; 399 - `SupportedGroups Packet.[ SECP521R1; SECP384R1 ]; 400 - `SignatureAlgorithms [ `RSA_PKCS1_MD5 ]; 401 - `ALPN [ "h2"; "http/1.1" ]; 402 - ]; 403 - }; 404 - ClientHello 405 - { 406 - ch with 407 - ciphersuites = 408 - Packet. 409 - [ 410 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 411 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 412 - TLS_RSA_WITH_AES_256_CBC_SHA; 413 - ]; 414 - sessionid = Some client_random; 415 - extensions = [ make_hostname_ext "foobarblubb" ]; 416 - }; 417 - ClientHello 418 - { 419 - ch with 420 - ciphersuites = 421 - Packet. 422 - [ 423 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 424 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 425 - TLS_RSA_WITH_AES_256_CBC_SHA; 426 - ]; 427 - sessionid = Some client_random; 428 - extensions = 429 - [ 430 - make_hostname_ext "foobarblubb"; 431 - `SupportedGroups Packet.[ SECP521R1; SECP384R1 ]; 432 - `SignatureAlgorithms [ `RSA_PKCS1_SHA1; `RSA_PKCS1_SHA512 ]; 433 - `ALPN [ "h2"; "http/1.1" ]; 434 - ]; 435 - }; 436 - ClientHello 437 - { 438 - ch with 439 - ciphersuites = 440 - Packet. 441 - [ 442 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 443 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 444 - TLS_RSA_WITH_AES_256_CBC_SHA; 445 - ]; 446 - sessionid = Some client_random; 447 - extensions = 448 - [ 449 - make_hostname_ext "foobarblubb"; 450 - `SupportedGroups Packet.[ SECP521R1; SECP384R1 ]; 451 - `SignatureAlgorithms [ `RSA_PKCS1_MD5; `RSA_PKCS1_SHA256 ]; 452 - `SecureRenegotiation client_random; 453 - `ALPN [ "h2"; "http/1.1" ]; 454 - ]; 455 - }; 456 - ]) 457 - 458 - let rw_handshake_client_hello_tests = 459 - List.mapi 460 - (fun i f -> 461 - "handshake client hello " ^ string_of_int i 462 - >:: rw_handshake_client_hello f) 463 - rw_handshake_client_hello_vals 464 - 465 - let rw_handshake_server_hello hs _ = 466 - let buf = Writer.assemble_handshake hs in 467 - match Reader.parse_handshake buf with 468 - | Ok hs' -> ( 469 - Core.( 470 - match (hs, hs') with 471 - | ServerHello sh, ServerHello sh' -> 472 - Readertests.cmp_server_hellos sh sh' 473 - | _ -> assert_failure "handshake server hello broken"); 474 - (* lets get crazy and do it one more time *) 475 - let buf' = Writer.assemble_handshake hs' in 476 - match Reader.parse_handshake buf' with 477 - | Ok hs'' -> ( 478 - Core.( 479 - match (hs, hs'') with 480 - | ServerHello sh, ServerHello sh'' -> 481 - Readertests.cmp_server_hellos sh sh'' 482 - | _ -> assert_failure "handshake server hello broken")) 483 - | Error _ -> assert_failure "handshake server hello inner failed") 484 - | Error _ -> assert_failure "handshake server hello failed" 485 - 486 - let rw_handshake_server_hello_vals = 487 - let rnd = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 488 - let server_random = list_to_cstruct (rnd @ rnd) in 489 - Core.( 490 - let sh : server_hello = 491 - { 492 - server_version = `TLS_1_2; 493 - server_random; 494 - sessionid = None; 495 - ciphersuite = `RSA_WITH_AES_256_CCM; 496 - extensions = []; 497 - } 498 - in 499 - [ 500 - ServerHello sh; 501 - ServerHello { sh with server_version = `TLS_1_0 }; 502 - ServerHello { sh with server_version = `TLS_1_1 }; 503 - ServerHello { sh with sessionid = Some server_random }; 504 - ServerHello 505 - { sh with sessionid = Some server_random; extensions = [ `Hostname ] }; 506 - ServerHello 507 - { 508 - sh with 509 - sessionid = Some server_random; 510 - extensions = [ `Hostname; `SecureRenegotiation server_random ]; 511 - }; 512 - ServerHello 513 - { 514 - sh with 515 - sessionid = Some server_random; 516 - extensions = 517 - [ `Hostname; `SecureRenegotiation server_random; `ALPN "h2" ]; 518 - }; 519 - ]) 520 - 521 - let rw_handshake_server_hello_tests = 522 - List.mapi 523 - (fun i f -> 524 - "handshake server hello " ^ string_of_int i 525 - >:: rw_handshake_server_hello f) 526 - rw_handshake_server_hello_vals 527 - 528 - let readerwriter_tests = 529 - version_tests @ header_tests @ rw_alert_tests @ rw_dh_tests @ rw_ds_tests 530 - @ rw_ds_1_2_tests @ rw_handshake_no_data_tests 531 - @ rw_handshake_cstruct_data_tests @ rw_handshake_client_hello_tests 532 - @ rw_handshake_server_hello_tests
-1
tests/server.key
··· 1 - ../certificates/server.key
-1
tests/server.pem
··· 1 - ../certificates/server.pem
-6
tests/test.ml
··· 1 - let () = 2 - Fmt_tty.setup_std_outputs (); 3 - Logs.set_level (Some Logs.Debug); 4 - Logs.set_reporter (Logs_fmt.reporter ~dst:Format.std_formatter ()); 5 - Crypto_rng_unix.use_default (); 6 - Alcotest.run "tls" (Unittests.suite @ Key_derivation.suite)
-80
tests/testlib.ml
··· 1 - let () = Crypto_rng_unix.use_default () 2 - 3 - let time f = 4 - let t1 = Sys.time () in 5 - let r = f () in 6 - let t2 = Sys.time () in 7 - Printf.eprintf "[time] %f.04 s\n%!" (t2 -. t1); 8 - r 9 - 10 - let list_to_cstruct xs = 11 - let buf = Bytes.create (List.length xs) in 12 - List.iteri (Bytes.set_uint8 buf) xs; 13 - Bytes.unsafe_to_string buf 14 - 15 - let uint16_to_cstruct i = 16 - let buf = Bytes.create 2 in 17 - Bytes.set_uint16_be buf 0 i; 18 - buf 19 - 20 - let hexdump_to_str cs = Ohex.encode cs 21 - 22 - (* OUnit2 compatibility shims *) 23 - 24 - let assert_failure msg = Alcotest.fail msg 25 - 26 - let assert_equal ?cmp ?printer ?msg expected actual = 27 - let equal = 28 - match cmp with Some f -> f expected actual | None -> expected = actual 29 - in 30 - if not equal then 31 - match (printer, msg) with 32 - | Some p, Some m -> 33 - Alcotest.failf "%s: expected %s, got %s" m (p expected) (p actual) 34 - | Some p, None -> 35 - Alcotest.failf "expected %s, got %s" (p expected) (p actual) 36 - | None, Some m -> Alcotest.fail m 37 - | None, None -> Alcotest.fail "assert_equal" 38 - 39 - let assert_bool msg b = if not b then Alcotest.fail msg 40 - let ( >:: ) name f = (name, `Quick, fun () -> f ()) 41 - 42 - let assert_cs_eq ?msg cs1 cs2 = 43 - assert_equal ~cmp:String.equal ~printer:hexdump_to_str ?msg cs1 cs2 44 - 45 - let rec assert_lists_eq comparison a b = 46 - match (a, b) with 47 - | [], [] -> () 48 - | a :: r1, b :: r2 -> 49 - comparison a b; 50 - assert_lists_eq comparison r1 r2 51 - | _ -> assert_failure "lists not equal" 52 - 53 - let assert_sessionid_equal a b = 54 - match (a, b) with 55 - | None, None -> () 56 - | Some x, Some y -> assert_cs_eq x y 57 - | _ -> assert_failure "session id not equal" 58 - 59 - let assert_client_extension_equal a b = 60 - match (a, b) with 61 - | `Hostname a, `Hostname b -> assert_equal a b 62 - | `MaxFragmentLength a, `MaxFragmentLength b -> assert_equal a b 63 - | `SupportedGroups a, `SupportedGroups b -> assert_lists_eq assert_equal a b 64 - | `SecureRenegotiation a, `SecureRenegotiation b -> assert_cs_eq a b 65 - | `Padding a, `Padding b -> assert_equal a b 66 - | `SignatureAlgorithms a, `SignatureAlgorithms b -> 67 - assert_lists_eq (fun sa sa' -> assert_equal sa sa') a b 68 - | `ALPN a, `ALPN b -> assert_lists_eq assert_equal a b 69 - | _ -> assert_failure "extensions did not match" 70 - 71 - let assert_server_extension_equal a b = 72 - match (a, b) with 73 - | `Hostname, `Hostname -> () 74 - | `MaxFragmentLength a, `MaxFragmentLength b -> assert_equal a b 75 - | `SecureRenegotiation a, `SecureRenegotiation b -> assert_cs_eq a b 76 - | `ALPN a, `ALPN b -> assert_equal a b 77 - | _ -> assert_failure "extensions did not match" 78 - 79 - let make_hostname_ext h = 80 - `Hostname (Domain_name.of_string_exn h |> Domain_name.host_exn)
-6
tests/unittests.ml
··· 1 - let suite = 2 - [ 3 - ("reader", Readertests.reader_tests); 4 - ("writer", Writertests.writer_tests); 5 - ("reader_writer", Readerwritertests.readerwriter_tests); 6 - ]
-2542
tests/writertests.ml
··· 1 - open Tls 2 - open Testlib 3 - 4 - let version_assembler (ver, res) _ = 5 - let buf = Writer.assemble_protocol_version ver in 6 - assert_cs_eq buf res 7 - 8 - let version_assembler_tests = 9 - [ 10 - (`TLS_1_0, list_to_cstruct [ 3; 1 ]); 11 - (`TLS_1_1, list_to_cstruct [ 3; 2 ]); 12 - (`TLS_1_2, list_to_cstruct [ 3; 3 ]); 13 - ] 14 - 15 - let version_tests = 16 - List.mapi 17 - (fun i f -> "Assemble version " ^ string_of_int i >:: version_assembler f) 18 - version_assembler_tests 19 - 20 - let hdr_assembler (ver, ct, cs, res) _ = 21 - let buf = Writer.assemble_hdr ver (ct, list_to_cstruct cs) in 22 - let res' = list_to_cstruct res in 23 - assert_cs_eq buf res' 24 - 25 - let hdr_assembler_tests = 26 - [ 27 - (`TLS_1_2, Packet.CHANGE_CIPHER_SPEC, [], [ 20; 3; 3; 0; 0 ]); 28 - (`TLS_1_1, Packet.CHANGE_CIPHER_SPEC, [], [ 20; 3; 2; 0; 0 ]); 29 - (`TLS_1_0, Packet.CHANGE_CIPHER_SPEC, [], [ 20; 3; 1; 0; 0 ]); 30 - ( `TLS_1_2, 31 - Packet.CHANGE_CIPHER_SPEC, 32 - [ 0; 0; 0 ], 33 - [ 20; 3; 3; 0; 3; 0; 0; 0 ] ); 34 - (`TLS_1_2, Packet.ALERT, [], [ 21; 3; 3; 0; 0 ]); 35 - (`TLS_1_1, Packet.ALERT, [], [ 21; 3; 2; 0; 0 ]); 36 - (`TLS_1_0, Packet.ALERT, [], [ 21; 3; 1; 0; 0 ]); 37 - (`TLS_1_2, Packet.ALERT, [ 0; 0; 0 ], [ 21; 3; 3; 0; 3; 0; 0; 0 ]); 38 - (`TLS_1_2, Packet.HANDSHAKE, [], [ 22; 3; 3; 0; 0 ]); 39 - (`TLS_1_1, Packet.HANDSHAKE, [], [ 22; 3; 2; 0; 0 ]); 40 - (`TLS_1_0, Packet.HANDSHAKE, [], [ 22; 3; 1; 0; 0 ]); 41 - (`TLS_1_2, Packet.HANDSHAKE, [ 0; 0; 0 ], [ 22; 3; 3; 0; 3; 0; 0; 0 ]); 42 - (`TLS_1_2, Packet.APPLICATION_DATA, [], [ 23; 3; 3; 0; 0 ]); 43 - (`TLS_1_1, Packet.APPLICATION_DATA, [], [ 23; 3; 2; 0; 0 ]); 44 - (`TLS_1_0, Packet.APPLICATION_DATA, [], [ 23; 3; 1; 0; 0 ]); 45 - (`TLS_1_2, Packet.APPLICATION_DATA, [ 0; 0; 0 ], [ 23; 3; 3; 0; 3; 0; 0; 0 ]); 46 - ] 47 - 48 - let hdr_tests = 49 - List.mapi 50 - (fun i f -> "Assemble header " ^ string_of_int i >:: hdr_assembler f) 51 - hdr_assembler_tests 52 - 53 - let alert_assembler (level, t, res) _ = 54 - let buf = 55 - match level with 56 - | None -> Writer.assemble_alert t 57 - | Some l -> Writer.assemble_alert ~level:l t 58 - in 59 - let res' = list_to_cstruct res in 60 - assert_cs_eq buf res' 61 - 62 - let alert_assembler_tests = 63 - Packet. 64 - [ 65 - (None, CLOSE_NOTIFY, [ 2; 0 ]); 66 - (None, UNEXPECTED_MESSAGE, [ 2; 10 ]); 67 - (None, BAD_RECORD_MAC, [ 2; 20 ]); 68 - (None, RECORD_OVERFLOW, [ 2; 22 ]); 69 - (None, HANDSHAKE_FAILURE, [ 2; 40 ]); 70 - (None, BAD_CERTIFICATE, [ 2; 42 ]); 71 - (None, CERTIFICATE_EXPIRED, [ 2; 45 ]); 72 - (None, DECODE_ERROR, [ 2; 50 ]); 73 - (None, PROTOCOL_VERSION, [ 2; 70 ]); 74 - (None, USER_CANCELED, [ 2; 90 ]); 75 - (None, NO_RENEGOTIATION, [ 2; 100 ]); 76 - (None, UNSUPPORTED_EXTENSION, [ 2; 110 ]); 77 - (None, UNRECOGNIZED_NAME, [ 2; 112 ]); 78 - (None, NO_APPLICATION_PROTOCOL, [ 2; 120 ]); 79 - (Some FATAL, CLOSE_NOTIFY, [ 2; 0 ]); 80 - (Some FATAL, UNEXPECTED_MESSAGE, [ 2; 10 ]); 81 - (Some FATAL, BAD_RECORD_MAC, [ 2; 20 ]); 82 - (Some FATAL, RECORD_OVERFLOW, [ 2; 22 ]); 83 - (Some FATAL, HANDSHAKE_FAILURE, [ 2; 40 ]); 84 - (Some FATAL, BAD_CERTIFICATE, [ 2; 42 ]); 85 - (Some FATAL, CERTIFICATE_EXPIRED, [ 2; 45 ]); 86 - (Some FATAL, DECODE_ERROR, [ 2; 50 ]); 87 - (Some FATAL, PROTOCOL_VERSION, [ 2; 70 ]); 88 - (Some FATAL, USER_CANCELED, [ 2; 90 ]); 89 - (Some FATAL, NO_RENEGOTIATION, [ 2; 100 ]); 90 - (Some FATAL, UNSUPPORTED_EXTENSION, [ 2; 110 ]); 91 - (Some FATAL, UNRECOGNIZED_NAME, [ 2; 112 ]); 92 - (Some FATAL, NO_APPLICATION_PROTOCOL, [ 2; 120 ]); 93 - (Some WARNING, CLOSE_NOTIFY, [ 1; 0 ]); 94 - (Some WARNING, UNEXPECTED_MESSAGE, [ 1; 10 ]); 95 - (Some WARNING, BAD_RECORD_MAC, [ 1; 20 ]); 96 - (Some WARNING, RECORD_OVERFLOW, [ 1; 22 ]); 97 - (Some WARNING, HANDSHAKE_FAILURE, [ 1; 40 ]); 98 - (Some WARNING, BAD_CERTIFICATE, [ 1; 42 ]); 99 - (Some WARNING, CERTIFICATE_EXPIRED, [ 1; 45 ]); 100 - (Some WARNING, DECODE_ERROR, [ 1; 50 ]); 101 - (Some WARNING, PROTOCOL_VERSION, [ 1; 70 ]); 102 - (Some WARNING, USER_CANCELED, [ 1; 90 ]); 103 - (Some WARNING, NO_RENEGOTIATION, [ 1; 100 ]); 104 - (Some WARNING, UNSUPPORTED_EXTENSION, [ 1; 110 ]); 105 - (Some WARNING, UNRECOGNIZED_NAME, [ 1; 112 ]); 106 - ] 107 - 108 - let alert_tests = 109 - List.mapi 110 - (fun i f -> "Assemble alert " ^ string_of_int i >:: alert_assembler f) 111 - alert_assembler_tests 112 - 113 - let ccs_test _ = 114 - let buf = Writer.assemble_change_cipher_spec in 115 - assert_cs_eq buf (list_to_cstruct [ 1 ]) 116 - 117 - let dh_assembler (p, res) _ = 118 - let buf = Writer.assemble_dh_parameters p in 119 - assert_cs_eq buf res 120 - 121 - let dh_assembler_tests = 122 - let a = 123 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 124 - in 125 - let le = list_to_cstruct [ 0; 16 ] in 126 - let le2 = list_to_cstruct [ 0; 32 ] in 127 - let emp, empl = (list_to_cstruct [], list_to_cstruct [ 0; 0 ]) in 128 - Core. 129 - [ 130 - ({ dh_p = a; dh_g = a; dh_Ys = a }, le ^ a ^ le ^ a ^ le ^ a); 131 - ( { dh_p = a ^ a; dh_g = a; dh_Ys = a ^ a }, 132 - le2 ^ a ^ a ^ le ^ a ^ le2 ^ a ^ a ); 133 - ({ dh_p = emp; dh_g = emp; dh_Ys = emp }, empl ^ empl ^ empl); 134 - ({ dh_p = a; dh_g = emp; dh_Ys = emp }, le ^ a ^ empl ^ empl); 135 - ({ dh_p = emp; dh_g = a; dh_Ys = emp }, empl ^ le ^ a ^ empl); 136 - ({ dh_p = emp; dh_g = emp; dh_Ys = a }, empl ^ empl ^ le ^ a); 137 - ({ dh_p = emp; dh_g = a; dh_Ys = a }, empl ^ le ^ a ^ le ^ a); 138 - ({ dh_p = a; dh_g = a; dh_Ys = emp }, le ^ a ^ le ^ a ^ empl); 139 - ({ dh_p = a; dh_g = emp; dh_Ys = a }, le ^ a ^ empl ^ le ^ a); 140 - ] 141 - 142 - let dh_tests = 143 - List.mapi 144 - (fun i f -> "Assemble dh parameters " ^ string_of_int i >:: dh_assembler f) 145 - dh_assembler_tests 146 - 147 - let ds_assembler (p, res) _ = 148 - let buf = Writer.assemble_digitally_signed p in 149 - assert_cs_eq buf res 150 - 151 - let ds_assembler_tests = 152 - let a = 153 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 154 - in 155 - let le = list_to_cstruct [ 0; 16 ] in 156 - let le2 = list_to_cstruct [ 0; 32 ] in 157 - let emp, empl = (list_to_cstruct [], list_to_cstruct [ 0; 0 ]) in 158 - [ (a, le ^ a); (a ^ a, le2 ^ a ^ a); (emp, empl) ] 159 - 160 - let ds_tests = 161 - List.mapi 162 - (fun i f -> 163 - "Assemble digitally signed " ^ string_of_int i >:: ds_assembler f) 164 - ds_assembler_tests 165 - 166 - let ds_1_2_assembler (sigalg, p, res) _ = 167 - let buf = Writer.assemble_digitally_signed_1_2 sigalg p in 168 - assert_cs_eq buf res 169 - 170 - let ds_1_2_assembler_tests = 171 - let a = 172 - list_to_cstruct [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] 173 - in 174 - let le = list_to_cstruct [ 0; 16 ] in 175 - let le2 = list_to_cstruct [ 0; 32 ] in 176 - let emp, empl = (list_to_cstruct [], list_to_cstruct [ 0; 0 ]) in 177 - [ 178 - (`RSA_PKCS1_MD5, a, list_to_cstruct [ 1; 1 ] ^ le ^ a); 179 - (`RSA_PKCS1_SHA1, a ^ a, list_to_cstruct [ 2; 1 ] ^ le2 ^ a ^ a); 180 - (`RSA_PSS_RSAENC_SHA256, emp, list_to_cstruct [ 8; 4 ] ^ empl); 181 - ] 182 - 183 - let ds_1_2_tests = 184 - List.mapi 185 - (fun i f -> 186 - "Assemble digitally signed 1.2 " ^ string_of_int i >:: ds_1_2_assembler f) 187 - ds_1_2_assembler_tests 188 - 189 - let handshake_assembler (h, res) _ = 190 - let res' = list_to_cstruct res in 191 - let buf = Writer.assemble_handshake h in 192 - assert_cs_eq buf res' 193 - 194 - let handshake_assembler_tests = 195 - let a_l = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15 ] in 196 - let a_cs = list_to_cstruct a_l in 197 - let le = [ 0; 0; 16 ] in 198 - let le2 = [ 0; 0; 32 ] in 199 - let emp, empl = (list_to_cstruct [], [ 0; 0; 0 ]) in 200 - Core. 201 - [ 202 - (HelloRequest, [ 0; 0; 0; 0 ]); 203 - (ServerHelloDone, [ 14; 0; 0; 0 ]); 204 - (Finished a_cs, [ 20 ] @ le @ a_l); 205 - (Finished emp, [ 20 ] @ empl); 206 - (Finished (a_cs ^ a_cs), [ 20 ] @ le2 @ a_l @ a_l); 207 - (ClientKeyExchange emp, [ 16; 0; 0; 0 ]); 208 - (ClientKeyExchange a_cs, [ 16; 0; 0; 16 ] @ a_l); 209 - (ClientKeyExchange (a_cs ^ a_cs), [ 16; 0; 0; 32 ] @ a_l @ a_l); 210 - (ServerKeyExchange emp, [ 12 ] @ empl); 211 - (ServerKeyExchange a_cs, [ 12 ] @ le @ a_l); 212 - (ServerKeyExchange (a_cs ^ a_cs), [ 12 ] @ le2 @ a_l @ a_l); 213 - (Certificate (Writer.assemble_certificates []), [ 11; 0; 0; 3; 0; 0; 0 ]); 214 - ( Certificate (Writer.assemble_certificates [ emp ]), 215 - [ 11; 0; 0; 6; 0; 0; 3; 0; 0; 0 ] ); 216 - ( Certificate (Writer.assemble_certificates [ emp; emp ]), 217 - [ 11; 0; 0; 9; 0; 0; 6; 0; 0; 0; 0; 0; 0 ] ); 218 - ( Certificate (Writer.assemble_certificates [ a_cs ]), 219 - [ 11; 0; 0; 22; 0; 0; 19 ] @ le @ a_l ); 220 - ( Certificate (Writer.assemble_certificates [ a_cs; emp ]), 221 - [ 11; 0; 0; 25; 0; 0; 22 ] @ le @ a_l @ [ 0; 0; 0 ] ); 222 - ( Certificate (Writer.assemble_certificates [ emp; a_cs ]), 223 - [ 11; 0; 0; 25; 0; 0; 22; 0; 0; 0 ] @ le @ a_l ); 224 - ( Certificate (Writer.assemble_certificates [ emp; a_cs; emp ]), 225 - [ 11; 0; 0; 28; 0; 0; 25; 0; 0; 0 ] @ le @ a_l @ [ 0; 0; 0 ] ); 226 - ( Certificate (Writer.assemble_certificates [ a_cs; emp; a_cs ]), 227 - [ 11; 0; 0; 44; 0; 0; 41 ] @ le @ a_l @ [ 0; 0; 0 ] @ le @ a_l ); 228 - ( Certificate (Writer.assemble_certificates [ a_cs; emp; a_cs; emp ]), 229 - [ 11; 0; 0; 47; 0; 0; 44 ] @ le @ a_l @ [ 0; 0; 0 ] @ le @ a_l 230 - @ [ 0; 0; 0 ] ); 231 - ( ClientHello 232 - { 233 - client_version = `TLS_1_2; 234 - client_random = a_cs ^ a_cs; 235 - sessionid = None; 236 - ciphersuites = []; 237 - extensions = []; 238 - }, 239 - [ 1; 0; 0; 39; 3; 3 ] @ a_l @ a_l @ [ 0; 0; 0; 1; 0 ] ); 240 - ( ClientHello 241 - { 242 - client_version = `TLS_1_1; 243 - client_random = a_cs ^ a_cs; 244 - sessionid = None; 245 - ciphersuites = []; 246 - extensions = []; 247 - }, 248 - [ 1; 0; 0; 39; 3; 2 ] @ a_l @ a_l @ [ 0; 0; 0; 1; 0 ] ); 249 - ( ClientHello 250 - { 251 - client_version = `TLS_1_0; 252 - client_random = a_cs ^ a_cs; 253 - sessionid = None; 254 - ciphersuites = []; 255 - extensions = []; 256 - }, 257 - [ 1; 0; 0; 39; 3; 1 ] @ a_l @ a_l @ [ 0; 0; 0; 1; 0 ] ); 258 - ( ClientHello 259 - { 260 - client_version = `TLS_1_2; 261 - client_random = a_cs ^ a_cs; 262 - sessionid = None; 263 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 264 - extensions = []; 265 - }, 266 - [ 1; 0; 0; 41; 3; 3 ] @ a_l @ a_l @ [ 0; 0; 2; 0; 0x0a; 1; 0 ] ); 267 - ( ClientHello 268 - { 269 - client_version = `TLS_1_2; 270 - client_random = a_cs ^ a_cs; 271 - sessionid = None; 272 - ciphersuites = 273 - Packet. 274 - [ 275 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 276 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 277 - TLS_RSA_WITH_AES_128_CBC_SHA; 278 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA; 279 - ]; 280 - extensions = []; 281 - }, 282 - [ 1; 0; 0; 47; 3; 3 ] @ a_l @ a_l 283 - @ [ 0; 0; 8; 0; 0x0A; 0; 0x16; 0; 0x2F; 0; 0x33; 1; 0 ] ); 284 - ( ClientHello 285 - { 286 - client_version = `TLS_1_2; 287 - client_random = a_cs ^ a_cs; 288 - sessionid = None; 289 - ciphersuites = 290 - Packet. 291 - [ 292 - TLS_RSA_WITH_3DES_EDE_CBC_SHA; 293 - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA; 294 - TLS_RSA_WITH_AES_128_CBC_SHA; 295 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA; 296 - ]; 297 - extensions = 298 - [ 299 - `SignatureAlgorithms 300 - [ 301 - `RSA_PKCS1_SHA512; 302 - `RSA_PKCS1_SHA384; 303 - `RSA_PKCS1_SHA256; 304 - `RSA_PKCS1_SHA224; 305 - `RSA_PKCS1_SHA1; 306 - ]; 307 - ]; 308 - }, 309 - [ 1; 0; 0; 65; 3; 3 ] @ a_l @ a_l 310 - @ [ 311 - 0; 312 - 0; 313 - 8; 314 - 0; 315 - 0x0A; 316 - 0; 317 - 0x16; 318 - 0; 319 - 0x2F; 320 - 0; 321 - 0x33; 322 - 1; 323 - 0; 324 - 0; 325 - 0x10; 326 - 0x00; 327 - 0x0d; 328 - 0x00; 329 - 0x0c; 330 - (* signature algorithms *) 331 - 0x00; 332 - 0x0a; 333 - 0x06; 334 - 0x01; 335 - 0x05; 336 - 0x01; 337 - 0x04; 338 - 0x01; 339 - 0x03; 340 - 0x01; 341 - 0x02; 342 - 0x01; 343 - ] ); 344 - ( ClientHello 345 - { 346 - client_version = `TLS_1_2; 347 - client_random = a_cs ^ a_cs; 348 - sessionid = None; 349 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 350 - extensions = [ `ALPN [ "h2"; "http/1.1" ] ]; 351 - }, 352 - [ 1; 0; 0; 61; 3; 3 ] @ a_l @ a_l 353 - @ [ 354 - 0; 355 - 0; 356 - 2; 357 - 0; 358 - 0x0A; 359 - 1; 360 - 0; 361 - 0; 362 - 18; 363 - 0; 364 - 16; 365 - 0; 366 - 14; 367 - 0; 368 - 12; 369 - 2; 370 - 104; 371 - 50; 372 - 8; 373 - 104; 374 - 116; 375 - 116; 376 - 112; 377 - 47; 378 - 49; 379 - 46; 380 - 49; 381 - ] ); 382 - ( ClientHello 383 - { 384 - client_version = `TLS_1_2; 385 - client_random = a_cs ^ a_cs; 386 - sessionid = None; 387 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 388 - extensions = [ make_hostname_ext "foo" ]; 389 - }, 390 - [ 1; 0; 0; 55; 3; 3 ] @ a_l @ a_l 391 - @ [ 392 - 0; 393 - 0; 394 - 2; 395 - 0; 396 - 0x0A; 397 - 1; 398 - 0; 399 - 0; 400 - 12; 401 - 0; 402 - 0; 403 - 0; 404 - 8; 405 - 0; 406 - 6; 407 - 0; 408 - 0; 409 - 3; 410 - 102; 411 - 111; 412 - 111; 413 - ] ); 414 - ( ClientHello 415 - { 416 - client_version = `TLS_1_2; 417 - client_random = a_cs ^ a_cs; 418 - sessionid = None; 419 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 420 - extensions = [ make_hostname_ext "foofoofoofoofoofoofoofoofoofoo" ]; 421 - }, 422 - [ 1; 0; 0; 82; 3; 3 ] @ a_l @ a_l 423 - @ [ 424 - 0; 425 - 0; 426 - 2; 427 - 0; 428 - 0x0A; 429 - 1; 430 - 0; 431 - 0; 432 - 39; 433 - 0; 434 - 0; 435 - 0; 436 - 35; 437 - 0; 438 - 33; 439 - 0; 440 - 0; 441 - 30; 442 - 102; 443 - 111; 444 - 111; 445 - 102; 446 - 111; 447 - 111; 448 - 102; 449 - 111; 450 - 111; 451 - 102; 452 - 111; 453 - 111; 454 - 102; 455 - 111; 456 - 111; 457 - 102; 458 - 111; 459 - 111; 460 - 102; 461 - 111; 462 - 111; 463 - 102; 464 - 111; 465 - 111; 466 - 102; 467 - 111; 468 - 111; 469 - 102; 470 - 111; 471 - 111; 472 - ] ); 473 - ( ClientHello 474 - { 475 - client_version = `TLS_1_2; 476 - client_random = a_cs ^ a_cs; 477 - sessionid = None; 478 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 479 - extensions = 480 - [ 481 - make_hostname_ext 482 - "foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoof"; 483 - ]; 484 - }, 485 - [ 1; 0; 0; 232; 3; 3 ] @ a_l @ a_l 486 - @ [ 487 - 0; 488 - 0; 489 - 2; 490 - 0; 491 - 0x0A; 492 - 1; 493 - 0; 494 - 0; 495 - 189; 496 - 0; 497 - 0; 498 - 0; 499 - 185; 500 - 0; 501 - 183; 502 - 0; 503 - 0; 504 - 180; 505 - 102; 506 - 111; 507 - 111; 508 - 102; 509 - 111; 510 - 111; 511 - 102; 512 - 111; 513 - 111; 514 - 102; 515 - 111; 516 - 111; 517 - 102; 518 - 111; 519 - 111; 520 - 102; 521 - 111; 522 - 111; 523 - 102; 524 - 111; 525 - 111; 526 - 102; 527 - 111; 528 - 111; 529 - 102; 530 - 111; 531 - 111; 532 - 102; 533 - 111; 534 - 111; 535 - 102; 536 - 111; 537 - 111; 538 - 102; 539 - 111; 540 - 111; 541 - 102; 542 - 111; 543 - 111; 544 - 102; 545 - 111; 546 - 111; 547 - 102; 548 - 111; 549 - 111; 550 - 102; 551 - 111; 552 - 111; 553 - 102; 554 - 111; 555 - 111; 556 - 102; 557 - 111; 558 - 111; 559 - 102; 560 - 111; 561 - 111; 562 - 102; 563 - 111; 564 - 111; 565 - 46; 566 - 102; 567 - 111; 568 - 111; 569 - 102; 570 - 111; 571 - 111; 572 - 102; 573 - 111; 574 - 111; 575 - 102; 576 - 111; 577 - 111; 578 - 102; 579 - 111; 580 - 111; 581 - 102; 582 - 111; 583 - 111; 584 - 102; 585 - 111; 586 - 111; 587 - 102; 588 - 111; 589 - 111; 590 - 102; 591 - 111; 592 - 111; 593 - 102; 594 - 111; 595 - 111; 596 - 102; 597 - 111; 598 - 111; 599 - 102; 600 - 111; 601 - 111; 602 - 102; 603 - 111; 604 - 111; 605 - 102; 606 - 111; 607 - 111; 608 - 102; 609 - 111; 610 - 111; 611 - 102; 612 - 111; 613 - 111; 614 - 102; 615 - 111; 616 - 111; 617 - 102; 618 - 111; 619 - 111; 620 - 102; 621 - 111; 622 - 111; 623 - 102; 624 - 111; 625 - 111; 626 - 46; 627 - 102; 628 - 111; 629 - 111; 630 - 102; 631 - 111; 632 - 111; 633 - 102; 634 - 111; 635 - 111; 636 - 102; 637 - 111; 638 - 111; 639 - 102; 640 - 111; 641 - 111; 642 - 102; 643 - 111; 644 - 111; 645 - 102; 646 - 111; 647 - 111; 648 - 102; 649 - 111; 650 - 111; 651 - 102; 652 - 111; 653 - 111; 654 - 102; 655 - 111; 656 - 111; 657 - 102; 658 - 111; 659 - 111; 660 - 102; 661 - 111; 662 - 111; 663 - 102; 664 - 111; 665 - 111; 666 - 102; 667 - 111; 668 - 111; 669 - 102; 670 - 111; 671 - 111; 672 - 102; 673 - 111; 674 - 111; 675 - 102; 676 - 111; 677 - 111; 678 - 102; 679 - 111; 680 - 111; 681 - 102; 682 - 111; 683 - 111; 684 - 102; 685 - ] ); 686 - (* this one is the smallest which needs extra padding 687 - (due to its size being > 256 and < 511) *) 688 - ( ClientHello 689 - { 690 - client_version = `TLS_1_2; 691 - client_random = a_cs ^ a_cs; 692 - sessionid = None; 693 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 694 - extensions = 695 - [ 696 - make_hostname_ext 697 - "foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofo"; 698 - ]; 699 - }, 700 - [ 1; 0; 1; 0xFC; 3; 3 ] @ a_l @ a_l 701 - @ [ 702 - 0; 703 - 0; 704 - 2; 705 - 0; 706 - 0x0A; 707 - 1; 708 - 0; 709 - 1; 710 - 0xD1; 711 - 0; 712 - 0; 713 - 0; 714 - 0xD0; 715 - 0; 716 - 0xCE; 717 - 0; 718 - 0; 719 - 0xCB; 720 - 102; 721 - 111; 722 - 111; 723 - 102; 724 - 111; 725 - 111; 726 - 102; 727 - 111; 728 - 111; 729 - 102; 730 - 111; 731 - 111; 732 - 102; 733 - 111; 734 - 111; 735 - 102; 736 - 111; 737 - 111; 738 - 102; 739 - 111; 740 - 111; 741 - 102; 742 - 111; 743 - 111; 744 - 102; 745 - 111; 746 - 111; 747 - 102; 748 - 111; 749 - 111; 750 - 102; 751 - 111; 752 - 111; 753 - 102; 754 - 111; 755 - 111; 756 - 102; 757 - 111; 758 - 111; 759 - 102; 760 - 111; 761 - 111; 762 - 102; 763 - 111; 764 - 111; 765 - 102; 766 - 111; 767 - 111; 768 - 102; 769 - 111; 770 - 111; 771 - 102; 772 - 111; 773 - 111; 774 - 102; 775 - 111; 776 - 111; 777 - 102; 778 - 111; 779 - 111; 780 - 46; 781 - 102; 782 - 111; 783 - 111; 784 - 102; 785 - 111; 786 - 111; 787 - 102; 788 - 111; 789 - 111; 790 - 102; 791 - 111; 792 - 111; 793 - 102; 794 - 111; 795 - 111; 796 - 102; 797 - 111; 798 - 111; 799 - 102; 800 - 111; 801 - 111; 802 - 102; 803 - 111; 804 - 111; 805 - 102; 806 - 111; 807 - 111; 808 - 102; 809 - 111; 810 - 111; 811 - 102; 812 - 111; 813 - 111; 814 - 102; 815 - 111; 816 - 111; 817 - 102; 818 - 111; 819 - 111; 820 - 102; 821 - 111; 822 - 111; 823 - 102; 824 - 111; 825 - 111; 826 - 102; 827 - 111; 828 - 111; 829 - 102; 830 - 111; 831 - 111; 832 - 102; 833 - 111; 834 - 111; 835 - 102; 836 - 111; 837 - 111; 838 - 102; 839 - 111; 840 - 111; 841 - 46; 842 - 102; 843 - 111; 844 - 111; 845 - 102; 846 - 111; 847 - 111; 848 - 102; 849 - 111; 850 - 111; 851 - 102; 852 - 111; 853 - 111; 854 - 102; 855 - 111; 856 - 111; 857 - 102; 858 - 111; 859 - 111; 860 - 102; 861 - 111; 862 - 111; 863 - 102; 864 - 111; 865 - 111; 866 - 102; 867 - 111; 868 - 111; 869 - 102; 870 - 111; 871 - 111; 872 - 102; 873 - 111; 874 - 111; 875 - 102; 876 - 111; 877 - 111; 878 - 102; 879 - 111; 880 - 111; 881 - 102; 882 - 111; 883 - 111; 884 - 102; 885 - 111; 886 - 111; 887 - 102; 888 - 111; 889 - 111; 890 - 102; 891 - 111; 892 - 111; 893 - 102; 894 - 111; 895 - 111; 896 - 102; 897 - 111; 898 - 111; 899 - 102; 900 - 111; 901 - 111; 902 - 46; 903 - 102; 904 - 111; 905 - 111; 906 - 102; 907 - 111; 908 - 111; 909 - 102; 910 - 111; 911 - 111; 912 - 102; 913 - 111; 914 - 111; 915 - 102; 916 - 111; 917 - 111; 918 - 102; 919 - 111; 920 - 111; 921 - 102; 922 - 111; 923 - 0; 924 - 21; 925 - 0; 926 - 0xF9; 927 - 0; 928 - 0; 929 - 0; 930 - 0; 931 - 0; 932 - 0; 933 - 0; 934 - 0; 935 - 0; 936 - 0; 937 - 0; 938 - 0; 939 - 0; 940 - 0; 941 - 0; 942 - 0; 943 - 0; 944 - 0; 945 - 0; 946 - 0; 947 - 0; 948 - 0; 949 - 0; 950 - 0; 951 - 0; 952 - 0; 953 - 0; 954 - 0; 955 - 0; 956 - 0; 957 - 0; 958 - 0; 959 - 0; 960 - 0; 961 - 0; 962 - 0; 963 - 0; 964 - 0; 965 - 0; 966 - 0; 967 - 0; 968 - 0; 969 - 0; 970 - 0; 971 - 0; 972 - 0; 973 - 0; 974 - 0; 975 - 0; 976 - 0; 977 - 0; 978 - 0; 979 - 0; 980 - 0; 981 - 0; 982 - 0; 983 - 0; 984 - 0; 985 - 0; 986 - 0; 987 - 0; 988 - 0; 989 - 0; 990 - 0; 991 - 0; 992 - 0; 993 - 0; 994 - 0; 995 - 0; 996 - 0; 997 - 0; 998 - 0; 999 - 0; 1000 - 0; 1001 - 0; 1002 - 0; 1003 - 0; 1004 - 0; 1005 - 0; 1006 - 0; 1007 - 0; 1008 - 0; 1009 - 0; 1010 - 0; 1011 - 0; 1012 - 0; 1013 - 0; 1014 - 0; 1015 - 0; 1016 - 0; 1017 - 0; 1018 - 0; 1019 - 0; 1020 - 0; 1021 - 0; 1022 - 0; 1023 - 0; 1024 - 0; 1025 - 0; 1026 - 0; 1027 - 0; 1028 - 0; 1029 - 0; 1030 - 0; 1031 - 0; 1032 - 0; 1033 - 0; 1034 - 0; 1035 - 0; 1036 - 0; 1037 - 0; 1038 - 0; 1039 - 0; 1040 - 0; 1041 - 0; 1042 - 0; 1043 - 0; 1044 - 0; 1045 - 0; 1046 - 0; 1047 - 0; 1048 - 0; 1049 - 0; 1050 - 0; 1051 - 0; 1052 - 0; 1053 - 0; 1054 - 0; 1055 - 0; 1056 - 0; 1057 - 0; 1058 - 0; 1059 - 0; 1060 - 0; 1061 - 0; 1062 - 0; 1063 - 0; 1064 - 0; 1065 - 0; 1066 - 0; 1067 - 0; 1068 - 0; 1069 - 0; 1070 - 0; 1071 - 0; 1072 - 0; 1073 - 0; 1074 - 0; 1075 - 0; 1076 - 0; 1077 - 0; 1078 - 0; 1079 - 0; 1080 - 0; 1081 - 0; 1082 - 0; 1083 - 0; 1084 - 0; 1085 - 0; 1086 - 0; 1087 - 0; 1088 - 0; 1089 - 0; 1090 - 0; 1091 - 0; 1092 - 0; 1093 - 0; 1094 - 0; 1095 - 0; 1096 - 0; 1097 - 0; 1098 - 0; 1099 - 0; 1100 - 0; 1101 - 0; 1102 - 0; 1103 - 0; 1104 - 0; 1105 - 0; 1106 - 0; 1107 - 0; 1108 - 0; 1109 - 0; 1110 - 0; 1111 - 0; 1112 - 0; 1113 - 0; 1114 - 0; 1115 - 0; 1116 - 0; 1117 - 0; 1118 - 0; 1119 - 0; 1120 - 0; 1121 - 0; 1122 - 0; 1123 - 0; 1124 - 0; 1125 - 0; 1126 - 0; 1127 - 0; 1128 - 0; 1129 - 0; 1130 - 0; 1131 - 0; 1132 - 0; 1133 - 0; 1134 - 0; 1135 - 0; 1136 - 0; 1137 - 0; 1138 - 0; 1139 - 0; 1140 - 0; 1141 - 0; 1142 - 0; 1143 - 0; 1144 - 0; 1145 - 0; 1146 - 0; 1147 - 0; 1148 - 0; 1149 - 0; 1150 - 0; 1151 - 0; 1152 - 0; 1153 - 0; 1154 - 0; 1155 - 0; 1156 - 0; 1157 - 0; 1158 - 0; 1159 - 0; 1160 - 0; 1161 - 0; 1162 - 0; 1163 - 0; 1164 - 0; 1165 - 0; 1166 - 0; 1167 - 0; 1168 - 0; 1169 - 0; 1170 - 0; 1171 - 0; 1172 - 0; 1173 - 0; 1174 - 0; 1175 - 0; 1176 - ] ); 1177 - (* this one is the biggest which needs no extra padding *) 1178 - ( ClientHello 1179 - { 1180 - client_version = `TLS_1_2; 1181 - client_random = a_cs ^ a_cs; 1182 - sessionid = None; 1183 - ciphersuites = [ Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA ]; 1184 - extensions = 1185 - [ 1186 - make_hostname_ext 1187 - "foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo.foofoofoofoofoof"; 1188 - ]; 1189 - }, 1190 - [ 1; 0; 0; 251; 3; 3 ] @ a_l @ a_l 1191 - @ [ 1192 - 0; 1193 - 0; 1194 - 2; 1195 - 0; 1196 - 0x0A; 1197 - 1; 1198 - 0; 1199 - 0; 1200 - 208; 1201 - 0; 1202 - 0; 1203 - 0; 1204 - 204; 1205 - 0; 1206 - 202; 1207 - 0; 1208 - 0; 1209 - 199; 1210 - 102; 1211 - 111; 1212 - 111; 1213 - 102; 1214 - 111; 1215 - 111; 1216 - 102; 1217 - 111; 1218 - 111; 1219 - 102; 1220 - 111; 1221 - 111; 1222 - 102; 1223 - 111; 1224 - 111; 1225 - 102; 1226 - 111; 1227 - 111; 1228 - 102; 1229 - 111; 1230 - 111; 1231 - 102; 1232 - 111; 1233 - 111; 1234 - 102; 1235 - 111; 1236 - 111; 1237 - 102; 1238 - 111; 1239 - 111; 1240 - 102; 1241 - 111; 1242 - 111; 1243 - 102; 1244 - 111; 1245 - 111; 1246 - 102; 1247 - 111; 1248 - 111; 1249 - 102; 1250 - 111; 1251 - 111; 1252 - 102; 1253 - 111; 1254 - 111; 1255 - 102; 1256 - 111; 1257 - 111; 1258 - 102; 1259 - 111; 1260 - 111; 1261 - 102; 1262 - 111; 1263 - 111; 1264 - 102; 1265 - 111; 1266 - 111; 1267 - 102; 1268 - 111; 1269 - 111; 1270 - 46; 1271 - 102; 1272 - 111; 1273 - 111; 1274 - 102; 1275 - 111; 1276 - 111; 1277 - 102; 1278 - 111; 1279 - 111; 1280 - 102; 1281 - 111; 1282 - 111; 1283 - 102; 1284 - 111; 1285 - 111; 1286 - 102; 1287 - 111; 1288 - 111; 1289 - 102; 1290 - 111; 1291 - 111; 1292 - 102; 1293 - 111; 1294 - 111; 1295 - 102; 1296 - 111; 1297 - 111; 1298 - 102; 1299 - 111; 1300 - 111; 1301 - 102; 1302 - 111; 1303 - 111; 1304 - 102; 1305 - 111; 1306 - 111; 1307 - 102; 1308 - 111; 1309 - 111; 1310 - 102; 1311 - 111; 1312 - 111; 1313 - 102; 1314 - 111; 1315 - 111; 1316 - 102; 1317 - 111; 1318 - 111; 1319 - 102; 1320 - 111; 1321 - 111; 1322 - 102; 1323 - 111; 1324 - 111; 1325 - 102; 1326 - 111; 1327 - 111; 1328 - 102; 1329 - 111; 1330 - 111; 1331 - 46; 1332 - 102; 1333 - 111; 1334 - 111; 1335 - 102; 1336 - 111; 1337 - 111; 1338 - 102; 1339 - 111; 1340 - 111; 1341 - 102; 1342 - 111; 1343 - 111; 1344 - 102; 1345 - 111; 1346 - 111; 1347 - 102; 1348 - 111; 1349 - 111; 1350 - 102; 1351 - 111; 1352 - 111; 1353 - 102; 1354 - 111; 1355 - 111; 1356 - 102; 1357 - 111; 1358 - 111; 1359 - 102; 1360 - 111; 1361 - 111; 1362 - 102; 1363 - 111; 1364 - 111; 1365 - 102; 1366 - 111; 1367 - 111; 1368 - 102; 1369 - 111; 1370 - 111; 1371 - 102; 1372 - 111; 1373 - 111; 1374 - 102; 1375 - 111; 1376 - 111; 1377 - 102; 1378 - 111; 1379 - 111; 1380 - 102; 1381 - 111; 1382 - 111; 1383 - 102; 1384 - 111; 1385 - 111; 1386 - 102; 1387 - 111; 1388 - 111; 1389 - 102; 1390 - 111; 1391 - 111; 1392 - 46; 1393 - 102; 1394 - 111; 1395 - 111; 1396 - 102; 1397 - 111; 1398 - 111; 1399 - 102; 1400 - 111; 1401 - 111; 1402 - 102; 1403 - 111; 1404 - 111; 1405 - 102; 1406 - 111; 1407 - 111; 1408 - 102; 1409 - ] ); 1410 - (* this one is the biggest which needs no extra padding, and no exts *) 1411 - ( ClientHello 1412 - { 1413 - client_version = `TLS_1_2; 1414 - client_random = a_cs ^ a_cs; 1415 - sessionid = None; 1416 - ciphersuites = 1417 - [ 1418 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1419 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1420 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1421 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1422 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1423 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1424 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1425 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1426 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1427 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1428 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1429 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1430 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1431 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1432 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1433 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1434 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1435 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1436 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1437 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1438 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1439 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1440 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1441 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1442 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1443 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1444 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1445 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1446 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1447 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1448 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1449 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1450 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1451 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1452 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1453 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1454 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1455 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1456 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1457 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1458 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1459 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1460 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1461 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1462 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1463 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1464 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1465 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1466 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1467 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1468 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1469 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1470 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1471 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1472 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1473 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1474 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1475 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1476 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1477 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1478 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1479 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1480 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1481 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1482 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1483 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1484 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1485 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1486 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1487 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1488 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1489 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1490 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1491 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1492 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1493 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1494 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1495 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1496 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1497 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1498 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1499 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1500 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1501 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1502 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1503 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1504 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1505 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1506 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1507 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1508 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1509 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1510 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1511 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1512 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1513 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1514 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1515 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1516 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1517 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1518 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1519 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1520 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1521 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1522 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1523 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1524 - ]; 1525 - extensions = []; 1526 - }, 1527 - [ 1; 0; 0; 251; 3; 3 ] @ a_l @ a_l 1528 - @ [ 1529 - 0; 1530 - 0; 1531 - 212; 1532 - 0; 1533 - 0x0A; 1534 - 0; 1535 - 0x0A; 1536 - 0; 1537 - 0x0A; 1538 - 0; 1539 - 0x0A; 1540 - 0; 1541 - 0x0A; 1542 - 0; 1543 - 0x0A; 1544 - 0; 1545 - 0x0A; 1546 - 0; 1547 - 0x0A; 1548 - 0; 1549 - 0x0A; 1550 - 0; 1551 - 0x0A; 1552 - 0; 1553 - 0x0A; 1554 - 0; 1555 - 0x0A; 1556 - 0; 1557 - 0x0A; 1558 - 0; 1559 - 0x0A; 1560 - 0; 1561 - 0x0A; 1562 - 0; 1563 - 0x0A; 1564 - 0; 1565 - 0x0A; 1566 - 0; 1567 - 0x0A; 1568 - 0; 1569 - 0x0A; 1570 - 0; 1571 - 0x0A; 1572 - 0; 1573 - 0x0A; 1574 - 0; 1575 - 0x0A; 1576 - 0; 1577 - 0x0A; 1578 - 0; 1579 - 0x0A; 1580 - 0; 1581 - 0x0A; 1582 - 0; 1583 - 0x0A; 1584 - 0; 1585 - 0x0A; 1586 - 0; 1587 - 0x0A; 1588 - 0; 1589 - 0x0A; 1590 - 0; 1591 - 0x0A; 1592 - 0; 1593 - 0x0A; 1594 - 0; 1595 - 0x0A; 1596 - 0; 1597 - 0x0A; 1598 - 0; 1599 - 0x0A; 1600 - 0; 1601 - 0x0A; 1602 - 0; 1603 - 0x0A; 1604 - 0; 1605 - 0x0A; 1606 - 0; 1607 - 0x0A; 1608 - 0; 1609 - 0x0A; 1610 - 0; 1611 - 0x0A; 1612 - 0; 1613 - 0x0A; 1614 - 0; 1615 - 0x0A; 1616 - 0; 1617 - 0x0A; 1618 - 0; 1619 - 0x0A; 1620 - 0; 1621 - 0x0A; 1622 - 0; 1623 - 0x0A; 1624 - 0; 1625 - 0x0A; 1626 - 0; 1627 - 0x0A; 1628 - 0; 1629 - 0x0A; 1630 - 0; 1631 - 0x0A; 1632 - 0; 1633 - 0x0A; 1634 - 0; 1635 - 0x0A; 1636 - 0; 1637 - 0x0A; 1638 - 0; 1639 - 0x0A; 1640 - 0; 1641 - 0x0A; 1642 - 0; 1643 - 0x0A; 1644 - 0; 1645 - 0x0A; 1646 - 0; 1647 - 0x0A; 1648 - 0; 1649 - 0x0A; 1650 - 0; 1651 - 0x0A; 1652 - 0; 1653 - 0x0A; 1654 - 0; 1655 - 0x0A; 1656 - 0; 1657 - 0x0A; 1658 - 0; 1659 - 0x0A; 1660 - 0; 1661 - 0x0A; 1662 - 0; 1663 - 0x0A; 1664 - 0; 1665 - 0x0A; 1666 - 0; 1667 - 0x0A; 1668 - 0; 1669 - 0x0A; 1670 - 0; 1671 - 0x0A; 1672 - 0; 1673 - 0x0A; 1674 - 0; 1675 - 0x0A; 1676 - 0; 1677 - 0x0A; 1678 - 0; 1679 - 0x0A; 1680 - 0; 1681 - 0x0A; 1682 - 0; 1683 - 0x0A; 1684 - 0; 1685 - 0x0A; 1686 - 0; 1687 - 0x0A; 1688 - 0; 1689 - 0x0A; 1690 - 0; 1691 - 0x0A; 1692 - 0; 1693 - 0x0A; 1694 - 0; 1695 - 0x0A; 1696 - 0; 1697 - 0x0A; 1698 - 0; 1699 - 0x0A; 1700 - 0; 1701 - 0x0A; 1702 - 0; 1703 - 0x0A; 1704 - 0; 1705 - 0x0A; 1706 - 0; 1707 - 0x0A; 1708 - 0; 1709 - 0x0A; 1710 - 0; 1711 - 0x0A; 1712 - 0; 1713 - 0x0A; 1714 - 0; 1715 - 0x0A; 1716 - 0; 1717 - 0x0A; 1718 - 0; 1719 - 0x0A; 1720 - 0; 1721 - 0x0A; 1722 - 0; 1723 - 0x0A; 1724 - 0; 1725 - 0x0A; 1726 - 0; 1727 - 0x0A; 1728 - 0; 1729 - 0x0A; 1730 - 0; 1731 - 0x0A; 1732 - 0; 1733 - 0x0A; 1734 - 0; 1735 - 0x0A; 1736 - 0; 1737 - 0x0A; 1738 - 0; 1739 - 0x0A; 1740 - 0; 1741 - 0x0A; 1742 - 0; 1743 - 0x0A; 1744 - 1; 1745 - 0; 1746 - ] ); 1747 - (* add one more, and we get into padding no exts *) 1748 - ( ClientHello 1749 - { 1750 - client_version = `TLS_1_2; 1751 - client_random = a_cs ^ a_cs; 1752 - sessionid = None; 1753 - ciphersuites = 1754 - [ 1755 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1756 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1757 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1758 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1759 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1760 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1761 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1762 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1763 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1764 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1765 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1766 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1767 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1768 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1769 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1770 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1771 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1772 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1773 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1774 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1775 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1776 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1777 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1778 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1779 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1780 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1781 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1782 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1783 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1784 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1785 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1786 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1787 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1788 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1789 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1790 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1791 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1792 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1793 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1794 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1795 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1796 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1797 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1798 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1799 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1800 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1801 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1802 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1803 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1804 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1805 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1806 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1807 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1808 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1809 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1810 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1811 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1812 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1813 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1814 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1815 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1816 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1817 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1818 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1819 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1820 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1821 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1822 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1823 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1824 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1825 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1826 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1827 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1828 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1829 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1830 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1831 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1832 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1833 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1834 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1835 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1836 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1837 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1838 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1839 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1840 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1841 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1842 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1843 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1844 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1845 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1846 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1847 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1848 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1849 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1850 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1851 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1852 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1853 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1854 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1855 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1856 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1857 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1858 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1859 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1860 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1861 - Packet.TLS_RSA_WITH_3DES_EDE_CBC_SHA; 1862 - ]; 1863 - extensions = []; 1864 - }, 1865 - [ 1; 0; 1; 0xFC; 3; 3 ] @ a_l @ a_l 1866 - @ [ 1867 - 0; 1868 - 0; 1869 - 214; 1870 - 0; 1871 - 0x0A; 1872 - 0; 1873 - 0x0A; 1874 - 0; 1875 - 0x0A; 1876 - 0; 1877 - 0x0A; 1878 - 0; 1879 - 0x0A; 1880 - 0; 1881 - 0x0A; 1882 - 0; 1883 - 0x0A; 1884 - 0; 1885 - 0x0A; 1886 - 0; 1887 - 0x0A; 1888 - 0; 1889 - 0x0A; 1890 - 0; 1891 - 0x0A; 1892 - 0; 1893 - 0x0A; 1894 - 0; 1895 - 0x0A; 1896 - 0; 1897 - 0x0A; 1898 - 0; 1899 - 0x0A; 1900 - 0; 1901 - 0x0A; 1902 - 0; 1903 - 0x0A; 1904 - 0; 1905 - 0x0A; 1906 - 0; 1907 - 0x0A; 1908 - 0; 1909 - 0x0A; 1910 - 0; 1911 - 0x0A; 1912 - 0; 1913 - 0x0A; 1914 - 0; 1915 - 0x0A; 1916 - 0; 1917 - 0x0A; 1918 - 0; 1919 - 0x0A; 1920 - 0; 1921 - 0x0A; 1922 - 0; 1923 - 0x0A; 1924 - 0; 1925 - 0x0A; 1926 - 0; 1927 - 0x0A; 1928 - 0; 1929 - 0x0A; 1930 - 0; 1931 - 0x0A; 1932 - 0; 1933 - 0x0A; 1934 - 0; 1935 - 0x0A; 1936 - 0; 1937 - 0x0A; 1938 - 0; 1939 - 0x0A; 1940 - 0; 1941 - 0x0A; 1942 - 0; 1943 - 0x0A; 1944 - 0; 1945 - 0x0A; 1946 - 0; 1947 - 0x0A; 1948 - 0; 1949 - 0x0A; 1950 - 0; 1951 - 0x0A; 1952 - 0; 1953 - 0x0A; 1954 - 0; 1955 - 0x0A; 1956 - 0; 1957 - 0x0A; 1958 - 0; 1959 - 0x0A; 1960 - 0; 1961 - 0x0A; 1962 - 0; 1963 - 0x0A; 1964 - 0; 1965 - 0x0A; 1966 - 0; 1967 - 0x0A; 1968 - 0; 1969 - 0x0A; 1970 - 0; 1971 - 0x0A; 1972 - 0; 1973 - 0x0A; 1974 - 0; 1975 - 0x0A; 1976 - 0; 1977 - 0x0A; 1978 - 0; 1979 - 0x0A; 1980 - 0; 1981 - 0x0A; 1982 - 0; 1983 - 0x0A; 1984 - 0; 1985 - 0x0A; 1986 - 0; 1987 - 0x0A; 1988 - 0; 1989 - 0x0A; 1990 - 0; 1991 - 0x0A; 1992 - 0; 1993 - 0x0A; 1994 - 0; 1995 - 0x0A; 1996 - 0; 1997 - 0x0A; 1998 - 0; 1999 - 0x0A; 2000 - 0; 2001 - 0x0A; 2002 - 0; 2003 - 0x0A; 2004 - 0; 2005 - 0x0A; 2006 - 0; 2007 - 0x0A; 2008 - 0; 2009 - 0x0A; 2010 - 0; 2011 - 0x0A; 2012 - 0; 2013 - 0x0A; 2014 - 0; 2015 - 0x0A; 2016 - 0; 2017 - 0x0A; 2018 - 0; 2019 - 0x0A; 2020 - 0; 2021 - 0x0A; 2022 - 0; 2023 - 0x0A; 2024 - 0; 2025 - 0x0A; 2026 - 0; 2027 - 0x0A; 2028 - 0; 2029 - 0x0A; 2030 - 0; 2031 - 0x0A; 2032 - 0; 2033 - 0x0A; 2034 - 0; 2035 - 0x0A; 2036 - 0; 2037 - 0x0A; 2038 - 0; 2039 - 0x0A; 2040 - 0; 2041 - 0x0A; 2042 - 0; 2043 - 0x0A; 2044 - 0; 2045 - 0x0A; 2046 - 0; 2047 - 0x0A; 2048 - 0; 2049 - 0x0A; 2050 - 0; 2051 - 0x0A; 2052 - 0; 2053 - 0x0A; 2054 - 0; 2055 - 0x0A; 2056 - 0; 2057 - 0x0A; 2058 - 0; 2059 - 0x0A; 2060 - 0; 2061 - 0x0A; 2062 - 0; 2063 - 0x0A; 2064 - 0; 2065 - 0x0A; 2066 - 0; 2067 - 0x0A; 2068 - 0; 2069 - 0x0A; 2070 - 0; 2071 - 0x0A; 2072 - 0; 2073 - 0x0A; 2074 - 0; 2075 - 0x0A; 2076 - 0; 2077 - 0x0A; 2078 - 0; 2079 - 0x0A; 2080 - 0; 2081 - 0x0A; 2082 - 0; 2083 - 0x0A; 2084 - 1; 2085 - 0; 2086 - 0; 2087 - 0xFD; 2088 - 0; 2089 - 0x15; 2090 - 0; 2091 - 0xF9; 2092 - 0; 2093 - 0; 2094 - 0; 2095 - 0; 2096 - 0; 2097 - 0; 2098 - 0; 2099 - 0; 2100 - 0; 2101 - 0; 2102 - 0; 2103 - 0; 2104 - 0; 2105 - 0; 2106 - 0; 2107 - 0; 2108 - 0; 2109 - 0; 2110 - 0; 2111 - 0; 2112 - 0; 2113 - 0; 2114 - 0; 2115 - 0; 2116 - 0; 2117 - 0; 2118 - 0; 2119 - 0; 2120 - 0; 2121 - 0; 2122 - 0; 2123 - 0; 2124 - 0; 2125 - 0; 2126 - 0; 2127 - 0; 2128 - 0; 2129 - 0; 2130 - 0; 2131 - 0; 2132 - 0; 2133 - 0; 2134 - 0; 2135 - 0; 2136 - 0; 2137 - 0; 2138 - 0; 2139 - 0; 2140 - 0; 2141 - 0; 2142 - 0; 2143 - 0; 2144 - 0; 2145 - 0; 2146 - 0; 2147 - 0; 2148 - 0; 2149 - 0; 2150 - 0; 2151 - 0; 2152 - 0; 2153 - 0; 2154 - 0; 2155 - 0; 2156 - 0; 2157 - 0; 2158 - 0; 2159 - 0; 2160 - 0; 2161 - 0; 2162 - 0; 2163 - 0; 2164 - 0; 2165 - 0; 2166 - 0; 2167 - 0; 2168 - 0; 2169 - 0; 2170 - 0; 2171 - 0; 2172 - 0; 2173 - 0; 2174 - 0; 2175 - 0; 2176 - 0; 2177 - 0; 2178 - 0; 2179 - 0; 2180 - 0; 2181 - 0; 2182 - 0; 2183 - 0; 2184 - 0; 2185 - 0; 2186 - 0; 2187 - 0; 2188 - 0; 2189 - 0; 2190 - 0; 2191 - 0; 2192 - 0; 2193 - 0; 2194 - 0; 2195 - 0; 2196 - 0; 2197 - 0; 2198 - 0; 2199 - 0; 2200 - 0; 2201 - 0; 2202 - 0; 2203 - 0; 2204 - 0; 2205 - 0; 2206 - 0; 2207 - 0; 2208 - 0; 2209 - 0; 2210 - 0; 2211 - 0; 2212 - 0; 2213 - 0; 2214 - 0; 2215 - 0; 2216 - 0; 2217 - 0; 2218 - 0; 2219 - 0; 2220 - 0; 2221 - 0; 2222 - 0; 2223 - 0; 2224 - 0; 2225 - 0; 2226 - 0; 2227 - 0; 2228 - 0; 2229 - 0; 2230 - 0; 2231 - 0; 2232 - 0; 2233 - 0; 2234 - 0; 2235 - 0; 2236 - 0; 2237 - 0; 2238 - 0; 2239 - 0; 2240 - 0; 2241 - 0; 2242 - 0; 2243 - 0; 2244 - 0; 2245 - 0; 2246 - 0; 2247 - 0; 2248 - 0; 2249 - 0; 2250 - 0; 2251 - 0; 2252 - 0; 2253 - 0; 2254 - 0; 2255 - 0; 2256 - 0; 2257 - 0; 2258 - 0; 2259 - 0; 2260 - 0; 2261 - 0; 2262 - 0; 2263 - 0; 2264 - 0; 2265 - 0; 2266 - 0; 2267 - 0; 2268 - 0; 2269 - 0; 2270 - 0; 2271 - 0; 2272 - 0; 2273 - 0; 2274 - 0; 2275 - 0; 2276 - 0; 2277 - 0; 2278 - 0; 2279 - 0; 2280 - 0; 2281 - 0; 2282 - 0; 2283 - 0; 2284 - 0; 2285 - 0; 2286 - 0; 2287 - 0; 2288 - 0; 2289 - 0; 2290 - 0; 2291 - 0; 2292 - 0; 2293 - 0; 2294 - 0; 2295 - 0; 2296 - 0; 2297 - 0; 2298 - 0; 2299 - 0; 2300 - 0; 2301 - 0; 2302 - 0; 2303 - 0; 2304 - 0; 2305 - 0; 2306 - 0; 2307 - 0; 2308 - 0; 2309 - 0; 2310 - 0; 2311 - 0; 2312 - 0; 2313 - 0; 2314 - 0; 2315 - 0; 2316 - 0; 2317 - 0; 2318 - 0; 2319 - 0; 2320 - 0; 2321 - 0; 2322 - 0; 2323 - 0; 2324 - 0; 2325 - 0; 2326 - 0; 2327 - 0; 2328 - 0; 2329 - 0; 2330 - 0; 2331 - 0; 2332 - 0; 2333 - 0; 2334 - 0; 2335 - 0; 2336 - 0; 2337 - 0; 2338 - 0; 2339 - 0; 2340 - 0; 2341 - ] ); 2342 - ( ServerHello 2343 - { 2344 - server_version = `TLS_1_2; 2345 - server_random = a_cs ^ a_cs; 2346 - sessionid = None; 2347 - ciphersuite = `RSA_WITH_AES_128_CCM; 2348 - extensions = []; 2349 - }, 2350 - [ 2; 0; 0; 38; 3; 3 ] @ a_l @ a_l 2351 - @ [ 2352 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 2353 - ] ); 2354 - ( ServerHello 2355 - { 2356 - server_version = `TLS_1_1; 2357 - server_random = a_cs ^ a_cs; 2358 - sessionid = None; 2359 - ciphersuite = `RSA_WITH_AES_128_CCM; 2360 - extensions = []; 2361 - }, 2362 - [ 2; 0; 0; 38; 3; 2 ] @ a_l @ a_l 2363 - @ [ 2364 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 2365 - ] ); 2366 - ( ServerHello 2367 - { 2368 - server_version = `TLS_1_0; 2369 - server_random = a_cs ^ a_cs; 2370 - sessionid = None; 2371 - ciphersuite = `RSA_WITH_AES_128_CCM; 2372 - extensions = []; 2373 - }, 2374 - [ 2; 0; 0; 38; 3; 1 ] @ a_l @ a_l 2375 - @ [ 2376 - (* session id *) 0; (* cipher *) 0xc0; 0x9c; (* comp *) 0; (* exts *) 2377 - ] ); 2378 - ( ServerHello 2379 - { 2380 - server_version = `TLS_1_0; 2381 - server_random = a_cs ^ a_cs; 2382 - sessionid = Some a_cs; 2383 - ciphersuite = `RSA_WITH_AES_128_CCM; 2384 - extensions = []; 2385 - }, 2386 - [ 2; 0; 0; 54; 3; 1 ] @ a_l @ a_l (* session id *) @ [ 16 ] 2387 - @ a_l 2388 - @ [ (* cipher *) 0xc0; 0x9c; (* comp *) 0 (* exts *) ] ); 2389 - ( ServerHello 2390 - { 2391 - server_version = `TLS_1_2; 2392 - server_random = a_cs ^ a_cs; 2393 - sessionid = None; 2394 - ciphersuite = `RSA_WITH_AES_128_CCM; 2395 - extensions = [ `Hostname ]; 2396 - }, 2397 - [ 2; 0; 0; 44; 3; 3 ] @ a_l @ a_l 2398 - @ [ 2399 - (* session id *) 2400 - 0; 2401 - (* cipher *) 2402 - 0xc0; 2403 - 0x9c; 2404 - (* comp *) 2405 - 0; 2406 - (* exts *) 2407 - 0; 2408 - 4; 2409 - 0; 2410 - 0; 2411 - 0; 2412 - 0; 2413 - ] ); 2414 - ( ServerHello 2415 - { 2416 - server_version = `TLS_1_2; 2417 - server_random = a_cs ^ a_cs; 2418 - sessionid = None; 2419 - ciphersuite = `RSA_WITH_AES_128_CCM; 2420 - extensions = [ `SecureRenegotiation "" ]; 2421 - }, 2422 - [ 2; 0; 0; 45; 3; 3 ] @ a_l @ a_l 2423 - @ [ 2424 - (* session id *) 2425 - 0; 2426 - (* cipher *) 2427 - 0xc0; 2428 - 0x9c; 2429 - (* comp *) 2430 - 0; 2431 - (* exts *) 2432 - 0; 2433 - 5; 2434 - 0xFF; 2435 - 1; 2436 - 0; 2437 - 1; 2438 - 0; 2439 - ] ); 2440 - ( ServerHello 2441 - { 2442 - server_version = `TLS_1_2; 2443 - server_random = a_cs ^ a_cs; 2444 - sessionid = None; 2445 - ciphersuite = `RSA_WITH_AES_128_CCM; 2446 - extensions = [ `Hostname; `SecureRenegotiation "" ]; 2447 - }, 2448 - [ 2; 0; 0; 49; 3; 3 ] @ a_l @ a_l 2449 - @ [ 2450 - (* session id *) 2451 - 0; 2452 - (* cipher *) 2453 - 0xc0; 2454 - 0x9c; 2455 - (* comp *) 2456 - 0; 2457 - (* exts *) 2458 - 0; 2459 - 9; 2460 - 0; 2461 - 0; 2462 - 0; 2463 - 0; 2464 - 0xFF; 2465 - 1; 2466 - 0; 2467 - 1; 2468 - 0; 2469 - ] ); 2470 - ( ServerHello 2471 - { 2472 - server_version = `TLS_1_2; 2473 - server_random = a_cs ^ a_cs; 2474 - sessionid = None; 2475 - ciphersuite = `RSA_WITH_AES_128_CCM; 2476 - extensions = [ `SecureRenegotiation ""; `Hostname ]; 2477 - }, 2478 - [ 2; 0; 0; 49; 3; 3 ] @ a_l @ a_l 2479 - @ [ 2480 - (* session id *) 2481 - 0; 2482 - (* cipher *) 2483 - 0xc0; 2484 - 0x9c; 2485 - (* comp *) 2486 - 0; 2487 - (* exts *) 2488 - 0; 2489 - 9; 2490 - 0xFF; 2491 - 1; 2492 - 0; 2493 - 1; 2494 - 0; 2495 - 0; 2496 - 0; 2497 - 0; 2498 - 0; 2499 - ] ); 2500 - ( ServerHello 2501 - { 2502 - server_version = `TLS_1_2; 2503 - server_random = a_cs ^ a_cs; 2504 - sessionid = None; 2505 - ciphersuite = `RSA_WITH_AES_128_CCM; 2506 - extensions = [ `ALPN "h2" ]; 2507 - }, 2508 - [ 2; 0; 0; 49; 3; 3 ] @ a_l @ a_l 2509 - @ [ 2510 - (* session id *) 2511 - 0; 2512 - (* cipher *) 2513 - 0xc0; 2514 - 0x9c; 2515 - (* comp *) 2516 - 0; 2517 - (* exts *) 2518 - 0; 2519 - 9; 2520 - 0; 2521 - 16; 2522 - 0; 2523 - 5; 2524 - 0; 2525 - 3; 2526 - 2; 2527 - 104; 2528 - 50; 2529 - ] ); 2530 - (* | CertificateRequest of certificate_request *) 2531 - ] 2532 - 2533 - let handshake_tests = 2534 - List.mapi 2535 - (fun i f -> 2536 - "Assemble handshake " ^ string_of_int i >:: handshake_assembler f) 2537 - handshake_assembler_tests 2538 - 2539 - let writer_tests = 2540 - version_tests @ hdr_tests @ alert_tests 2541 - @ [ "CCS " >:: ccs_test ] 2542 - @ dh_tests @ ds_tests @ ds_1_2_tests @ handshake_tests