certinfo

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTLSConnection = errors.New("URL is not a TLS connection")
	ErrUnparseableFile = errors.New("unparseable file")
)

errors

Functions

This section is empty.

Types

type CertInfo

type CertInfo struct {
	TimeFormat string // time format to use
	// contains filtered or unexported fields
}

CertInfo is the struct used to query and return the certificate/s information

func NewFromBytes

func NewFromBytes(certBytes []byte) (certInfo CertInfo, err error)

NewFromBytes returns a CertInfo from a certificate bytes

func NewFromFile

func NewFromFile(filename string) (certinfo CertInfo, err error)

NewFromFile returns a CertInfo from a certificate file

func NewFromURL

func NewFromURL(uri string, timeout int64, insecure bool) (certInfo CertInfo, err error)

NewFromURL returns a CertInfo struct for a URL

func (*CertInfo) Certificates

func (c *CertInfo) Certificates() []*x509.Certificate

Certificates returns the array of certificates

func (*CertInfo) Show

func (c *CertInfo) Show(markdown, csv bool)

Show returns the information of the certificates formatted as table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL