tls

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tls provides the JSON-serializable model and mapper for the TLS layer's result. It registers itself with the jsonapi registry via init().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromResult

func FromResult(data greet.LayerData) any

FromResult maps a tls.TLSResult to its JSON representation.

func Register

func Register(c *jsonapi.Codec)

Register registers the TLS data mapper on the given Codec.

Types

type CertChainEntry

type CertChainEntry struct {
	Subject           string   `json:"subject"`
	Issuer            string   `json:"issuer"`
	Serial            string   `json:"serial"`
	NotBefore         string   `json:"notBefore"`
	NotAfter          string   `json:"notAfter"`
	Version           int      `json:"version"`
	DNSNames          []string `json:"dnsNames,omitempty"`
	IPAddresses       []string `json:"ipAddresses,omitempty"`
	IsCA              bool     `json:"isCa"`
	SignatureAlgo     string   `json:"signatureAlgo"`
	PublicKeyAlgo     string   `json:"publicKeyAlgo"`
	SHA256Fingerprint string   `json:"sha256Fingerprint"`
	Status            []string `json:"status"`
}

CertChainEntry is the JSON-serializable form of a single certificate.

type Data

type Data struct {
	CertChain []CertChainEntry `json:"certChain"`
	Status    []string         `json:"status"`
}

Data is the JSON-serializable payload for a TLS layer.

Jump to

Keyboard shortcuts

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