return from Dial after conn is forward-secure, unless ConnState is given

This commit is contained in:
Marten Seemann
2017-02-22 16:55:30 +07:00
parent 6f27b7f70d
commit 8bfeb2ea8d
4 changed files with 54 additions and 35 deletions

View File

@@ -36,8 +36,10 @@ type Session interface {
type ConnState int
const (
// ConnStateInitial is the initial state
ConnStateInitial ConnState = iota
// ConnStateVersionNegotiated means that version negotiation is complete
ConnStateVersionNegotiated ConnState = iota
ConnStateVersionNegotiated
// ConnStateSecure means that the connection is encrypted
ConnStateSecure
// ConnStateForwardSecure means that the connection is forward secure