mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-16 12:23:01 -06:00
[chore]: Bump golang.org/x/crypto from 0.32.0 to 0.33.0 (#3771)
This commit is contained in:
parent
bb6d2f8ee8
commit
4ac5447ad6
45 changed files with 474 additions and 33 deletions
14
vendor/golang.org/x/crypto/ssh/handshake.go
generated
vendored
14
vendor/golang.org/x/crypto/ssh/handshake.go
generated
vendored
|
|
@ -80,6 +80,7 @@ type handshakeTransport struct {
|
|||
pendingPackets [][]byte // Used when a key exchange is in progress.
|
||||
writePacketsLeft uint32
|
||||
writeBytesLeft int64
|
||||
userAuthComplete bool // whether the user authentication phase is complete
|
||||
|
||||
// If the read loop wants to schedule a kex, it pings this
|
||||
// channel, and the write loop will send out a kex
|
||||
|
|
@ -552,16 +553,25 @@ func (t *handshakeTransport) sendKexInit() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
var errSendBannerPhase = errors.New("ssh: SendAuthBanner outside of authentication phase")
|
||||
|
||||
func (t *handshakeTransport) writePacket(p []byte) error {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
switch p[0] {
|
||||
case msgKexInit:
|
||||
return errors.New("ssh: only handshakeTransport can send kexInit")
|
||||
case msgNewKeys:
|
||||
return errors.New("ssh: only handshakeTransport can send newKeys")
|
||||
case msgUserAuthBanner:
|
||||
if t.userAuthComplete {
|
||||
return errSendBannerPhase
|
||||
}
|
||||
case msgUserAuthSuccess:
|
||||
t.userAuthComplete = true
|
||||
}
|
||||
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
if t.writeError != nil {
|
||||
return t.writeError
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue