tlsutils

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PemBlockTypeCertificate   PemBlockType = "CERTIFICATE"
	PemBlockTypeCsr                        = "CERTIFICATE REQUEST"
	PemBlockTypePrivateKey                 = "PRIVATE KEY"
	PemBlockTypeRSAPrivateKey              = "RSA PRIVATE KEY"
	PemBlockTypePublicKey                  = "PUBLIC KEY"
)

Variables

View Source
var ErrStorageDir = errors.New("storage directory is empty")

Functions

This section is empty.

Types

type PemBlockType

type PemBlockType string

type Sign

type Sign struct {
	Cert          *x509.Certificate
	CertPem       []byte
	PrivateKey    crypto.PrivateKey
	PrivateKeyPem []byte
}

func GenerateSign

func GenerateSign(opts ...SignGenOption) (*Sign, error)

func LoadSign

func LoadSign(storageDirectory string, signName string) (*Sign, error)

func (*Sign) GrpcClientCredentials

func (s *Sign) GrpcClientCredentials() (credentials.TransportCredentials, error)

func (*Sign) GrpcServerCredentials

func (s *Sign) GrpcServerCredentials() (credentials.TransportCredentials, error)

func (*Sign) Store

func (s *Sign) Store(storageDirectory string, signName string) error

func (*Sign) String

func (s *Sign) String() string

type SignGenOption

type SignGenOption func(opts *SignGenOptions) error

func WithCA

func WithCA() SignGenOption

func WithDNSNames

func WithDNSNames(dnsNames ...string) SignGenOption

func WithIPAddresses

func WithIPAddresses(ips ...net.IP) SignGenOption

func WithLocalIPAddresses

func WithLocalIPAddresses() SignGenOption

func WithParentSign

func WithParentSign(sign *Sign) SignGenOption

func WithRsaSigner

func WithRsaSigner(bits int) SignGenOption

type SignGenOptions

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

Jump to

Keyboard shortcuts

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