pki

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertEntry

type CertEntry struct {
	SKI         string   `storm:"id"`
	Fingerprint string   `storm:"index"`
	Subject     string   `storm:"index"`
	Publisher   string   `storm:"index"`
	Type        CertType `storm:"index"`
	Cert        []byte
}

func NewCertEntry

func NewCertEntry(fingerprint string, publisher string, ctype CertType, cert []byte) *CertEntry

type CertType

type CertType string
const (
	CertCA     CertType = "CA"
	CertIssuer CertType = "Issuer"
	CertUser   CertType = "User"
	CertCRL    CertType = "CRL"
)

type Certificates

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

func (*Certificates) All

func (c *Certificates) All() ([]*CertEntry, error)

func (*Certificates) Del

func (c *Certificates) Del(ski string) error

func (*Certificates) Get

func (c *Certificates) Get(ski string) (*CertEntry, error)

func (*Certificates) GetByFingerPrint

func (c *Certificates) GetByFingerPrint(fingerprint string) (*CertEntry, error)

func (*Certificates) GetByPublisher

func (c *Certificates) GetByPublisher(publisher string) ([]*CertEntry, error)

func (*Certificates) GetBySubject

func (c *Certificates) GetBySubject(subject string) ([]*CertEntry, error)

func (*Certificates) GetByType

func (c *Certificates) GetByType(ctype CertType) ([]*CertEntry, error)

func (*Certificates) Put

func (c *Certificates) Put(ski string, fingerprint string, subject string, publisher string, ctype CertType, cert []byte) error

type KeyPairEntry

type KeyPairEntry struct {
	SKI         string `storm:"id"`
	Fingerprint string `storm:"index"`
	Subject     string `storm:"index"`
	Publisher   string `storm:"index"`
	Cert        []byte
	Key         []byte
}

func (*KeyPairEntry) RSAKey

func (k *KeyPairEntry) RSAKey() (*rsa.PrivateKey, error)

type KeyPairs

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

func (*KeyPairs) All

func (k *KeyPairs) All() ([]*KeyPairEntry, error)

func (*KeyPairs) Del

func (k *KeyPairs) Del(ski string) error

func (*KeyPairs) Get

func (k *KeyPairs) Get(ski string) (*KeyPairEntry, error)

func (*KeyPairs) GetByFingerPrint

func (k *KeyPairs) GetByFingerPrint(fingerprint string) (*KeyPairEntry, error)

func (*KeyPairs) GetByPublisher

func (k *KeyPairs) GetByPublisher(publisher string) ([]*KeyPairEntry, error)

func (*KeyPairs) GetBySubject

func (k *KeyPairs) GetBySubject(subject string) ([]*KeyPairEntry, error)

func (*KeyPairs) Put

func (k *KeyPairs) Put(ski string, fingerprint string, subject string, publisher string, cert []byte, key []byte) error

type Pki

type Pki struct {
	Path         string
	Certificates *Certificates
	KeyPairs     *KeyPairs
	// contains filtered or unexported fields
}

func New

func New(path string) *Pki

func (*Pki) Close

func (p *Pki) Close()

Jump to

Keyboard shortcuts

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