ca

package
v0.1.21 Latest Latest
Warning

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

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

Documentation

Overview

ref: https://medium.com/@shaneutt/create-sign-x509-certificates-in-golang-8ac4ae49f903 ref: https://www.crunchydata.com/blog/ssl-certificate-authentication-postgresql-docker-containers ref: https://fenixara.com/golang-connecting-to-posgres-using-ssl/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CA

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

func Generate

func Generate(template *x509.Certificate, rsaKeyLength int) (*CA, *keysplitting.PrivateKeyShard, error)

func Load

func Load(caPEM string, keyPEM string) (*CA, error)

func (*CA) GenerateServerCertificate

func (c *CA) GenerateServerCertificate(template *x509.Certificate, rsaKeyLength int) (certPem string, keyPem string, err error)

func (*CA) PEM

func (c *CA) PEM() (certPem string, agentKeyPem string, err error)

func (*CA) PrivateKey

func (c *CA) PrivateKey() *rsa.PrivateKey

func (*CA) SplitPrivateKey added in v0.1.12

func (c *CA) SplitPrivateKey() *keysplitting.PrivateKeyShard

func (*CA) X509

func (c *CA) X509() *x509.Certificate

Jump to

Keyboard shortcuts

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