hitrssl

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Version of package

Variables

This section is empty.

Functions

func GetAllAddrs added in v1.2.0

func GetAllAddrs() []string

GetAllAddrs gives out all cached addresses

func SetAddr added in v1.2.0

func SetAddr(addr string, ssl SSL) error

SetAddr sets the cache value of the given key

Types

type Chain

type Chain struct {
	Subject            *NameDetails `json:"subject,omitempty"`
	Issuer             *NameDetails `json:"issuer,omitempty"`
	SerialNumber       *big.Int     `json:"serial_number,omitempty"`
	SerialNumberHex    string       `json:"serial_number_hex,omitempty"`
	SignatureAlgorithm string       `json:"signature_algorithm,omitempty"`
	IsCA               bool         `json:"is_ca,omitempty"`
}

Chain is mainly storing certificate details such as Issuer, SerialNumber, etc

type NameDetails

type NameDetails struct {
	CommonName         string   `json:"common_name,omitempty"`
	Country            []string `json:"country,omitempty"`
	Organization       []string `json:"organization,omitempty"`
	OrganizationalUnit []string `json:"organizational_unit,omitempty"`
	PostalCode         []string `json:"postal_code,omitempty"`
	Province           []string `json:"province,omitempty"`
	StreetAddress      []string `json:"street_address,omitempty"`
}

NameDetails are for more details about Issuer or Subject

type SSL

type SSL struct {
	AddrString string       `json:"addr_string"`
	RemoteAddr *net.TCPAddr `json:"-"`
	CommonName string       `json:"common_name,omitempty"`
	DNSNames   []string     `json:"dns_names,omitempty"`
	ValidFrom  time.Time    `json:"valid_from,omitempty"`
	ValidTill  time.Time    `json:"valid_till,omitempty"`
	Chains     []*Chain     `json:"chains"`
	Status     bool         `json:"status"`
	Err        error        `json:"err,omitempty"`
}

SSL Struct for storing details about the SSL Certificate Query

func GetAddr added in v1.2.0

func GetAddr(addr string) SSL

GetAddr gives out cached address

func (*SSL) Check

func (s *SSL) Check(d *net.Dialer) error

Check method checks the SSL Object's AddrString and validates it

func (*SSL) Copy added in v1.2.0

func (s *SSL) Copy(c SSL)

func (*SSL) PrettyPrint

func (s *SSL) PrettyPrint()

PrettyPrint method to just print the SSL Object in readable form

Jump to

Keyboard shortcuts

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