zcertzgo.at/zcert/truststore Index | Files

package truststore

import "zgo.at/zcert/truststore"

Index

Types

type Darwin

type Darwin struct{}

func (Darwin) HasCert

func (Darwin) HasCert(*x509.Certificate) bool

func (Darwin) Install

func (Darwin) Install(string, *x509.Certificate) error

func (Darwin) Name

func (Darwin) Name() string

func (Darwin) OnSystem

func (Darwin) OnSystem() bool

func (Darwin) Uninstall

func (Darwin) Uninstall(string, *x509.Certificate) error

func (Darwin) Verbose

func (Darwin) Verbose(v bool)

type Java

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

func (Java) HasCert

func (t Java) HasCert(caCert *x509.Certificate) bool

func (Java) Install

func (t Java) Install(rootCert string, caCert *x509.Certificate) error

func (Java) Name

func (Java) Name() string

func (Java) OnSystem

func (Java) OnSystem() bool

func (Java) Uninstall

func (t Java) Uninstall(rootCert string, caCert *x509.Certificate) error

func (*Java) Verbose

func (t *Java) Verbose(v bool)

type NSS

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

func (NSS) HasCert

func (t NSS) HasCert(caCert *x509.Certificate) bool

func (NSS) Install

func (t NSS) Install(rootCert string, caCert *x509.Certificate) error

func (NSS) Name

func (NSS) Name() string

func (NSS) OnSystem

func (NSS) OnSystem() bool

func (NSS) Uninstall

func (t NSS) Uninstall(rootCert string, caCert *x509.Certificate) error

func (*NSS) Verbose

func (t *NSS) Verbose(v bool)

type Store

type Store interface {
	Name() string                                              // Name for this truststore.
	OnSystem() bool                                            // Is this trust store on the system?
	Verbose(bool)                                              // Print extra information to stderr.
	HasCert(cacert *x509.Certificate) bool                     // Check if the key is in the store.
	Install(rootCert string, cacert *x509.Certificate) error   // Install a new certificate.
	Uninstall(rootCert string, cacert *x509.Certificate) error // Uninstall existing certificate.
}

func Find

func Find(verbose bool) []Store

Find all stores enabled on this system.

If verbose is given the Verbose() will be set on the returned stores.

type Unix

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

func (Unix) HasCert

func (t Unix) HasCert(caCert *x509.Certificate) bool

func (Unix) Install

func (t Unix) Install(rootCert string, caCert *x509.Certificate) error

func (Unix) Name

func (Unix) Name() string

func (Unix) OnSystem

func (Unix) OnSystem() bool

TODO

func (Unix) Uninstall

func (t Unix) Uninstall(rootCert string, caCert *x509.Certificate) error

func (*Unix) Verbose

func (t *Unix) Verbose(v bool)

type Windows

type Windows struct{}

func (Windows) HasCert

func (Windows) HasCert(*x509.Certificate) bool

func (Windows) Install

func (Windows) Install(string, *x509.Certificate) error

func (Windows) Name

func (Windows) Name() string

func (Windows) OnSystem

func (Windows) OnSystem() bool

func (Windows) Uninstall

func (Windows) Uninstall(string, *x509.Certificate) error

func (Windows) Verbose

func (Windows) Verbose(v bool)

Source Files

java.go nss.go truststore.go ts_nondarwin.go ts_nonwindows.go ts_unix.go

Version
v0.0.0-20211017212315-ace8b819ce86 (latest)
Published
Oct 17, 2021
Platform
linux/amd64
Imports
16 packages
Last checked
2 weeks ago

Tools for package owners.