TUN-2754: Add ConnDigest to cloudflared and its RPCs

This commit is contained in:
Adam Chalmers
2020-03-05 15:20:12 -06:00
parent 6b3e2b020b
commit d50fee4fa0
6 changed files with 493 additions and 252 deletions

View File

@@ -93,6 +93,8 @@ type ReconnectTunnelCredentialManager interface {
ReconnectToken() ([]byte, error)
EventDigest() ([]byte, error)
SetEventDigest(eventDigest []byte)
ConnDigest() ([]byte, error)
SetConnDigest(connDigest []byte)
}
type dupConnRegisterTunnelError struct{}
@@ -380,6 +382,7 @@ func RegisterTunnel(
return processRegisterTunnelError(registrationErr, config.Metrics, register)
}
credentialManager.SetEventDigest(registration.EventDigest)
credentialManager.SetConnDigest(registration.ConnDigest)
return processRegistrationSuccess(config, logger, connectionID, registration, register)
}