Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultTLSPort = 443
DefaultTLSPort is the well-known port for TLS (HTTPS).
View Source
const (
ErrTLSHandshakeFailed greet.ErrorCode = "tls_handshake_failed"
)
View Source
const ProtocolName = "tls"
ProtocolName is the registered name for the TLS protocol.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertChainEntry ¶
type CertChainEntry struct {
Subject string `json:"subject"`
Issuer string `json:"issuer"`
Serial string `json:"serial"`
NotBefore string `json:"not_before"`
NotAfter string `json:"not_after"`
Version int `json:"version"`
DNSNames []string `json:"dns_names,omitempty"`
IPAddresses []string `json:"ip_addresses,omitempty"`
IsCA bool `json:"is_ca"`
SignatureAlgo string `json:"signature_algo"`
PublicKeyAlgo string `json:"public_key_algo"`
SHA256Fingerprint string `json:"sha256_fingerprint"`
// Status holds Chrome-style CERT_ checks for this individual certificate.
// ref: https://github.com/chromium/chromium/blob/main/net/cert/cert_status_flags.cc
Status []string `json:"status"`
}
CertChainEntry holds the details of a single certificate in the chain.
type TLS ¶
type TLS struct{}
TLS implements a TLS connectivity and certificate probe. It connects via TLS with InsecureSkipVerify, extracts the leaf certificate, and reports Chrome-style CERT_ status checks.
func (*TLS) DefaultPort ¶
func (*TLS) Description ¶
type TLSResult ¶
type TLSResult struct {
// CertChain contains all presented certificates sorted from leaf to root.
// The leaf certificate is always CertChain[0].
CertChain []CertChainEntry `json:"cert_chain"`
// Status is the final concluded chain status. It holds the statuses from
// the first certificate (walking leaf→root) that has a non-OK check, or
// ["OK"] if every certificate in the chain passes all checks.
Status []string `json:"status"`
}
TLSResult holds the full certificate chain and the concluded chain status from a TLS handshake.
Click to show internal directories.
Click to hide internal directories.