utils

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LamassuLoggerContextKey contextKey = "LamassuLogger"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Utils

type Utils interface {
	VerifyPeerCertificate(ctx context.Context, cert *x509.Certificate, enroll bool, certCA *x509.Certificate) (string, error)
	GetCertsCAType(ctx context.Context, enroll bool) ([]*x509.Certificate, lamassuca.Certs, error)
	GenerateCSR(csr *x509.CertificateRequest, key interface{}) (*x509.CertificateRequest, error)
	InsertNth(s string, n int) string
	ToHexInt(n *big.Int) string
}

func NewUtils

func NewUtils(lamassuCaClient *lamassuca.LamassuCaClient, logger log.Logger) Utils

type UtilsService

type UtilsService struct {
	// contains filtered or unexported fields
}

func (*UtilsService) GenerateCSR

func (u *UtilsService) GenerateCSR(csr *x509.CertificateRequest, key interface{}) (*x509.CertificateRequest, error)

func (*UtilsService) GetCertsCAType

func (u *UtilsService) GetCertsCAType(ctx context.Context, enroll bool) ([]*x509.Certificate, lamassuca.Certs, error)

func (*UtilsService) InsertNth

func (u *UtilsService) InsertNth(s string, n int) string

func (*UtilsService) ToHexInt

func (u *UtilsService) ToHexInt(n *big.Int) string

func (*UtilsService) VerifyPeerCertificate

func (u *UtilsService) VerifyPeerCertificate(ctx context.Context, cert *x509.Certificate, enroll bool, certCA *x509.Certificate) (string, error)

Jump to

Keyboard shortcuts

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