@@ -28,7 +28,7 @@ type keyingTransport interface {
2828 // prepareKeyChange sets up a key change. The key change for a
2929 // direction will be effected if a msgNewKeys message is sent
3030 // or received.
31- prepareKeyChange (* algorithms , * kexResult ) error
31+ prepareKeyChange (* Algorithms , * kexResult ) error
3232}
3333
3434// handshakeTransport implements rekeying on top of a keyingTransport
@@ -68,7 +68,7 @@ type handshakeTransport struct {
6868 mu sync.Mutex
6969 cond * sync.Cond
7070 sentInitPacket []byte
71- sentInitMsg * kexInitMsg
71+ sentInitMsg * KexInitMsg
7272 writtenSinceKex uint64
7373 writeError error
7474
@@ -264,7 +264,7 @@ func (t *handshakeTransport) requestKeyChange() error {
264264
265265// sendKexInitLocked sends a key change message. t.mu must be locked
266266// while this happens.
267- func (t * handshakeTransport ) sendKexInitLocked (isFirst keyChangeCategory ) (* kexInitMsg , []byte , error ) {
267+ func (t * handshakeTransport ) sendKexInitLocked (isFirst keyChangeCategory ) (* KexInitMsg , []byte , error ) {
268268 // kexInits may be sent either in response to the other side,
269269 // or because our side wants to initiate a key change, so we
270270 // may have already sent a kexInit. In that case, don't send a
@@ -273,7 +273,7 @@ func (t *handshakeTransport) sendKexInitLocked(isFirst keyChangeCategory) (*kexI
273273 return t .sentInitMsg , t .sentInitPacket , nil
274274 }
275275
276- msg := & kexInitMsg {
276+ msg := & KexInitMsg {
277277 KexAlgos : t .config .KeyExchanges ,
278278 CiphersClientServer : t .config .Ciphers ,
279279 CiphersServerClient : t .config .Ciphers ,
@@ -352,7 +352,7 @@ func (t *handshakeTransport) enterKeyExchangeLocked(otherInitPacket []byte) erro
352352 }
353353 }
354354
355- otherInit := & kexInitMsg {}
355+ otherInit := & KexInitMsg {}
356356 if err := Unmarshal (otherInitPacket , otherInit ); err != nil {
357357 return err
358358 }
@@ -403,12 +403,12 @@ func (t *handshakeTransport) enterKeyExchangeLocked(otherInitPacket []byte) erro
403403 }
404404 }
405405
406- kex , ok := kexAlgoMap [algs .kex ]
406+ kex , ok := kexAlgoMap [algs .Kex ]
407407 if ! ok {
408- return fmt .Errorf ("ssh: unexpected key exchange algorithm %v" , algs .kex )
408+ return fmt .Errorf ("ssh: unexpected key exchange algorithm %v" , algs .Kex )
409409 }
410410
411- kex = kex .GetNew (algs .kex )
411+ kex = kex .GetNew (algs .Kex )
412412
413413 if t .config .ConnLog != nil {
414414 t .config .ConnLog .DHKeyExchange = kex
@@ -447,10 +447,10 @@ func (t *handshakeTransport) enterKeyExchangeLocked(otherInitPacket []byte) erro
447447 return nil
448448}
449449
450- func (t * handshakeTransport ) server (kex kexAlgorithm , algs * algorithms , magics * handshakeMagics ) (* kexResult , error ) {
450+ func (t * handshakeTransport ) server (kex kexAlgorithm , algs * Algorithms , magics * handshakeMagics ) (* kexResult , error ) {
451451 var hostKey Signer
452452 for _ , k := range t .hostKeys {
453- if algs .hostKey == k .PublicKey ().Type () {
453+ if algs .HostKey == k .PublicKey ().Type () {
454454 hostKey = k
455455 }
456456 }
@@ -459,7 +459,7 @@ func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *
459459 return r , err
460460}
461461
462- func (t * handshakeTransport ) client (kex kexAlgorithm , algs * algorithms , magics * handshakeMagics ) (* kexResult , error ) {
462+ func (t * handshakeTransport ) client (kex kexAlgorithm , algs * Algorithms , magics * handshakeMagics ) (* kexResult , error ) {
463463 result , err := kex .Client (t .conn , t .config .Rand , magics , t .config )
464464 if err != nil {
465465 return nil , err
0 commit comments