certc

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedSubject = pkix.Name{
	CommonName: "connet",
}

Functions

func MarshalJSONCert

func MarshalJSONCert(cert *x509.Certificate) ([]byte, error)

func UnmarshalJSONCert

func UnmarshalJSONCert(b []byte) (*x509.Certificate, error)

Types

type Cert

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

func DecodeFromMemory

func DecodeFromMemory(cert, key []byte) (*Cert, error)

func NewRoot

func NewRoot() (*Cert, error)

func (*Cert) Cert

func (c *Cert) Cert() (*x509.Certificate, error)

func (*Cert) CertPool

func (c *Cert) CertPool() (*x509.CertPool, error)

func (*Cert) EncodeToMemory

func (c *Cert) EncodeToMemory() ([]byte, []byte, error)

func (*Cert) NewClient

func (c *Cert) NewClient() (*Cert, error)

func (*Cert) NewServer

func (c *Cert) NewServer(opts CertOpts) (*Cert, error)

func (*Cert) Raw

func (c *Cert) Raw() []byte

func (*Cert) TLSCert

func (c *Cert) TLSCert() (tls.Certificate, error)

type CertOpts

type CertOpts struct {
	Domains []string
	IPs     []net.IP
}

type Key added in v0.15.0

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

func NewKey added in v0.15.0

func NewKey(cert *x509.Certificate) Key

func NewKeyString added in v0.15.0

func NewKeyString(s string) Key

func (Key) IsValid added in v0.15.0

func (k Key) IsValid() bool

func (Key) MarshalText added in v0.15.0

func (k Key) MarshalText() ([]byte, error)

func (Key) String added in v0.15.0

func (k Key) String() string

func (*Key) UnmarshalText added in v0.15.0

func (k *Key) UnmarshalText(b []byte) error

Jump to

Keyboard shortcuts

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