From 30fe31dddc6d83817efd525968b37fdbecf5d467 Mon Sep 17 00:00:00 2001 From: Adam Hughes <9903835+tri-adam@users.noreply.github.com> Date: Fri, 17 Feb 2023 13:42:52 -0500 Subject: [PATCH 1/2] deps: bump github.com/ProtonMail/go-crypto from v0.0.0-20230201104953-d1d05f4e2bfb to v0.0.0-20230217124315-7d5c6f04bbb8 (#261) Signed-off-by: Edita Kizinevic --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6833064..b124c00 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/apptainer/sif/v2 go 1.19 require ( - github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb + github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 github.com/blang/semver/v4 v4.0.0 github.com/go-git/go-git/v5 v5.5.2 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index 0c3c918..a8328e3 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= -github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb h1:Vx1Bw/nGULx+FuY7Sw+8ZDpOx9XOdA+mOfo678SqkbU= -github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= From 5a1aa705ac2267aaa68cc9a7323dd7f5ffb896fe Mon Sep 17 00:00:00 2001 From: Edita Kizinevic Date: Mon, 20 Feb 2023 15:09:14 +0100 Subject: [PATCH 2/2] Fix lint errors Signed-off-by: Edita Kizinevic --- pkg/integrity/digest.go | 4 ++-- pkg/integrity/dsse.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/integrity/digest.go b/pkg/integrity/digest.go index 93aaa91..dfa3c5d 100644 --- a/pkg/integrity/digest.go +++ b/pkg/integrity/digest.go @@ -121,7 +121,7 @@ func (d digest) MarshalJSON() ([]byte, error) { func (d *digest) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { - return fmt.Errorf("%w: %v", errDigestMalformed, err) + return fmt.Errorf("%w: %w", errDigestMalformed, err) } parts := strings.Split(s, ":") @@ -133,7 +133,7 @@ func (d *digest) UnmarshalJSON(data []byte) error { v, err := hex.DecodeString(value) if err != nil { - return fmt.Errorf("%w: %v", errDigestMalformed, err) + return fmt.Errorf("%w: %w", errDigestMalformed, err) } for h, n := range supportedDigestAlgorithms { diff --git a/pkg/integrity/dsse.go b/pkg/integrity/dsse.go index 79dcbe1..18a403c 100644 --- a/pkg/integrity/dsse.go +++ b/pkg/integrity/dsse.go @@ -129,7 +129,7 @@ func (de *dsseDecoder) verifyMessage(r io.Reader, h crypto.Hash, vr *VerifyResul vr.aks, err = v.Verify(context.TODO(), &e) if err != nil { - return nil, fmt.Errorf("%w: %v", errDSSEVerifyEnvelopeFailed, err) + return nil, fmt.Errorf("%w: %w", errDSSEVerifyEnvelopeFailed, err) } if e.PayloadType != de.payloadType {