chain

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package chain validates X.509 certificate chains for trust issues.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePEMBundle

func ParsePEMBundle(data []byte) ([]*x509.Certificate, error)

ParsePEMBundle decodes all CERTIFICATE PEM blocks from data.

Types

type ValidationResult

type ValidationResult struct {
	Errors []string
	Chain  []*x509.Certificate
}

ValidationResult holds the outcome of chain validation.

func ValidateChain

func ValidateChain(chain []*x509.Certificate, hostname string, now time.Time) ValidationResult

ValidateChain checks a certificate chain for common trust issues. chain[0] is the leaf. hostname is optional; if non-empty, SAN matching is checked.

Jump to

Keyboard shortcuts

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