• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

runner/H29-Apr-2020-41,18133,927

PORTING.mdH A D29-Apr-20204.6 KiB11077

README.mdH A D29-Apr-20201.9 KiB3930

async_bio.ccH A D29-Apr-20204.1 KiB192148

async_bio.hH A D29-Apr-20201.8 KiB449

bssl_shim.ccH A D29-Apr-202039.2 KiB1,2411,023

fuzzer.hH A D29-Apr-202024.5 KiB590501

fuzzer_tags.hH A D29-Apr-20201.9 KiB499

handshake_util.ccH A D29-Apr-202016 KiB518412

handshake_util.hH A D29-Apr-20202.5 KiB5417

handshaker.ccH A D29-Apr-20205.3 KiB171129

mock_quic_transport.ccH A D29-Apr-20207.2 KiB239196

mock_quic_transport.hH A D29-Apr-20202.8 KiB7738

packeted_bio.ccH A D29-Apr-20206.4 KiB266201

packeted_bio.hH A D29-Apr-20201.6 KiB4414

settings_writer.ccH A D29-Apr-20203.1 KiB11682

settings_writer.hH A D29-Apr-20201.4 KiB4719

test_config.ccH A D29-Apr-202056.6 KiB1,7341,477

test_config.hH A D29-Apr-20206.8 KiB205177

test_state.ccH A D29-Apr-20205.8 KiB182146

test_state.hH A D29-Apr-20203.4 KiB8942

README.md

1# BoringSSL SSL Tests
2
3This directory contains BoringSSL's protocol-level test suite.
4
5Testing a TLS implementation can be difficult. We need to produce invalid but
6sufficiently correct handshakes to get our implementation close to its edge
7cases. TLS's cryptographic steps mean we cannot use a transcript and effectively
8need a TLS implementation on the other end. But we do not wish to litter
9BoringSSL with options for bugs to test against.
10
11Instead, we use a fork of the Go `crypto/tls` package, heavily patched with
12configurable bugs. This code, along with a test suite and harness written in Go,
13lives in the `runner` directory. The harness runs BoringSSL via a C/C++ shim
14binary which lives in this directory. All communication with the shim binary
15occurs with command-line flags, sockets, and standard I/O.
16
17This strategy also ensures we always test against a second implementation. All
18features should be implemented twice, once in C for BoringSSL and once in Go for
19testing. If possible, the Go code should be suitable for potentially
20upstreaming. However, sometimes test code has different needs. For example, our
21test DTLS code enforces strict ordering on sequence numbers and has controlled
22packet drop simulation.
23
24To run the tests manually, run `go test` from the `runner` directory. It takes
25command-line flags found at the top of `runner/runner.go`. The `-help` option
26also works after using `go test -c` to make a `runner.test` binary first.
27
28If adding a new test, these files may be a good starting point:
29
30 * `runner/runner.go`: the test harness and all the individual tests.
31 * `runner/common.go`: contains the `Config` and `ProtocolBugs` struct which
32   control the Go TLS implementation's behavior.
33 * `test_config.h`, `test_config.cc`: the command-line flags which control the
34   shim's behavior.
35 * `bssl_shim.cc`: the shim binary itself.
36
37For porting the test suite to a different implementation see
38[PORTING.md](./PORTING.md).
39