1. 11 Feb, 2016 1 commit
    • Matthew Holt's avatar
      Major refactor of all HTTPS/TLS/ACME code · 11103bd8
      Matthew Holt authored
      Biggest change is no longer using standard library's tls.Config.getCertificate function to get a certificate during TLS handshake. Implemented our own cache which can be changed dynamically at runtime, even during TLS handshakes. As such, restarts are no longer required after certificate renewals or OCSP updates.
      
      We also allow loading multiple certificates and keys per host, even by specifying a directory (tls got a new 'load' command for that).
      
      Renamed the letsencrypt package to https in a gradual effort to become more generic; and https is more fitting for what the package does now.
      
      There are still some known bugs, e.g. reloading where a new certificate is required but port 80 isn't currently listening, will cause the challenge to fail. There's still plenty of cleanup to do and tests to write. It is especially confusing right now how we enable "on-demand" TLS during setup and keep track of that. But this change should basically work so far.
      11103bd8
  2. 26 Jan, 2016 1 commit
  3. 25 Jan, 2016 5 commits
  4. 23 Jan, 2016 3 commits
  5. 16 Jan, 2016 2 commits
  6. 15 Jan, 2016 2 commits
  7. 14 Jan, 2016 1 commit
  8. 13 Jan, 2016 4 commits
    • Matthew Holt's avatar
      e74558ea
    • Matthew Holt's avatar
      tls: Fix failing test · b0ccab7b
      Matthew Holt authored
      b0ccab7b
    • Matthew Holt's avatar
      PoC: on-demand TLS · 47079c3d
      Matthew Holt authored
      Implements "on-demand TLS" as I call it, which means obtaining TLS certificates on-the-fly during TLS handshakes if a certificate for the requested hostname is not already available. Only the first request for a new hostname will experience higher latency; subsequent requests will get the new certificates right out of memory.
      
      Code still needs lots of cleanup but the feature is basically working.
      47079c3d
    • Matthew Holt's avatar
      Starting transition to Go 1.6 (http2 compatibility) · b4cab78b
      Matthew Holt authored
      I've built this on Go 1.6 beta 1 and made some changes to be more compatible. Namely, I removed the use of the /x/net/http2 package and let net/http enable h2 by default; updated the way h2 is disabled (if the user requires it); moved TLS_FALLBACK_SCSV to the front of the cipher suites list (all values not accepted by http2 must go after those allowed by it); removed the NextProto default of http/1.1; set the http.Server.TLSConfig value to the TLS config used by the listener (we left it nil before, but this prevents automatic enabling of h2).
      
      It is very likely there is more to do, but at least already Caddy uses HTTP/2 when built with Go 1.6.
      b4cab78b
  9. 12 Jan, 2016 7 commits
  10. 11 Jan, 2016 5 commits
  11. 10 Jan, 2016 2 commits
  12. 09 Jan, 2016 2 commits
  13. 08 Jan, 2016 5 commits