mirror of https://github.com/status-im/consul.git
fips oss version changes (#17500)
This commit is contained in:
parent
e1df0f28bd
commit
0944f71457
|
@ -49,6 +49,10 @@ func (_ *prettyFormatter) Format(info *VersionInfo) (string, error) {
|
|||
|
||||
buffer.WriteString(fmt.Sprintf("Build Date %s\n", info.BuildDate.Format(time.RFC3339)))
|
||||
|
||||
if info.FIPS != "" {
|
||||
buffer.WriteString(fmt.Sprintf("FIPS: %s\n", info.FIPS))
|
||||
}
|
||||
|
||||
var supplement string
|
||||
if info.RPC.Default < info.RPC.Max {
|
||||
supplement = fmt.Sprintf(" (agent will automatically use protocol >%d when speaking to compatible agents)",
|
||||
|
|
|
@ -9,10 +9,11 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/mitchellh/cli"
|
||||
|
||||
"github.com/hashicorp/consul/agent/consul"
|
||||
"github.com/hashicorp/consul/command/flags"
|
||||
"github.com/hashicorp/consul/version"
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
func New(ui cli.Ui) *cmd {
|
||||
|
@ -50,6 +51,7 @@ type VersionInfo struct {
|
|||
Version string
|
||||
Revision string
|
||||
Prerelease string
|
||||
FIPS string `json:",omitempty"`
|
||||
BuildDate time.Time
|
||||
RPC RPCVersionInfo
|
||||
}
|
||||
|
@ -78,6 +80,7 @@ func (c *cmd) Run(args []string) int {
|
|||
Revision: version.GitCommit,
|
||||
Prerelease: version.VersionPrerelease,
|
||||
BuildDate: buildDate,
|
||||
FIPS: version.GetFIPSInfo(),
|
||||
RPC: RPCVersionInfo{
|
||||
Default: consul.DefaultRPCProtocol,
|
||||
Min: int(consul.ProtocolVersionMin),
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
//go:build !fips
|
||||
|
||||
package version
|
||||
|
||||
func GetFIPSInfo() string {
|
||||
return ""
|
||||
}
|
Loading…
Reference in New Issue