diff --git a/sztp-agent/cmd/daemon.go b/sztp-agent/cmd/daemon.go index b69b1b63..93fb1f31 100644 --- a/sztp-agent/cmd/daemon.go +++ b/sztp-agent/cmd/daemon.go @@ -4,6 +4,7 @@ Copyright (C) 2022-2023 Intel Corporation Copyright (c) 2022 Dell Inc, or its subsidiaries. Copyright (C) 2022 Red Hat. */ + // Package cmd implements the CLI commands package cmd diff --git a/sztp-agent/pkg/secureagent/daemon.go b/sztp-agent/pkg/secureagent/daemon.go index 2e540fb9..6159da08 100644 --- a/sztp-agent/pkg/secureagent/daemon.go +++ b/sztp-agent/pkg/secureagent/daemon.go @@ -100,20 +100,13 @@ func (a *Agent) doReportProgress(s ProgressType) error { if s == ProgressTypeBootstrapComplete { // TODO: generate real key here encodedKey := base64.StdEncoding.EncodeToString([]byte("mysshpass")) - p.IetfSztpBootstrapServerInput.SSHHostKeys = struct { - SSHHostKey []struct { - Algorithm string `json:"algorithm"` - KeyData string `json:"key-data"` - } `json:"ssh-host-key,omitempty"` + p.IetfSztpBootstrapServerInput.SSHHostKeys.SSHHostKey = []struct { + Algorithm string `json:"algorithm"` + KeyData string `json:"key-data"` }{ - SSHHostKey: []struct { - Algorithm string `json:"algorithm"` - KeyData string `json:"key-data"` - }{ - { - Algorithm: "ssh-rsa", - KeyData: encodedKey, - }, + { + Algorithm: "ssh-rsa", + KeyData: encodedKey, }, } }