aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/crypto/ssh/mac.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-01 21:33:58 -0500
committerUnknwon <u@gogs.io>2017-03-01 21:33:58 -0500
commit600f748cb0a77370bb5533ed38c01e40fbcf11bb (patch)
tree926360afed004b146fd0b5b568163f694dd49c8f /vendor/golang.org/x/crypto/ssh/mac.go
parent038b107c3d6437f7ac4d7e22e574c583b546f132 (diff)
vendor: update golang.org/x/crypto/ssh
Related to #4160
Diffstat (limited to 'vendor/golang.org/x/crypto/ssh/mac.go')
-rw-r--r--vendor/golang.org/x/crypto/ssh/mac.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/golang.org/x/crypto/ssh/mac.go b/vendor/golang.org/x/crypto/ssh/mac.go
index 07744ad6..c07a0628 100644
--- a/vendor/golang.org/x/crypto/ssh/mac.go
+++ b/vendor/golang.org/x/crypto/ssh/mac.go
@@ -15,6 +15,7 @@ import (
type macMode struct {
keySize int
+ etm bool
new func(key []byte) hash.Hash
}
@@ -45,13 +46,16 @@ func (t truncatingMAC) Size() int {
func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() }
var macModes = map[string]*macMode{
- "hmac-sha2-256": {32, func(key []byte) hash.Hash {
+ "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash {
return hmac.New(sha256.New, key)
}},
- "hmac-sha1": {20, func(key []byte) hash.Hash {
+ "hmac-sha2-256": {32, false, func(key []byte) hash.Hash {
+ return hmac.New(sha256.New, key)
+ }},
+ "hmac-sha1": {20, false, func(key []byte) hash.Hash {
return hmac.New(sha1.New, key)
}},
- "hmac-sha1-96": {20, func(key []byte) hash.Hash {
+ "hmac-sha1-96": {20, false, func(key []byte) hash.Hash {
return truncatingMAC{12, hmac.New(sha1.New, key)}
}},
}