From c5b1105fc1b6f13a0d155d3bfe4c7d5a1348d765 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 30 Jan 2019 15:20:58 +0300 Subject: [PATCH] /tls/status -- Expand random stubs for separate statuses of certificate and key --- control.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/control.go b/control.go index c6e518ea..627007d7 100644 --- a/control.go +++ b/control.go @@ -1034,13 +1034,17 @@ func handleTLSStatus(w http.ResponseWriter, r *http.Request) { tlsConfig `json:",inline"` // only for API, no need to be stored in config - Status string `yaml:"-" json:"status,omitempty"` - Warning string `yaml:"-" json:"warning,omitempty"` + StatusCertificate string `yaml:"-" json:"status_cert,omitempty"` + StatusKey string `yaml:"-" json:"status_key,omitempty"` + Warning string `yaml:"-" json:"warning,omitempty"` }{ tlsConfig: config.TLS, } if rand.Intn(2) == 0 { - data.Status = fmt.Sprintf("Random status #%s", RandStringBytesMaskImpr(6)) + data.StatusCertificate = fmt.Sprintf("Random certificate status #%s", RandStringBytesMaskImpr(6)) + } + if rand.Intn(2) == 0 { + data.StatusKey = fmt.Sprintf("Random key status #%s", RandStringBytesMaskImpr(6)) } if rand.Intn(2) == 0 { data.Warning = fmt.Sprintf("Random warning #%s", RandStringBytesMaskImpr(6))