gen

package
v0.0.0-...-ecd8102 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserCAs

func BrowserCAs() ([]*x509.Certificate, error)

func FromAllBrowsers

func FromAllBrowsers() ([]*url.URL, error)

func FromBrowser

func FromBrowser(name string) (urls []*url.URL, err error)

func FromFile

func FromFile(path string) ([]*url.URL, error)

FromFile reads a text file and grabs urls separated by newlines

Types

type CA

type CA struct {
	Certificate *x509.Certificate

	// pre-computed sha256 fingerprint
	Fingerprint string

	// dnsNames represents known fqdns (or wildcards) which this
	// CA has created a certificate for
	DNSNames []string
}

CA holds the x509 certificate representing a signer of another x509 certificate encountered.

func FindCAs

func FindCAs(urls []*url.URL, sysRoots *x509.CertPool) ([]*CA, error)

FindCAs accepts a slice of urls (expected to be "large") and finds all the CA certificates signing the urls.

Only https:// urls are included

URLs are grouped by their full hostname and a connection is established to retrieve a certificate, whose signer is looked up and retrieved.

type CAs

type CAs struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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