# Changelog

## 0.1.0

The first release: TLS 1.3 server sockets that keep half-close, backed by
rustls.

- `Teals.config/1` builds a server configuration from PEM files: ECDSA P-256
  and P-384, Ed25519 and RSA 2048 to 4096 identities; client certificates in
  `:none`, `:request`, `:optional` or `:required` mode against a trust store;
  ALPN; and `close_timeout`. The private key stays inside the NIF.
- `Teals.handshake/3` on an accepted `:gen_tcp` socket, then passive `recv/3`,
  active modes, `send/2` from any process with backpressure and
  `send_timeout`, `setopts/2`, `controlling_process/2`, `peercert/1`,
  `negotiated_protocol/1`, `peername/1` and `sockname/1`.
- Half-close: the peer's `close_notify` ends only its direction, reported as
  `{:teals_read_closed, socket}` or by `recv/3`, and the socket can still
  send. `shutdown(socket, :write)` sends `close_notify` after earlier sends.
  `half_close: false` ends both directions instead.
- `close/1` and the owner's exit flush what was sent, then `close_notify`,
  within `close_timeout`.
- `Teals.Ranch`, a Ranch transport, and `Teals.Cowboy.StreamHandler`, which
  gives Cowboy and Plug the client certificate and ends WebSockets on the
  peer's `close_notify`. Ranch and Cowboy are optional dependencies.
- Precompiled NIFs for `aarch64-apple-darwin`, `x86_64-unknown-linux-gnu` and
  `aarch64-unknown-linux-gnu` (glibc 2.34 or later), checked against the
  package's checksums. Elsewhere, or with `TEALS_BUILD=1`, the NIF builds from
  source with Rust 1.91 or later.
