Merge branch '15370-loopback-dispatchcloud'
[arvados.git] / lib / dispatchcloud / worker / verify.go
index 4e6ee86c6b0d2749b06bd104bf5ba7304e490094..559bb28973d27fc81662a262a00cefe5e020627c 100644 (file)
@@ -32,7 +32,9 @@ func (tv TagVerifier) InitCommand() cloud.InitCommand {
 }
 
 func (tv TagVerifier) VerifyHostKey(pubKey ssh.PublicKey, client *ssh.Client) error {
-       tv.ReportVerified(tv.Instance)
+       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.