engine

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ValidityDuration specifies the duration an TLS certificate is valid
	ValidityDuration = time.Hour * 24 * 365 * 2
	// PkiKeySize is the size in bytes of the PKI key
	PkiKeySize = 4096
)

Variables

This section is empty.

Functions

func CreateSaveSSH

func CreateSaveSSH(username, outputDirectory string) (privateKey *rsa.PrivateKey, publicKeyString string, err error)

CreateSaveSSH generates and stashes an SSH key pair.

Types

type ArtifactWriter

type ArtifactWriter struct {
}

ArtifactWriter represents the object that writes artifacts

func (*ArtifactWriter) WriteTLSArtifacts

func (w *ArtifactWriter) WriteTLSArtifacts(oe *api.OpenEnclave, template, parameters, artifactsDir string, certsGenerated bool, parametersOnly bool) error

WriteTLSArtifacts saves TLS certificates and keys to the server filesystem

type FileSaver

type FileSaver struct {
}

FileSaver represents the object that save string or byte data to file

func (*FileSaver) SaveFile

func (f *FileSaver) SaveFile(dir string, file string, data []byte) error

SaveFile saves binary data to file

func (*FileSaver) SaveFileString

func (f *FileSaver) SaveFileString(dir string, file string, data string) error

SaveFileString saves string to file

type PkiKeyCertPair

type PkiKeyCertPair struct {
	CertificatePem string
	PrivateKeyPem  string
}

PkiKeyCertPair represents an PKI public and private cert pair

type TemplateGenerator

type TemplateGenerator struct {
}

TemplateGenerator represents the object that performs the template generation.

func InitializeTemplateGenerator

func InitializeTemplateGenerator() (*TemplateGenerator, error)

InitializeTemplateGenerator creates a new template generator object

func (*TemplateGenerator) GenerateTemplate

func (t *TemplateGenerator) GenerateTemplate(oe *api.OpenEnclave, generatorCode string, isUpgrade bool) (templateRaw string, parametersRaw string, certsGenerated bool, err error)

GenerateTemplate generates the template from the API Model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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