Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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