Remove empty lines on debug information

At the start of step-ca some information about the CA is displayed,
this change remove extra lines when displaying the ssh public keys.
pull/993/head
Mariano Cano 2 years ago
parent 87f28a7ec9
commit a8819376d3

@ -1,6 +1,7 @@
package ca
import (
"bytes"
"context"
"crypto/tls"
"crypto/x509"
@ -342,10 +343,10 @@ func (ca *CA) Run() error {
log.Printf("X.509 Root Fingerprint: %s", x509util.Fingerprint(crt))
}
if authorityInfo.SSHCAHostPublicKey != nil {
log.Printf("SSH Host CA Key: %s\n", authorityInfo.SSHCAHostPublicKey)
log.Printf("SSH Host CA Key: %s\n", bytes.TrimSpace(authorityInfo.SSHCAHostPublicKey))
}
if authorityInfo.SSHCAUserPublicKey != nil {
log.Printf("SSH User CA Key: %s\n", authorityInfo.SSHCAUserPublicKey)
log.Printf("SSH User CA Key: %s\n", bytes.TrimSpace(authorityInfo.SSHCAUserPublicKey))
}
}

Loading…
Cancel
Save