tobogganSe connecter

packages

The Louise packages, each released on its own

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Std, packages: `std/crypto` and `std/base64` (ADR 0050); the `postgres` package's wire codec (issue #145, part)

The postgres driver's prerequisites and its first slice.

- **`std/crypto`**: SHA-256, HMAC-SHA-256 and PBKDF2-HMAC-SHA-256 over
  `ring` — already rustls's provider (ADR 0038), so no dependency enters
  the tree — shared by both backends through `louise_rt_prims` (a hash
  must never drift between them). PBKDF2 is `blocking` (the iteration
  count is the caller's; the argon2 precedent). SHA-1 and MD5 are not
  offered. **`std/base64`** is a hand-rolled pure kernel (RFC 4648), no
  dependency.
- **`packages/postgres`**: the wire protocol (version 3.0) as pure
  functions over `Bytes`, no IO: every frontend message (Startup,
  SslRequest, Password, SaslResponse, Query, Parse, Bind, Describe,
  Execute, Sync, Flush, Terminate) and the backend's set (authentication
  with SASL, ParameterStatus, BackendKeyData, ReadyForQuery and its
  transaction state, ErrorResponse/NoticeResponse fields,
  RowDescription, DataRow with NULLs, CommandComplete,
  NotificationResponse). Framing checks the declared length against a
  maximum before allocating. The tests check the codec against recorded
  byte transcripts (computed with Python's `struct`, checked in as
  base64) on both backends — no database needed.

TLS needed nothing: `std/tls`'s `tls.connect` upgrades a plain
connection after PostgreSQL's `SSLRequest` (ADR 0038, #146), and
`random.bytes` (#142) makes the SCRAM nonce.

Next on this branch: the SCRAM exchange, the connection actor, the pool,
and the `sql` tagged template.

olivier · il y a 1 mois · 2a84a7bcac5d0b6c10cdce2e53ffeab1b66de90b

Parents 029e036

3 fichiers modifiés, 661 ajouts, 0 suppressions