sclib

package
v0.0.0-...-3ae0981 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2015 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertGrabber

func CertGrabber(uri string, queue chan *CertificateInfo)

Grab a certificate from the given uri and send it down a channel to be processed Then report our exit to the main thread using another channel This is intended to be run via a goroutine

func GenerateReport

func GenerateReport(certs CertificateInfoList, warningsOnly bool) string

Given a Certificates list, create a tabular report of the relevant information in string format

func GetCerts

func GetCerts(host string, port int) *x509.Certificate

Give a hostname and a port grab the certificate for the service running there

func GetExpireDays

func GetExpireDays(then time.Time) int

Get the number days until a certificate expires Calculated based on the time.Time the certificate expires

func IsExpired

func IsExpired(then time.Time) bool

Given a time.Time struct check to see if the current time is after it

func MailReport

func MailReport(report, to_addr string)

Give a report (just a string) and an adresss to send it to Send that report out via email

Types

type CertificateInfo

type CertificateInfo struct {
	// contains filtered or unexported fields
}

type CertificateInfoList

type CertificateInfoList []*CertificateInfo

func (CertificateInfoList) Len

func (c CertificateInfoList) Len() int

The Len function for CertificateInfoList used as part of the implementation of sort.Interface

func (CertificateInfoList) Less

func (c CertificateInfoList) Less(i, j int) bool

Calculate the order of 2 CertificateInfoList in a CertificateInfoList list used as part of the implementation of sort.Interface

func (CertificateInfoList) Swap

func (c CertificateInfoList) Swap(i, j int)

Swap 2 elements in a CertificateInfoList type used as part of the implementation of sort.Interface

Jump to

Keyboard shortcuts

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