From 08834ca511ad374745db57c96da8d842b03ab46a Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 26 Jul 2020 06:01:12 -0400 Subject: [PATCH] upgrade golang.org/x/crypto --- go.mod | 2 +- go.sum | 2 ++ vendor/golang.org/x/crypto/sha3/xor_unaligned.go | 11 +++++++++++ vendor/golang.org/x/crypto/ssh/terminal/terminal.go | 8 ++++++++ vendor/modules.txt | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 877b0111..5adf1b9c 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/stretchr/testify v1.4.0 // indirect github.com/tidwall/buntdb v1.1.2 github.com/toorop/go-dkim v0.0.0-20200526084421-76378ae5207e - golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 + golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect golang.org/x/text v0.3.2 gopkg.in/yaml.v2 v2.3.0 diff --git a/go.sum b/go.sum index c225bb74..755658f8 100644 --- a/go.sum +++ b/go.sum @@ -59,6 +59,8 @@ github.com/toorop/go-dkim v0.0.0-20200526084421-76378ae5207e/go.mod h1:BzWtXXrXz golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= diff --git a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go index a3d06863..5ede2c61 100644 --- a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go +++ b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go @@ -16,6 +16,17 @@ func (b *storageBuf) asBytes() *[maxRate]byte { return (*[maxRate]byte)(unsafe.Pointer(b)) } +//go:nocheckptr +// +// xorInUnaligned intentionally reads the input buffer as an unaligned slice of +// integers. The language spec is not clear on whether that is allowed. +// See: +// https://golang.org/issue/37644 +// https://golang.org/issue/37298 +// https://golang.org/issue/35381 + +// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a +// XOR buf. func xorInUnaligned(d *state, buf []byte) { n := len(buf) bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8] diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index d1b4fca3..2ffb97bf 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -113,6 +113,7 @@ func NewTerminal(c io.ReadWriter, prompt string) *Terminal { } const ( + keyCtrlC = 3 keyCtrlD = 4 keyCtrlU = 21 keyEnter = '\r' @@ -151,8 +152,12 @@ func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { switch b[0] { case 1: // ^A return keyHome, b[1:] + case 2: // ^B + return keyLeft, b[1:] case 5: // ^E return keyEnd, b[1:] + case 6: // ^F + return keyRight, b[1:] case 8: // ^H return keyBackspace, b[1:] case 11: // ^K @@ -738,6 +743,9 @@ func (t *Terminal) readLine() (line string, err error) { return "", io.EOF } } + if key == keyCtrlC { + return "", io.EOF + } if key == keyPasteStart { t.pasteActive = true if len(t.line) == 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 212b3600..272e9fa9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -52,7 +52,7 @@ github.com/tidwall/tinyqueue # github.com/toorop/go-dkim v0.0.0-20200526084421-76378ae5207e ## explicit github.com/toorop/go-dkim -# golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 +# golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 ## explicit golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish