tlscert

package
v0.0.0-...-dbc03d7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadKeyHash

func BadKeyHash(pub any) (bkhash string, ok bool)

func ClassifyIdentity

func ClassifyIdentity(subjectCN, issuerCN string) (vendorHint, serviceTag string, notes []string)

Types

type BadKey

type BadKey struct {
	BKHash  string
	Vendor  string
	Product string
	Device  string
	Kind    string
	Note    string
}

func MatchBadKey

func MatchBadKey(bkhash string) (bk BadKey, ok bool)

type CertInfo

type CertInfo struct {
	Host       string    `json:"host"`
	Port       int       `json:"port"`
	SHA256     string    `json:"sha256"`
	SPKI256    string    `json:"spkiSha256,omitempty"`
	SubjectCN  string    `json:"subjectCn,omitempty"`
	SubjectO   string    `json:"subjectO,omitempty"`
	IssuerCN   string    `json:"issuerCn,omitempty"`
	NotBefore  time.Time `json:"notBefore"`
	NotAfter   time.Time `json:"notAfter"`
	SelfSigned bool      `json:"selfSigned"`
	KeyBits    int       `json:"keyBits,omitempty"`
	Expired    bool      `json:"expired"`

	SharedKeyMatch *KnownDefault `json:"sharedKeyMatch,omitempty"`

	DefaultSubject *KnownDefault `json:"defaultSubject,omitempty"`

	SharedKeyBySPKI *SharedPubKey `json:"sharedKeyBySpki,omitempty"`

	BadKeyMatch *BadKey `json:"badKeyMatch,omitempty"`

	BadKeyHash string `json:"badKeyHash,omitempty"`

	Vendor  string `json:"vendor,omitempty"`
	Product string `json:"product,omitempty"`

	ClientCertRequested bool `json:"clientCertRequested,omitempty"`

	AcceptableCAs []string `json:"acceptableCas,omitempty"`

	TLSVersion  string `json:"tlsVersion,omitempty"`
	CipherSuite string `json:"cipherSuite,omitempty"`

	ALPN string `json:"alpn,omitempty"`

	Findings []string `json:"findings,omitempty"`
}

func Inspect

func Inspect(host string, port int, timeout time.Duration) (*CertInfo, error)

type KnownDefault

type KnownDefault struct {
	Vendor    string
	Product   string
	SHA256    string
	SubjectCN string
	SubjectO  string
	Note      string
}

type SharedPubKey

type SharedPubKey struct {
	SPKI256 string
	Label   string
	Vendors []string
	Note    string
}

Jump to

Keyboard shortcuts

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