Merge pull request #211 from ProtonMail/upgrade-go-crypto

Upgrade go crypto and adapt SEIPD
This commit is contained in:
Aron Wussler 2023-01-26 12:04:56 +01:00 committed by GitHub
commit a896ae4ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View file

@ -239,7 +239,15 @@ func encryptStreamWithSessionKey(
signEntity *openpgp.Entity,
config *packet.Config,
) (encryptWriter, signWriter io.WriteCloser, err error) {
encryptWriter, err = packet.SerializeSymmetricallyEncrypted(dataPacketWriter, config.Cipher(), sk.Key, config)
encryptWriter, err = packet.SerializeSymmetricallyEncrypted(
dataPacketWriter,
config.Cipher(),
config.AEAD() != nil,
packet.CipherSuite{Cipher: config.Cipher(), Mode: config.AEAD().Mode()},
sk.Key,
config,
)
if err != nil {
return nil, nil, errors.Wrap(err, "gopenpgp: unable to encrypt")
}

2
go.mod
View file

@ -3,7 +3,7 @@ module github.com/ProtonMail/gopenpgp/v2
go 1.15
require (
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4
github.com/ProtonMail/go-crypto v0.0.0-20230124153114-0acdc8ae009b
github.com/ProtonMail/go-mime v0.0.0-20221031134845-8fd9bc37cf08
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pkg/errors v0.9.1

5
go.sum
View file

@ -1,6 +1,7 @@
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I=
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8=
github.com/ProtonMail/go-crypto v0.0.0-20230124153114-0acdc8ae009b h1:1DHH9haxfhaVM8owXQjLdn7UP4AkDfzSdiRoLdcSCqE=
github.com/ProtonMail/go-crypto v0.0.0-20230124153114-0acdc8ae009b/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
github.com/ProtonMail/go-mime v0.0.0-20221031134845-8fd9bc37cf08 h1:dS7r5z4iGS0qCjM7UwWdsEMzQesUQbGcXdSm2/tWboA=
github.com/ProtonMail/go-mime v0.0.0-20221031134845-8fd9bc37cf08/go.mod h1:qRZgbeASl2a9OwmsV85aWwRqic0NHPh+9ewGAzb4cgM=
github.com/ProtonMail/go-mobile v0.0.0-20210326110230-f181c70e4e2b h1:XVeh08xp93T+xK6rzpCSQTZ+LwEo+ASHvOifrQ5ZgEE=