You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ```
  2. _____ _ ____ _ _
  3. |_ _| | / ___| | |_ _ __(_)___
  4. | | | | \___ \ _____| __| '__| / __|
  5. | | | |___ ___) |_____| |_| | | \__ \
  6. |_| |_____|____/ \__|_| |_|___/
  7. ```
  8. crypto/tls, now with 100% more 1.3.
  9. THE API IS NOT STABLE AND DOCUMENTATION IS NOT GUARANTEED.
  10. [![Build Status](https://travis-ci.org/cloudflare/tls-tris.svg?branch=master)](https://travis-ci.org/cloudflare/tls-tris)
  11. ## Usage
  12. Since `crypto/tls` is very deeply (and not that elegantly) coupled with the Go stdlib,
  13. tls-tris shouldn't be used as an external package. It is also impossible to vendor it
  14. as `crypto/tls` because stdlib packages would import the standard one and mismatch.
  15. So, to build with tls-tris, you need to use a custom GOROOT.
  16. A script is provided that will take care of it for you: `./_dev/go.sh`.
  17. Just use that instead of the `go` tool.
  18. The script also transparently fetches the custom Cloudflare Go 1.9 compiler with the required backports.
  19. ```
  20. ./_dev/go.sh build ./_dev/tris-localserver
  21. TLSDEBUG=error ./tris-localserver 127.0.0.1:4443
  22. ```
  23. ## Debugging
  24. When the environment variable `TLSDEBUG` is set to `error`, Tris will print a hexdump of the Client Hello and a stack trace if an handshake error occurs. If the value is `short`, only the error and the first meaningful stack frame are printed.
  25. ## Building Caddy
  26. ```
  27. ./_dev/go.sh build github.com/mholt/caddy
  28. ```
  29. *Note: to get Caddy to use TLS 1.3 you'll have to apply the patch at `_dev/caddy/caddy.patch`.*
  30. ## Testing with BoringSSL/NSS/Mint/...
  31. ```
  32. ./_dev/tris-localserver/start.sh --rm
  33. ```
  34. ```
  35. docker build -t tls-tris:boring _dev/boring
  36. docker run -i --rm tls-tris:boring $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  37. ```
  38. ```
  39. docker build -t tls-tris:tstclnt _dev/tstclnt
  40. docker run -i --rm tls-tris:tstclnt $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  41. ```
  42. ```
  43. docker build -t tls-tris:mint _dev/mint
  44. docker run -i --rm tls-tris:mint $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  45. ```
  46. To build a specific revision, use `--build-arg REVISION=abcdef1234`.