Verified Commit ba6dd4a6 authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Add additional information to info output

parent 7479ba3f
Pipeline #113371649 passed with stage
in 59 seconds
......@@ -7,6 +7,7 @@ import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/urfave/cli"
)
......@@ -51,6 +52,14 @@ func infoAction(c *cli.Context) error {
_, _ = fmt.Fprintf(os.Stdout, "Issuer: %v\n", cert.Issuer)
_, _ = fmt.Fprintf(os.Stdout, "Valid: from %v to %v\n", cert.NotBefore, cert.NotAfter)
_, _ = fmt.Fprintf(os.Stdout, "Issuer URLs: %v\n", cert.IssuingCertificateURL)
_, _ = fmt.Fprintf(os.Stdout, "Version: %v\n", cert.Version)
_, _ = fmt.Fprintf(os.Stdout, "Key usage: %v\n", cert.KeyUsage)
_, _ = fmt.Fprintf(os.Stdout, "Extended key usage: %v\n", cert.ExtKeyUsage)
_, _ = fmt.Fprintf(os.Stdout, "DNS names:\n - %s\n", strings.Join(cert.DNSNames, "\n - "))
_, _ = fmt.Fprintf(os.Stdout, "Public key algorithm: %v\n", cert.PublicKeyAlgorithm)
_, _ = fmt.Fprintf(os.Stdout, "Is CA: %v\n", cert.IsCA)
_, _ = fmt.Fprintf(os.Stdout, "SelfSigned: %v\n", cert.CheckSignatureFrom(cert) == nil)
if chain == nil || len(chain) < 1 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment