Skip to content

Commit

Permalink
Apply review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
larabr authored and twiss committed Jul 12, 2022
1 parent d07eadf commit 487a6ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions openpgp/ecdh/ecdh.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,16 @@ func buildKey(pub *PublicKey, zb []byte, curveOID, fingerprint []byte, stripLead
if _, err := param.Write(algo); err != nil {
return nil, err
}
kdf := pub.KDF.ReplacementKDFParams
if kdf == nil {
if pub.KDF.ReplacementKDFParams != nil {
kdf := pub.KDF.ReplacementKDFParams
if _, err := param.Write(kdf); err != nil {
return nil, err
}
} else {
if err := pub.KDF.serialize(param); err != nil {
return nil, err
}
}
if _, err := param.Write(kdf); err != nil {
return nil, err
}
if _, err := param.Write([]byte("Anonymous Sender ")); err != nil {
return nil, err
}
Expand Down

0 comments on commit 487a6ae

Please sign in to comment.