utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

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, caDTO.GetCasResponse, error)
	GenerateCSR(csr *x509.CertificateRequest, key interface{}) (*x509.CertificateRequest, error)
	CheckIfNull(field []string) string
}

func NewUtils

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

type UtilsService

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

func (*UtilsService) CheckIfNull

func (u *UtilsService) CheckIfNull(field []string) string

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, caDTO.GetCasResponse, 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