@@ -337,7 +337,7 @@ func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
337
337
return fmt .Errorf ("ssh: remote address %v is not allowed because of source-address restriction" , addr )
338
338
}
339
339
340
- func gssExchangeToken (gssapiConfig * GSSAPIWithMICConfig , firstToken []byte , s * connection ,
340
+ func gssExchangeToken (gssapiConfig * GSSAPIWithMICConfig , token []byte , s * connection ,
341
341
sessionID []byte , userAuthReq userAuthRequestMsg ) (authErr error , perms * Permissions , err error ) {
342
342
gssAPIServer := gssapiConfig .Server
343
343
defer gssAPIServer .DeleteSecContext ()
@@ -347,7 +347,7 @@ func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *c
347
347
outToken []byte
348
348
needContinue bool
349
349
)
350
- outToken , srcName , needContinue , err = gssAPIServer .AcceptSecContext (firstToken )
350
+ outToken , srcName , needContinue , err = gssAPIServer .AcceptSecContext (token )
351
351
if err != nil {
352
352
return err , nil , nil
353
353
}
@@ -369,6 +369,7 @@ func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *c
369
369
if err := Unmarshal (packet , userAuthGSSAPITokenReq ); err != nil {
370
370
return nil , nil , err
371
371
}
372
+ token = userAuthGSSAPITokenReq .Token
372
373
}
373
374
packet , err := s .transport .readPacket ()
374
375
if err != nil {
0 commit comments