baseca

package
v0.0.1-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Env = Environment{
	Local:         "Local",
	Sandbox:       "Sandbox",
	Development:   "Development",
	Staging:       "Staging",
	PreProduction: "PreProduction",
	Production:    "Production",
}

Functions

func LoadDefaultConfiguration

func LoadDefaultConfiguration(configuration Configuration, client_id, client_token, attestation string) (*client, error)

Types

type Authentication

type Authentication struct {
	ClientId    string
	ClientToken string
}

type CertificateClient

type CertificateClient interface {
	SignCSR(ctx context.Context, in *apiv1.CertificateSigningRequest, opts ...grpc.CallOption) (*apiv1.SignedCertificate, error)
}

type CertificateRequest

type CertificateRequest struct {
	CommonName            string
	SubjectAlternateNames []string
	DistinguishedName     DistinguishedName
	SigningAlgorithm      x509.SignatureAlgorithm
	PublicKeyAlgorithm    x509.PublicKeyAlgorithm
	KeySize               int
	Output                Output
}

type Configuration

type Configuration struct {
	URL         string
	Environment string
}

type DistinguishedName

type DistinguishedName struct {
	Country            []string
	Province           []string
	Locality           []string
	Organization       []string
	OrganizationalUnit []string
}

type Environment

type Environment struct {
	Local         string
	Sandbox       string
	Development   string
	Staging       string
	PreProduction string
	Production    string
}

type Output

type Output struct {
	CertificateSigningRequest string
	Certificate               string
	CertificateChain          string
	PrivateKey                string
}

type Provider

type Provider struct {
	Local string
	AWS   string
}
var Attestation Provider = Provider{
	Local: "NONE",
	AWS:   "AWS",
}

type SignedCertificate

type SignedCertificate struct {
	CertificatePath      string
	CertificateChainPath string
}

type SigningRequest

type SigningRequest struct {
	CSR        *bytes.Buffer
	PrivateKey *pem.Block
}

func GenerateCSR

func GenerateCSR(csr CertificateRequest) (*SigningRequest, error)

Jump to

Keyboard shortcuts

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