go.crypto: revert 7f5a59ff6b43.
This change reverts https://golang.org/cl/10113043/ because some folks are stuck on 1.0 till 1.1.1 comes out. R=golang-dev CC=golang-dev https://golang.org/cl/10151043
This commit is contained in:
Родитель
eca6c1626e
Коммит
aa0f5b4081
|
@ -250,6 +250,8 @@ func readToNextPublicKey(packets *packet.Reader) (err error) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// ReadEntity reads an entity (public key, identities, subkeys etc) from the
|
||||
|
|
|
@ -272,6 +272,8 @@ func consumeAll(r io.Reader) (n int64, err error) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// packetType represents the numeric ids of the different OpenPGP packet types. See
|
||||
|
|
|
@ -318,6 +318,7 @@ func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err erro
|
|||
default:
|
||||
panic("shouldn't happen")
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// keySignatureHash returns a Hash of the message that needs to be signed for
|
||||
|
|
|
@ -340,6 +340,8 @@ func (c *serverChan) read(data []byte) (n int, err error, windowAdjustment uint3
|
|||
|
||||
c.cond.Wait()
|
||||
}
|
||||
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// getWindowSpace takes, at most, max bytes of space from the peer's window. It
|
||||
|
|
|
@ -286,6 +286,7 @@ func (p *publickeyAuth) confirmKeyAck(key interface{}, t *transport) (bool, erro
|
|||
return false, UnexpectedMessageError{msgUserAuthSuccess, packet[0]}
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
func (p *publickeyAuth) method() string {
|
||||
|
@ -324,6 +325,7 @@ func handleAuthResponse(t *transport) (bool, []string, error) {
|
|||
return false, nil, UnexpectedMessageError{msgUserAuthSuccess, packet[0]}
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// ClientAuthKeyring returns a ClientAuth using public key authentication via
|
||||
|
|
|
@ -730,6 +730,8 @@ func (s *ServerConn) Accept() (Channel, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// A Listener implements a network listener (net.Listener) for SSH connections.
|
||||
|
|
|
@ -77,4 +77,5 @@ func (ss *ServerTerminal) ReadLine() (line string, err error) {
|
|||
ss.Channel.AckRequest(ok)
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ func dial(handler serverType, t *testing.T) *ClientConn {
|
|||
handler(ch.(*serverChan), t)
|
||||
}()
|
||||
}
|
||||
<-done
|
||||
}()
|
||||
|
||||
config := &ClientConfig{
|
||||
|
|
|
@ -139,6 +139,7 @@ func (t *transport) readPacket() ([]byte, error) {
|
|||
return packet, nil
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// Encrypt and send a packet of data to the remote peer.
|
||||
|
|
Загрузка…
Ссылка в новой задаче