aboutsummaryrefslogtreecommitdiffstats
path: root/options_test.go
diff options
context:
space:
mode:
authorBilly Lynch <billy@chainguard.dev>2024-02-13 15:33:37 -0500
committerBilly Lynch <billy@chainguard.dev>2024-02-13 15:56:28 -0500
commit9fa13d83c6e473d0aca7b97a620b3f4a003993f6 (patch)
treebb994824c5dc8fcad5500a9832ea57046d4684cc /options_test.go
parent0dfff253b0b0ad7886d82bf9713e738e1045df1b (diff)
downloadgo-git-9fa13d83c6e473d0aca7b97a620b3f4a003993f6.tar.gz
git: signer, fix usage of crypto.Signer interface
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).
Diffstat (limited to 'options_test.go')
0 files changed, 0 insertions, 0 deletions