ca

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCert = errors.New("certificate does not exist")

Functions

This section is empty.

Types

type CA

type CA interface {
	// NewCert creates a new certificate with the v3 extensions (this
	// may be specific to the OpenSSL implementation, we need to resolve
	// this later, if we create an other implementation of this
	// interface
	NewCert(subj string, v3ext string, days int, key []byte) (*x509.Certificate, error) // create a new cert

	// Cert retrieves the subj cert from the cert store
	Cert(subj string) (*x509.Certificate, error)

	// Revoke revokes the given cert
	Revoke(subj string) (*x509.Certificate, error)

	List() ([]*x509.Certificate, error)               // List lists all certs from the cert store
	ListAsync(chan<- *x509.Certificate, chan<- error) // ListAsync sends all certificates to the channel
	CRL() (pem []byte, err error)                     // CRL returns the PEM encoded revocation list
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳