certx

package
v0.0.0-...-419c0c3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BestNamedCertificate

func BestNamedCertificate(c *tls.Config, clientHello *tls.ClientHelloInfo) (*tls.Certificate, bool)

BestNamedCertificate Select the best named certificate per the usual behavior if c.GetCertificate is nil, and c.NameToCertificate is not.

func GenerateRootCA

func GenerateRootCA(certPath, keyPath string) error

生成 RootCA

func GenerateSelfSignedCert

func GenerateSelfSignedCert(certPath, keyPath string) error

生成自签名证书和私钥

func ParseCertificate

func ParseCertificate(pemPath string) (*x509.Certificate, error)

解析 PEM 格式证书,提取关键信息

func VerifyCertificate

func VerifyCertificate(cert *x509.Certificate, rootCAs *x509.CertPool) error

验证证书有效性(需传入根证书池)

Types

This section is empty.

Jump to

Keyboard shortcuts

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