Skip to content

Draft: tor-relay-crypto Add high-level cert types implementing ToEncodableCert

gabi-250 requested to merge gabi-250/arti:parse-unparsed-cert-2 into main

⚠️ This branch is based on top of !2668 (merged) and !2669, which should be reviewed and merged first ⚠️

This MR adds a couple of relay cert types and their corresponding ToEncodableCert implementations.

The most controversial commit here is 50e47c3b ("tor-key-forge: Add wrappers for various cert types."), which adds some wrappers over existing tor-cert types. The wrappers are needed because I want to be able to parse an Ed25519Cert, and then use its original encoding (the raw byte slice stored in the wrapper types) as an EncodedEd25519Cert, and the existing tor-cert APIs don't support that (the raw slice is consumed when parsing the cert).

See the individual commit messages for a more detailed description.

The branch starts at 3cd54dde ("tor-cert: Add experimental API for building EncodedEd25519Certs.")

Closes #1777

Edited by gabi-250

Merge request reports

Loading