提交 06c83445 作者: Juan Batiz-Benet

Merge pull request #1028 from torarnv/extend-peer-handshake-logging

Extend logging when peer handshake detects clashing/same keys
......@@ -248,6 +248,8 @@ func (s *secureSession) handshake(ctx context.Context, insecure io.ReadWriter) e
k1, k2 = k2, k1 // swap
default:
log.Error("WOAH: same keys (AND same nonce: 1/(2^128) chance!).")
log.Errorf("k1: %v, k2: %v, insecure: %v, insecureM %v", k1, k2, s.insecure, s.insecureM)
// this shouldn't happen. must determine order another way.
// use the same keys but, make sure to copy underlying data!
copy(k2.IV, k1.IV)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论