certbox

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 3 Imported by: 0

README

Certbox Go

Provides the Go backend for CertBox Web and Desktop

Documentation

Overview

Package certbox provides basic methods for certificate management

Index

Constants

View Source
const (
	FormatPEM = "PEM"
	FormatP12 = "PKCS12"
	FormatDER = "DER"
)

Export formats

Variables

This section is empty.

Functions

func CloneCertificate

func CloneCertificate(parameters CloneCertificateParameters) (*tls.CertificateRequest, error)

CloneCertificate will return a new certificate request that clones details of the given PEM encoded certificate

func GenerateCertificates

func GenerateCertificates(parameters GenerateCertificatesParameters) ([]tls.Certificate, error)

GenerateCertificates will generate associated keys for the given certificate requests

func ImportRootCertificate

func ImportRootCertificate(parameters ImportRootCertificateParameters) (*tls.Certificate, error)

ImportRootCertificate will import a PKCS12 certificate and key as a root

Types

type CloneCertificateParameters

type CloneCertificateParameters struct {
	Data []byte
}

CloneCertificateParameters parameters for cloning a certificate

type ExportCertificatesParameters

type ExportCertificatesParameters struct {
	Certificates []tls.Certificate
	Format       string
	Password     string
}

ExportCertificatesParameters describes the parameters for exporting a certificate

type ExportedCertificate

type ExportedCertificate struct {
	Name string
	Data []byte
}

ExportedCertificate describes the response from exporting a certificate

func ExportCertificates

func ExportCertificates(parameters ExportCertificatesParameters) ([]ExportedCertificate, error)

ExportCertificates will generate appropriate files for the given certificates

type GenerateCertificatesParameters

type GenerateCertificatesParameters struct {
	Requests     []tls.CertificateRequest
	ImportedRoot *tls.Certificate
}

GenerateCertificatesParameters parameters for generating a certificate

type ImportRootCertificateParameters

type ImportRootCertificateParameters struct {
	Password string
	Data     []byte
}

ImportRootCertificateParameters parameters for importing a root certificate

Directories

Path Synopsis
Package tls provides methods for common TLS-related tasks
Package tls provides methods for common TLS-related tasks

Jump to

Keyboard shortcuts

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