X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6d7efab2c4bffa3fabd55b166e44cca8ac1391f..d6598fd6339e6219a7103781433356dfde546527:/lib/dispatchcloud/worker/verify.go diff --git a/lib/dispatchcloud/worker/verify.go b/lib/dispatchcloud/worker/verify.go index 597950fca6..559bb28973 100644 --- a/lib/dispatchcloud/worker/verify.go +++ b/lib/dispatchcloud/worker/verify.go @@ -23,7 +23,8 @@ var ( type TagVerifier struct { cloud.Instance - Secret string + Secret string + ReportVerified func(cloud.Instance) } func (tv TagVerifier) InitCommand() cloud.InitCommand { @@ -31,6 +32,9 @@ func (tv TagVerifier) InitCommand() cloud.InitCommand { } func (tv TagVerifier) VerifyHostKey(pubKey ssh.PublicKey, client *ssh.Client) error { + if tv.ReportVerified != nil { + tv.ReportVerified(tv.Instance) + } if err := tv.Instance.VerifyHostKey(pubKey, client); err != cloud.ErrNotImplemented || tv.Secret == "" { // If the wrapped instance indicates it has a way to // verify the key, return that decision.