disk

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The path to the file containing the X.509 ROOT CA certificate.
	CertFilePath string `hcl:"cert_file_path"`
	// The path to the file containing the X.509 ROOT CA private key.
	KeyFilePath string `hcl:"key_file_path"`
}

Config is the configuration for a disk-based X509CA.

type X509CA

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

X509CA is a CA that signs X509 certificates using a disk-based private key and ROOT CA certificate.

func New

func New() (*X509CA, error)

New creates a new disk-based X509CA. The returned X509CA is not configured. Call Configure() to configure it passing the HCL configuration.

func (*X509CA) Configure

func (ca *X509CA) Configure(config *Config) error

Configure configures the disk-based X509CA from the given map.

func (*X509CA) IssueX509Certificate

func (ca *X509CA) IssueX509Certificate(ctx context.Context, params *x509ca.X509CertificateParams) ([]*x509.Certificate, error)

IssueX509Certificate issues an X509 certificate using the disk-based private key and ROOT CA certificate. The certificate is bound to the given public key and subject.

Jump to

Keyboard shortcuts

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