tls

package
v0.0.85 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePeerCertificates

func ValidatePeerCertificates(
	ctx context.Context,
	cquery CertificateQuerier,
	certs []*x509.Certificate,
	usage []x509.ExtKeyUsage,
) (sdk.Address, *x509.Certificate, error)

Types

type CertificateInvalidError

type CertificateInvalidError struct {
	Cert   *x509.Certificate
	Reason InvalidReason
}

func (CertificateInvalidError) Error

func (e CertificateInvalidError) Error() string

type CertificateQuerier added in v0.0.77

type CertificateQuerier interface {
	GetAccountCertificate(context.Context, sdk.Address, *big.Int) (*x509.Certificate, crypto.PublicKey, error)
}

type InvalidReason

type InvalidReason int
const (
	EmptyPeerCertificate InvalidReason = iota
	TooManyPeerCertificates
	InvalidCN
	InvalidSN
	Expired
	Decode
	X509Parse
	Verify
)

Jump to

Keyboard shortcuts

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