aboutsummaryrefslogtreecommitdiffstats
path: root/signer_test.go
Commit message (Collapse)AuthorAgeFilesLines
* git: signer, fix usage of crypto.Signer interfaceBilly Lynch2024-02-131-0/+56
crypto.Signer was incorrectly used before. Signer documentation says that Signer.Sign should be used on digests, whereas we were using this on message bodies. To fix this, create our own Signer interface (+ signableObject borrowed from #705) that describes more accurately what we want. As before, the expectation is that signer implementations only need to worry about acting on encoded message bodies rather than needing to encode objects themselves. This is technically a breaking change from the previous Signer implementation, but since this is new and hasn't made it into cut release yet, this seems like an acceptible change. Also adds example test showing how signers can be made (uses base64 for consistent outputs).