Skip to content

Commit 3e89c67

Browse files
feat: Show ssh signature algorithm.
1 parent f8c8a28 commit 3e89c67

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cmd/columns_sshcerts.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ func getSshColumns() []tSshColumn {
8383
contentEscapeMD: true,
8484
},
8585

86+
tSshColumn{
87+
isShown: func(tc tConfig) bool { return tc.showSignatureAlgorithm },
88+
title: func() string { return "Algorithm" }, // Static title.
89+
titleColor: color.Bold,
90+
91+
contentSource: func(x tSshCertificateWithRevocation, _ tConfig) string {
92+
return x.SshCertificate.Signature.Format
93+
},
94+
95+
contentColor: func(_ tSshCertificateWithRevocation) color.Attribute { return color.FgWhite }, // Static color.
96+
contentAlignMD: ALIGN_LEFT,
97+
contentEscapeMD: true,
98+
},
99+
86100
tSshColumn{
87101
isShown: func(_ tConfig) bool { return true }, // Always shown.
88102
title: func() string { return "Start" }, // Static title.

cmd/command_sshcerts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func init() {
6161
sshCertsCmd.Flags().BoolVar(&config.showHostType, "type", true, "host type column shown")
6262
sshCertsCmd.Flags().BoolVar(&config.showSerial, "serial", true, "serial column shown")
6363
sshCertsCmd.Flags().BoolVar(&config.showKeyId, "keyid", false, "key id column shown")
64+
sshCertsCmd.Flags().BoolVar(&config.showSignatureAlgorithm, "algorithm", false, "signature algorithm column shown")
6465
}
6566

6667
/*

0 commit comments

Comments
 (0)