From a8819376d3169b192f5498be7da6dc0c448b82a1 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 2 Aug 2022 16:05:04 -0700 Subject: [PATCH] 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. --- ca/ca.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ca/ca.go b/ca/ca.go index 7c00bb6b..741593d2 100644 --- a/ca/ca.go +++ b/ca/ca.go @@ -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)) } }