Просмотр исходного кода

Add SSH certificate logging to renew and rekey too

Herman Slatman 3 лет назад
Родитель
Сommit
4c56877d97
4 измененных файлов с 4 добавлено и 0 удалено
  1. 1 0
      api/sign.go
  2. 1 0
      api/ssh.go
  3. 1 0
      api/sshRekey.go
  4. 1 0
      api/sshRenew.go

+ 1 - 0
api/sign.go

@@ -88,6 +88,7 @@ func Sign(w http.ResponseWriter, r *http.Request) {
 	if len(certChainPEM) > 1 {
 		caPEM = certChainPEM[1]
 	}
+
 	LogCertificate(w, certChain[0])
 	render.JSONStatus(w, &SignResponse{
 		ServerPEM:    certChainPEM[0],

+ 1 - 0
api/ssh.go

@@ -337,6 +337,7 @@ func SSHSign(w http.ResponseWriter, r *http.Request) {
 		}
 		identityCertificate = certChainToPEM(certChain)
 	}
+
 	LogSSHCertificate(w, cert)
 	render.JSONStatus(w, &SSHSignResponse{
 		Certificate:         SSHCertificate{cert},

+ 1 - 0
api/sshRekey.go

@@ -89,6 +89,7 @@ func SSHRekey(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	LogSSHCertificate(w, newCert)
 	render.JSONStatus(w, &SSHRekeyResponse{
 		Certificate:         SSHCertificate{newCert},
 		IdentityCertificate: identity,

+ 1 - 0
api/sshRenew.go

@@ -81,6 +81,7 @@ func SSHRenew(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	LogSSHCertificate(w, newCert)
 	render.JSONStatus(w, &SSHSignResponse{
 		Certificate:         SSHCertificate{newCert},
 		IdentityCertificate: identity,