Skip to content

Commit

Permalink
Added backport comments as reference
Browse files Browse the repository at this point in the history
  • Loading branch information
wneessen committed Jan 13, 2023
1 parent 8559e8c commit 2950f22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smtp/auth_cram_md5_118.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func (a *cramMD5Auth) Start(_ *ServerInfo) (string, []byte, error) {
return "CRAM-MD5", nil, nil
}

// Backport of: https://github.com/golang/go/commit/58158e990f272774e615c9abd8662bf0198c29aa#diff-772fc9f5d0c86f26e35158fb3e7a71a4967d18b4ec23a5dbb60781ab0babf426
// to guarantee backwards compatiblity with Go 1.16-1.18
func (a *cramMD5Auth) Next(fromServer []byte, more bool) ([]byte, error) {
if more {
d := hmac.New(md5.New, []byte(a.secret))
Expand Down
3 changes: 3 additions & 0 deletions smtp/smtp_ehlo_117.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import "strings"

// ehlo sends the EHLO (extended hello) greeting to the server. It
// should be the preferred greeting for servers that support it.
//
// Backport of: https://github.com/golang/go/commit/4d8db00641cc9ff4f44de7df9b8c4f4a4f9416ee#diff-4f6f6bdb9891d4dd271f9f31430420a2e44018fe4ee539576faf458bebb3cee4
// to guarantee backwards compatiblity with Go 1.16/1.17:w
func (c *Client) ehlo() error {
_, msg, err := c.cmd(250, "EHLO %s", c.localName)
if err != nil {
Expand Down

0 comments on commit 2950f22

Please sign in to comment.