diff --git a/tests/examples/data/tls/README.md b/tests/examples/data/tls/README.md new file mode 100644 index 000000000..fee9b6cc2 --- /dev/null +++ b/tests/examples/data/tls/README.md @@ -0,0 +1,181 @@ +# Message samples for TLS and DTLS + +## General + +The `pcap` files in the current folder contain WireShark captures that have been used to populate +several of the folders with the path prefix `../tls*` containing raw packets with specific TLS or +DTLS message types. See the original resources referenced below for the full details of the +applicable copyright terms. In addition, some of the folders contain also custom-built samples. +Those have been documented in the respective folders. + +### About TLS 1.3 and DTLS 1.3 extensions + +Several of the extensions defined for TLS 1.2 / DTLS 1.2 are no more neither required nor supported in TLS 1.3 / DTLS 1.3. See [RFC 8446 4.2](https://datatracker.ietf.org/doc/html/rfc8446#section-4.2) for the applicable extensions. + +However, many available TLS 1.3 and DTLS 1.3 captures still contain some extensions that should not be there. +For instance, the Encrypt_Then_Mac extension (22). +Presumably, the other parties just ignore them. +However, for strict compliance they should be rejected. +See the `invalid` folders of the respective samples for more information. + +## TLS: Captures + +### Capture 1: Illustrated TLS (TLS 1.3) + +* File: [tls13-1.pcap](tls13-1.pcap) -- TLS 1.3. session over TCP from "The Illustrated TLS + Connection" [repository](https://tls13-1.pcap/syncsynchalt/illustrated-tls13). See also the related + website: [https://tls13.xargs.org/](https://tls13.xargs.org/). + +* File: [tls13-1-keylog.txt](tls13-1-keylog.txt) -- A [NSS key +log](https://web.archive.org/web/20230425034128/https://firefox-source-docs.mozilla.org/security/nss/legacy/key_log_format/index.html) + for this capture. + + * Note: For TLS such files can be loaded in Wireshark by right-clicking a TLS packet and selecting + `Protocol Preferences -> Transport Layer Security -> Pre-Master-Secret log filename` to let + Wireshark decrypt and show TLS connection details. + * Note: See [this IETF draft](https://datatracker.ietf.org/doc/draft-thomson-tls-keylogfile/) for + followup documentation on that format. + +License: MIT. + +### Capture 2: TLS 1.3 WireShark test + +File: [tls13-2.pcap](tls13-2.pcap) -- WireShark test sample for TLS 1.3. Original file: [tls13-rfc8446.pcap](https://gitlab.com/wireshark/wireshark/-/blob/master/test/captures/tls13-rfc8446.pcap). + +License: GNU GPLv2. + +## TLS: Extracting Protocol Data Units (PDUs) + +For the extraction of TLS records from a `.pcap` file there are several possiblities. + +Unfortunately, at this point the [extract_packets.py](../../../../tools/extract_packets.py) script doesn't yet support the extraction of the TLS layer packets directly. We could extract the TCP segments this way. +However, the TCP header doesn't have a fixed length (e.g., [see here](https://www.rfc-editor.org/rfc/rfc9293#name-header-format)). +So, we cannot simply trim the segments by a fixed number. + +Instead, one solution is to export the TLS records manually from the Wireshark GUI by selecting the +relevant part of the packet and choosing the action "Export Packet Bytes". +This has been done for the `tls13-1.pcap` and parts of the `tls13-2.pcap` capture. + +Notes: +* Not all the frames in that capture contain TLS records. + Some are other TCP messages. +* Some TCP segments contain multiple TLS records. +* If the RecordFlux type does not correspond exactly to the packet tree in WireShark, then the + extracted file might need further trimming. + See the section [Extract DTLS packets](#2-extract-dtls-packets) for tips how to do that. + +# DTLS: Captures + +### Capture 1: dtls13-1.pcap (DTLS 1.3) + +File: [ws-dtls13.pcap](dtls13-1.pcap) -- DTLS 1.3. session over UDP from: +https://gitlab.com/wireshark/wireshark/-/issues/18071. + +License: No explicit license mentioned. + +### Capture 2: Illustrated DTLS (DTLS 1.3) + +* File: [dtls13-2.pcap](dtls13-2.pcap) -- DTLS 1.3. session over UDP from "The Illustrated DTLS + Connection" [repository](https://github.com/syncsynchalt/illustrated-dtls). See also the related + website: [https://dtls.xargs.org](https://dtls.xargs.org). + +* File: [dtls13-2-keylog.txt](dtls13-2-keylog.txt) -- A [NSS key + log](https://web.archive.org/web/20230425034128/https://firefox-source-docs.mozilla.org/security/nss/legacy/key_log_format/index.html) + for this capture. + + * Note: For TLS such files can be loaded in Wireshark by right-clicking a TLS packet and selecting + `Protocol Preferences -> Transport Layer Security -> Pre-Master-Secret log filename` to let + Wireshark decrypt and show TLS connection details. However, as of Wireshark version version 4.0.6 + this capability is not yet supported in Wireshark for DTLS. + * Note: See [this IETF draft](https://datatracker.ietf.org/doc/draft-thomson-tls-keylogfile/) for + followup documentation on that format. + +License: MIT. + +## DTLS: Extracting Protocol Data Units (PDUs) + +The extraction of DTLS packets from the `.pcap` files is done in several phases: + +1. The [extract_packets.py](../../../../tools/extract_packets.py) script is used to extract the byte + representation of the UDP datagrams from the `.pcap` files. (Unfortunately, at this point the + script doesn't yet support the extraction of DTLS layer packets directly.) +1. Remove the UDP headers to obtain the payload bytes. +1. If the UDP payload contains multiple DTLS records, then split them further into several smaller + files. + +### 1. Extract UDP datagrams + +For instance, a file `capture.pcap` capture can be split to UDP datagrams like this: + +```console +RECORDFLUX_DIR/tools/extract_packets.py inet.UDP \ + CAPTURES_DIR/capture.pcap \ + OUTPUT_DIR +``` +### 2. Extract DTLS packets + +The UDP frame header has a fixed length of 8 bytes (e.g., [see +here](https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure)). So, we can just +use any tool to drop off the first 8 bytes from the frame. For instance, it could be done using the +`tail` utility on Linux like that (note that the bytes that will be included start from the next +position, i.e. 9): + +```console +$ tail -c +9 INPUT_FILE > OUTPUT_FILE +``` + +For example, assuming that the UDP frames have been stored to some directory one frame per file and +each file has the extension .raw, then you can do: + +```console +$ cd UDP_DIR +$ find -maxdepth 1 -name "*.raw" -exec sh -c "tail -c +9 {} > DTLS_DIR/{}" \; +``` + +### 3. Split multi-record datagrams + +A single UDP datagaram (packet) may carry multiple DTLS records. There is no generic means to +extract those records without decoding the record data first. For instance, the `dtls13-1` capture +03 contains 3 records, captures 06 and 08 contain 2 records. The lengths of these records have been +determined one by one and the respective sample files have been split to smaller sample files. + +For example: + +```console +$ # Extract 144 bytes from the beginning of a file. +$ head -c 144 dtls13-1_03.raw > dtls13-1_03a.raw +$ # Extract 36 bytes from the middle of the file starting with position 145. +$ tail -c +145 dtls13-1_03.raw | head -c 36 > dtls13-1_03b.raw +$ # Extract 77 bytes from the end of the file. +$ tail -c 77 dtls13-1_03.raw > dtls13-1_03c.raw +``` +### Sample file naming scheme + +The following naming convention has been used: + +``` +_<2 digit frame id>?(_?)*.raw +``` + +For example: + +``` +tls13-1_04a_hs_ch_ex0.raw + +where: + * capture_prefix = `tls13-1` + * 2 digit frame id = `04` <-- Ethernet frame number 5. + * record id letter = `a` <-- 1st DTLS_Record (DTLS_Plaintext) in the TCP segment. + * packet type id 1 = `hs` <-- Handshake message + * packet type id 2 = `ch` <-- ClientHello message + * packet type id 3 = `ex0` <-- Extension number 1 +``` + +``` +dtls13-1_03b.raw + +where: + * capture_prefix = `dtls13-1` + * 2 digit frame id = `03` <-- Ethernet frame number 4. + * record id letter = `b` <-- 2nd DTLS_Record (DTLS_Ciphertext) in the packet. +``` diff --git a/tests/examples/data/tls/dtls13-1.pcap b/tests/examples/data/tls/dtls13-1.pcap new file mode 100644 index 000000000..d09868065 Binary files /dev/null and b/tests/examples/data/tls/dtls13-1.pcap differ diff --git a/tests/examples/data/tls/dtls13-2-keylog.txt b/tests/examples/data/tls/dtls13-2-keylog.txt new file mode 100644 index 000000000..40706b498 --- /dev/null +++ b/tests/examples/data/tls/dtls13-2-keylog.txt @@ -0,0 +1,4 @@ +CLIENT_HANDSHAKE_TRAFFIC_SECRET e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff 33e472fb8d821b0193314626bebee307ccbd1aeb3d3a17ba468888ffc5246da1 +SERVER_HANDSHAKE_TRAFFIC_SECRET e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff 8ad7990b9d249bcbaa0805d8d3f3ad2259e75f3a42c5d84db3ea3c6ee57b3d38 +CLIENT_TRAFFIC_SECRET e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff a9185352f61134f1d24eaa4a930fff2edca40ce8c06420848deb27699e9baf2c +SERVER_TRAFFIC_SECRET e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff 4ab12ae4022fc013eca21abb071e13aa24a150e3876c660fe0ed10a8eebd8f17 diff --git a/tests/examples/data/tls/dtls13-2.pcap b/tests/examples/data/tls/dtls13-2.pcap new file mode 100644 index 000000000..93a449a3d Binary files /dev/null and b/tests/examples/data/tls/dtls13-2.pcap differ diff --git a/tests/examples/data/tls/tls13-1-keylog.txt b/tests/examples/data/tls/tls13-1-keylog.txt new file mode 100644 index 000000000..15d1fb448 --- /dev/null +++ b/tests/examples/data/tls/tls13-1-keylog.txt @@ -0,0 +1,5 @@ +SERVER_HANDSHAKE_TRAFFIC_SECRET 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 23323da031634b241dd37d61032b62a4f450584d1f7f47983ba2f7cc0cdcc39a68f481f2b019f9403a3051908a5d1622 +CLIENT_HANDSHAKE_TRAFFIC_SECRET 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f db89d2d6df0e84fed74a2288f8fd4d0959f790ff23946cdf4c26d85e51bebd42ae184501972f8d30c4a3e4a3693d0ef0 +EXPORTER_SECRET 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 5da16dd8325dd8279e4535363384d9ad0dbe370538fc3ad74e53d533b77ac35ee072d56c90871344e6857ccb2efc9e14 +SERVER_TRAFFIC_SECRET_0 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 86c967fd7747a36a0685b4ed8d0e6b4c02b4ddaf3cd294aa44e9f6b0183bf911e89a189ba5dfd71fccffb5cc164901f8 +CLIENT_TRAFFIC_SECRET_0 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 9e47af27cb60d818a9ea7d233cb5ed4cc525fcd74614fb24b0ee59acb8e5aa7ff8d88b89792114208fec291a6fa96bad diff --git a/tests/examples/data/tls/tls13-1.pcap b/tests/examples/data/tls/tls13-1.pcap new file mode 100644 index 000000000..f43bb1a4e Binary files /dev/null and b/tests/examples/data/tls/tls13-1.pcap differ diff --git a/tests/examples/data/tls/tls13-2.pcap b/tests/examples/data/tls/tls13-2.pcap new file mode 100644 index 000000000..4500f5931 Binary files /dev/null and b/tests/examples/data/tls/tls13-2.pcap differ diff --git a/tests/examples/data/tls_alert/alert/valid/README.md b/tests/examples/data/tls_alert/alert/valid/README.md new file mode 100644 index 000000000..bd07232f7 --- /dev/null +++ b/tests/examples/data/tls_alert/alert/valid/README.md @@ -0,0 +1,3 @@ +# Valid DTLS Alert messages + +File: [dtls13-0_00.raw](dtls13-0_00.raw) -- A simple DTLS Alert message. Produced using RecordFlux generated Ada SPARK code. \ No newline at end of file diff --git a/tests/examples/data/tls_alert/alert/valid/dtls13-0_00.raw b/tests/examples/data/tls_alert/alert/valid/dtls13-0_00.raw new file mode 100644 index 000000000..283882646 --- /dev/null +++ b/tests/examples/data/tls_alert/alert/valid/dtls13-0_00.raw @@ -0,0 +1 @@ +Z \ No newline at end of file diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/README.md b/tests/examples/data/tls_handshake/ch_extension/invalid/README.md new file mode 100644 index 000000000..98e6df711 --- /dev/null +++ b/tests/examples/data/tls_handshake/ch_extension/invalid/README.md @@ -0,0 +1,20 @@ +* tls13-1_04a_hs_ch_ex1.raw + * Bad Extension type: Ec_Point_Formats(11) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-1_04a_hs_ch_ex3.raw + * Bad Extension type: Session_Ticket(35) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-1_04a_hs_ch_ex4.raw + * Bad Extension type: Encrypt_Then_Mac(22) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-1_04a_hs_ch_ex5.raw + * Bad Extension type: Extended_Master_Secret(23) -- This extension type isn't strictly compatible with TLS 1.3. + +* tls13-2_00_hs_ch_ex0.raw + * Bad Extension type: Renegotiation_Info(65281) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-2_00_hs_ch_ex1.raw + * Bad Extension type: Extended_Master_Secret(23) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-2_00_hs_ch_ex2.raw + * Bad Extension type: Session_Ticket(35) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-2_00_hs_ch_ex4.raw + * Bad Extension type: Ec_Point_Formats(11) -- This extension type isn't strictly compatible with TLS 1.3. +* tls13-2_00_hs_ch_ex7.raw + * A Supported_Versions(43) extension which contains non-standard draft versions of TLS 1.3. These are not supported by the current RecordFlux TLS 1.3 specification. + \ No newline at end of file diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex1.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex1.raw new file mode 100644 index 000000000..fb627338a Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex1.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex3.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex3.raw new file mode 100644 index 000000000..490a4c0e6 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex3.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex4.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex4.raw new file mode 100644 index 000000000..2b89ac84d Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex4.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex5.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex5.raw new file mode 100644 index 000000000..28bf8ddb3 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-1_04a_hs_ch_ex5.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex0.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex0.raw new file mode 100644 index 000000000..590200111 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex0.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex1.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex1.raw new file mode 100644 index 000000000..28bf8ddb3 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex1.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex2.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex2.raw new file mode 100644 index 000000000..490a4c0e6 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex2.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex4.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex4.raw new file mode 100644 index 000000000..32c497acb Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex4.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex7.raw b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex7.raw new file mode 100644 index 000000000..79202d48c Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/invalid/tls13-2_00_hs_ch_ex7.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex0.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex0.raw new file mode 100644 index 000000000..0907f0237 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex0.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex2.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex2.raw new file mode 100644 index 000000000..fd7c02b06 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex2.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex6.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex6.raw new file mode 100644 index 000000000..f6d0c34ad Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex6.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex7.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex7.raw new file mode 100644 index 000000000..16c7000d4 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex7.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex8.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex8.raw new file mode 100644 index 000000000..cb04387b2 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex8.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex9.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex9.raw new file mode 100644 index 000000000..0f95b5817 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-1_04a_hs_ch_ex9.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex3.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex3.raw new file mode 100644 index 000000000..114fad831 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex3.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex5.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex5.raw new file mode 100644 index 000000000..20dd701d2 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex5.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex6.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex6.raw new file mode 100644 index 000000000..cb04387b2 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex6.raw differ diff --git a/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex8.raw b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex8.raw new file mode 100644 index 000000000..350c95809 Binary files /dev/null and b/tests/examples/data/tls_handshake/ch_extension/valid/tls13-2_00_hs_ch_ex8.raw differ diff --git a/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_00_hs_ch.raw b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_00_hs_ch.raw new file mode 100644 index 000000000..2fb11d83e Binary files /dev/null and b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_00_hs_ch.raw differ diff --git a/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_01_hs_ch.raw b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_01_hs_ch.raw new file mode 100644 index 000000000..2fb11d83e Binary files /dev/null and b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_01_hs_ch.raw differ diff --git a/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_02_hs_ch.raw b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_02_hs_ch.raw new file mode 100644 index 000000000..2fb11d83e Binary files /dev/null and b/tests/examples/data/tls_handshake/client_hello/invalid/dtls13-1_02_hs_ch.raw differ diff --git a/tests/examples/data/tls_handshake/client_hello/invalid/tls13-2_00_hs_ch.raw b/tests/examples/data/tls_handshake/client_hello/invalid/tls13-2_00_hs_ch.raw new file mode 100644 index 000000000..85b0f54fd Binary files /dev/null and b/tests/examples/data/tls_handshake/client_hello/invalid/tls13-2_00_hs_ch.raw differ diff --git a/tests/examples/data/tls_handshake/dtls_handshake/invalid/README.md b/tests/examples/data/tls_handshake/dtls_handshake/invalid/README.md new file mode 100644 index 000000000..4724f9f8a --- /dev/null +++ b/tests/examples/data/tls_handshake/dtls_handshake/invalid/README.md @@ -0,0 +1,8 @@ +* dtls13-1_00_hs.raw + * Invalid due to unsupported extensions. See [../../ch_extension/invalid/README.md](../../ch_extension/invalid/README.md) + +* dtls13-1_01_hs.raw + * Invalid due to unsupported extensions. See [../../ch_extension/invalid/README.md](../../ch_extension/invalid/README.md) + +* dtls13-1_02_hs.raw + * Invalid due to unsupported extensions. See [../../ch_extension/invalid/README.md](../../ch_extension/invalid/README.md) \ No newline at end of file diff --git a/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_00_hs.raw b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_00_hs.raw new file mode 100644 index 000000000..08c1926f8 Binary files /dev/null and b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_00_hs.raw differ diff --git a/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_01_hs.raw b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_01_hs.raw new file mode 100644 index 000000000..08c1926f8 Binary files /dev/null and b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_01_hs.raw differ diff --git a/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_02_hs.raw b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_02_hs.raw new file mode 100644 index 000000000..08c1926f8 Binary files /dev/null and b/tests/examples/data/tls_handshake/dtls_handshake/invalid/dtls13-1_02_hs.raw differ diff --git a/tests/examples/data/tls_handshake/dtls_handshake/valid/dtls13-1_03a_hs.raw b/tests/examples/data/tls_handshake/dtls_handshake/valid/dtls13-1_03a_hs.raw new file mode 100644 index 000000000..08cd2a53a Binary files /dev/null and b/tests/examples/data/tls_handshake/dtls_handshake/valid/dtls13-1_03a_hs.raw differ diff --git a/tests/examples/data/tls_handshake/server_hello/valid/dtls13-1_03a_hs_sh.raw b/tests/examples/data/tls_handshake/server_hello/valid/dtls13-1_03a_hs_sh.raw new file mode 100644 index 000000000..85fbba9b0 Binary files /dev/null and b/tests/examples/data/tls_handshake/server_hello/valid/dtls13-1_03a_hs_sh.raw differ diff --git a/tests/examples/data/tls_handshake/server_hello/valid/tls13-2_01a_hs_sh.raw b/tests/examples/data/tls_handshake/server_hello/valid/tls13-2_01a_hs_sh.raw new file mode 100644 index 000000000..59afe8224 Binary files /dev/null and b/tests/examples/data/tls_handshake/server_hello/valid/tls13-2_01a_hs_sh.raw differ diff --git a/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex0.raw b/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex0.raw new file mode 100644 index 000000000..4e063f0cb Binary files /dev/null and b/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex0.raw differ diff --git a/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex1.raw b/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex1.raw new file mode 100644 index 000000000..f37fa2d01 Binary files /dev/null and b/tests/examples/data/tls_handshake/sh_extension/valid/tls13-2_01a_hs_sh_ex1.raw differ diff --git a/tests/examples/data/tls_handshake/tls_handshake/invalid/README.md b/tests/examples/data/tls_handshake/tls_handshake/invalid/README.md new file mode 100644 index 000000000..a1b01042c --- /dev/null +++ b/tests/examples/data/tls_handshake/tls_handshake/invalid/README.md @@ -0,0 +1,5 @@ +* tls13-1_04_hs.raw + * Invalid due to unsupported extensions. See [../../ch_extension/invalid/README.md](../../ch_extension/invalid/README.md) + +* tls13-2_00_hs.raw + * Invalid due to unsupported extensions. See [../../ch_extension/invalid/README.md](../../ch_extension/invalid/README.md) \ No newline at end of file diff --git a/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-1_04_hs.raw b/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-1_04_hs.raw new file mode 100644 index 000000000..daea65858 Binary files /dev/null and b/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-1_04_hs.raw differ diff --git a/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-2_00_hs.raw b/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-2_00_hs.raw new file mode 100644 index 000000000..4b417fe94 Binary files /dev/null and b/tests/examples/data/tls_handshake/tls_handshake/invalid/tls13-2_00_hs.raw differ diff --git a/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-1_06a_hs.raw b/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-1_06a_hs.raw new file mode 100644 index 000000000..cf152ab24 Binary files /dev/null and b/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-1_06a_hs.raw differ diff --git a/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-2_01a_hs.raw b/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-2_01a_hs.raw new file mode 100644 index 000000000..1d4f73910 Binary files /dev/null and b/tests/examples/data/tls_handshake/tls_handshake/valid/tls13-2_01a_hs.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03b.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03b.raw new file mode 100644 index 000000000..a81890c8e Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03b.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03c.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03c.raw new file mode 100644 index 000000000..5cc4e83ce Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_03c.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_04.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_04.raw new file mode 100644 index 000000000..28a477efa Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_04.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_05.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_05.raw new file mode 100644 index 000000000..a8efe1efe Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_05.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06a.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06a.raw new file mode 100644 index 000000000..070895826 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06a.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06b.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06b.raw new file mode 100644 index 000000000..cbf0101ef Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_06b.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_07.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_07.raw new file mode 100644 index 000000000..07aee9faa Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_07.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08a.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08a.raw new file mode 100644 index 000000000..14b3189e9 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08a.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08b.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08b.raw new file mode 100644 index 000000000..7babed428 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_08b.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_09.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_09.raw new file mode 100644 index 000000000..23f08d1a3 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_09.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_10.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_10.raw new file mode 100644 index 000000000..485a531bf Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_10.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_11.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_11.raw new file mode 100644 index 000000000..0609c3d0f Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_11.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_12.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_12.raw new file mode 100644 index 000000000..ddd1eb819 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_12.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_13.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_13.raw new file mode 100644 index 000000000..25e03c2be Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_13.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_14.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_14.raw new file mode 100644 index 000000000..74df28fab Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_14.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_15.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_15.raw new file mode 100644 index 000000000..805a0a269 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_15.raw differ diff --git a/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_16.raw b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_16.raw new file mode 100644 index 000000000..73443f6a3 Binary files /dev/null and b/tests/examples/data/tls_record/dtls_ciphertext/valid/dtls13-1_16.raw differ diff --git a/tests/examples/data/tls_record/tls_plaintext/invalid/README.md b/tests/examples/data/tls_record/tls_plaintext/invalid/README.md new file mode 100644 index 000000000..84f5f3179 --- /dev/null +++ b/tests/examples/data/tls_record/tls_plaintext/invalid/README.md @@ -0,0 +1,8 @@ +* dtls13-1_00.raw + * Invalid due to unsupported extensions. See [(../../../tls_handshake/ch_extension/invalid/README.md)](../../../tls_handshake/ch_extension/invalid/README.md) + +* dtls13-1_01.raw + * Invalid due to unsupported extensions. See [(../../../tls_handshake/ch_extension/invalid/README.md)](../../../tls_handshake/ch_extension/invalid/README.md) + +* dtls13-1_02.raw + * Invalid due to unsupported extensions. See [(../../../tls_handshake/ch_extension/invalid/README.md)](../../../tls_handshake/ch_extension/invalid/README.md) \ No newline at end of file diff --git a/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_00.raw b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_00.raw new file mode 100644 index 000000000..45cd6e0ea Binary files /dev/null and b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_00.raw differ diff --git a/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_01.raw b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_01.raw new file mode 100644 index 000000000..df68393f0 Binary files /dev/null and b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_01.raw differ diff --git a/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_02.raw b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_02.raw new file mode 100644 index 000000000..2ba99fcf7 Binary files /dev/null and b/tests/examples/data/tls_record/tls_plaintext/invalid/dtls13-1_02.raw differ diff --git a/tests/examples/data/tls_record/tls_plaintext/valid/dtls13-1_03a.raw b/tests/examples/data/tls_record/tls_plaintext/valid/dtls13-1_03a.raw new file mode 100644 index 000000000..4cdc246a4 Binary files /dev/null and b/tests/examples/data/tls_record/tls_plaintext/valid/dtls13-1_03a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/invalid/dtls13-1_00.raw b/tests/examples/data/tls_record/tls_record/invalid/dtls13-1_00.raw new file mode 120000 index 000000000..fa2a79ecb --- /dev/null +++ b/tests/examples/data/tls_record/tls_record/invalid/dtls13-1_00.raw @@ -0,0 +1 @@ +../../tls_plaintext/invalid/dtls13-1_00.raw \ No newline at end of file diff --git a/tests/examples/data/tls_record/tls_record/invalid/dtls13-2_00.raw b/tests/examples/data/tls_record/tls_record/invalid/dtls13-2_00.raw new file mode 100644 index 000000000..baee7110a Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/invalid/dtls13-2_00.raw differ diff --git a/tests/examples/data/tls_record/tls_record/invalid/tls13-1_04.raw b/tests/examples/data/tls_record/tls_record/invalid/tls13-1_04.raw new file mode 100644 index 000000000..dae6d6761 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/invalid/tls13-1_04.raw differ diff --git a/tests/examples/data/tls_record/tls_record/invalid/tls13-2_00.raw b/tests/examples/data/tls_record/tls_record/invalid/tls13-2_00.raw new file mode 100644 index 000000000..a5319e512 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/invalid/tls13-2_00.raw differ diff --git a/tests/examples/data/tls_record/tls_record/invalid/tls13-2_06.raw b/tests/examples/data/tls_record/tls_record/invalid/tls13-2_06.raw new file mode 100644 index 000000000..7b1197a53 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/invalid/tls13-2_06.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-1_03b.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-1_03b.raw new file mode 120000 index 000000000..f40f69a4a --- /dev/null +++ b/tests/examples/data/tls_record/tls_record/valid/dtls13-1_03b.raw @@ -0,0 +1 @@ +../../dtls_ciphertext/valid/dtls13-1_03b.raw \ No newline at end of file diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_01.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_01.raw new file mode 100644 index 000000000..423bc472e Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_01.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_02.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_02.raw new file mode 100644 index 000000000..bddd765b0 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_02.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_03.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_03.raw new file mode 100644 index 000000000..b2eb9f6ad Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_03.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_04.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_04.raw new file mode 100644 index 000000000..bee59dd1b --- /dev/null +++ b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_04.raw @@ -0,0 +1 @@ +.>!JxE:A;56EzJH$NBF&ּ,ńd{Xﯙ&Bd)]icxStZ]+U+ih3ߟA7'Z3|DL-(0PHrݡKc˔) 4)qMXha%ҎRҧZOs M,44Z:43Rݷ!,Yn KefZ3a1C]A"9;LDІ29*r qq8|!9O \ No newline at end of file diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_05.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_05.raw new file mode 100644 index 000000000..87b9d245e Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_05.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_06.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_06.raw new file mode 100644 index 000000000..95366db98 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_06.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_07.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_07.raw new file mode 100644 index 000000000..7504eda93 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_07.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_08.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_08.raw new file mode 100644 index 000000000..024dbffa2 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_08.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_09.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_09.raw new file mode 100644 index 000000000..d35ce2154 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_09.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/dtls13-2_10.raw b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_10.raw new file mode 100644 index 000000000..6c7c09e62 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/dtls13-2_10.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06a.raw new file mode 100644 index 000000000..a1e4edf2b Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06b.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06c.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06c.raw new file mode 100644 index 000000000..c0ae12ac8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06c.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06d.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06d.raw new file mode 100644 index 000000000..55358cc0b Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06d.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06e.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06e.raw new file mode 100644 index 000000000..42a5a2311 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06e.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_06f.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06f.raw new file mode 100644 index 000000000..f889afc14 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_06f.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_08a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_08a.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_08a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_08b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_08b.raw new file mode 100644 index 000000000..8f6e3c1b2 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_08b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_10.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_10.raw new file mode 100644 index 000000000..179980edb Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_10.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_12.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_12.raw new file mode 100644 index 000000000..ab750039d Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_12.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_14.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_14.raw new file mode 100644 index 000000000..aa9dd32d4 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_14.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-1_16.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-1_16.raw new file mode 100644 index 000000000..22bab3c9a Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-1_16.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_01a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01a.raw new file mode 100644 index 000000000..f5aadfaac Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_01b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01b.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_01c.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01c.raw new file mode 100644 index 000000000..32aae0c21 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_01c.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_02a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_02a.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_02a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_02b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_02b.raw new file mode 100644 index 000000000..c421c9011 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_02b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_03.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_03.raw new file mode 100644 index 000000000..594fbbc25 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_03.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_04.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_04.raw new file mode 100644 index 000000000..0efcf73df Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_04.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_05.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_05.raw new file mode 100644 index 000000000..46fa1f6c6 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_05.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_07a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_07a.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_07a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_07b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_07b.raw new file mode 100644 index 000000000..ef86f2702 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_07b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_08a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08a.raw new file mode 100644 index 000000000..233ead951 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_08b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08b.raw new file mode 100644 index 000000000..8f87187b8 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_08c.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08c.raw new file mode 100644 index 000000000..f6556a9da Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08c.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_08e.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08e.raw new file mode 100644 index 000000000..00cfaa2df Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_08e.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_09.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09.raw new file mode 100644 index 000000000..1f03c934d Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_09a.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09a.raw new file mode 100644 index 000000000..716bd5a81 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09a.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_09b.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09b.raw new file mode 100644 index 000000000..38f1c7a5e Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_09b.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_10.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_10.raw new file mode 100644 index 000000000..84331a253 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_10.raw differ diff --git a/tests/examples/data/tls_record/tls_record/valid/tls13-2_11.raw b/tests/examples/data/tls_record/tls_record/valid/tls13-2_11.raw new file mode 100644 index 000000000..d2c8c3144 Binary files /dev/null and b/tests/examples/data/tls_record/tls_record/valid/tls13-2_11.raw differ diff --git a/tools/extract_packets.py b/tools/extract_packets.py index 0c133be2a..d32d29d73 100755 --- a/tools/extract_packets.py +++ b/tools/extract_packets.py @@ -4,6 +4,7 @@ Extract all packets of a specified protocol layer from a PCAP file. The byte representation of each packet is written into a separate file. +For more information run this script with the -h option. """ from __future__ import annotations @@ -29,7 +30,23 @@ def main(argv: Sequence[str]) -> Union[bool, str]: for c in pyclbr.readmodule(f"scapy.layers.{p.name}") ] - arg_parser = argparse.ArgumentParser() + arg_parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=""" +Extract all packets of a specified protocol layer from a PCAP file. + +The PCAP file contains a capture of several networks packets with metadata. See +https://en.wikipedia.org/wiki/Pcap and +https://datatracker.ietf.org/doc/draft-ietf-opsawg-pcap for more information on +the file format. + +The current script can be used to (a) split the capture into individual packets +and (b) extract only the sub-packets from a given layer. The byte +representation of each extracted packet is written into a separate file. + +The script is based on Scapy https://scapy.net/. +""", + ) arg_parser.add_argument( "-l", "--layers",