ProtonMail/gopenpgp

Upgrade from 2.4.10 to 2.5.1 breaks my project: not enough arguments in call to packet.SerializeSymmetricallyEncrypted

meshenka opened this issue · 6 comments

# github.com/ProtonMail/gopenpgp/v2/crypto
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.5.1/crypto/sessionkey.go:242:105: not enough arguments in call to packet.SerializeSymmetricallyEncrypted
	have (io.Writer, packet.CipherFunction, []byte, *packet.Config)
	want (io.Writer, packet.CipherFunction, bool, packet.CipherSuite, []byte, *packet.Config)

I think you might be using a version of github.com/ProtonMail/go-crypto which is more recent than the one used in gopenpgp

nice i will give it a try!

this issue come with 2.5.0

Same for me (go-sendxmpp):

go get -u .
go: downloading github.com/ProtonMail/gopenpgp/v2 v2.5.1
go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230124153114-0acdc8ae009b
go: downloading github.com/stretchr/testify v1.7.0
go: upgraded github.com/ProtonMail/go-crypto v0.0.0-20230117203413-a47887b8f098 => v0.0.0-20230124153114-0acdc8ae009b
go: upgraded github.com/ProtonMail/gopenpgp/v2 v2.5.0 => v2.5.1
go build .
# github.com/ProtonMail/gopenpgp/v2/crypto
../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.5.1/crypto/sessionkey.go:242:105: not enough arguments in call to packet.SerializeSymmetricallyEncrypted
	have (io.Writer, packet.CipherFunction, []byte, *packet.Config)
	want (io.Writer, packet.CipherFunction, bool, packet.CipherSuite, []byte, *packet.Config)

This is independent of the version of gopenpgp, it comes from a breaking change upstream in go-crypto.

  • Either you can sync up the dependencies in your go.mod and use the same go-crypto we have in our go.mod instead of picking latest
  • Or use the latest go-crypto, we just merged #211. We'll release a version soon.