certificates

package
v0.0.0-...-baca4c3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificates

type Certificates struct {
	Identity Identity
}

Certificates contains all the certificates for the server. It has both their raw and processed values.

type Identity

type Identity struct {
	Cert      *x509.Certificate `graphql:"-"`
	CertRaw   []byte
	CertHash  string          // SHA-1 hash of IdentityCertRaw
	Key       *rsa.PrivateKey `graphql:"-"`
	KeyRaw    []byte          `graphql:"-"`
	Subject   pkix.Name       `graphql:"-"`
	NotBefore time.Time
	NotAfter  time.Time
}

Identity contains the certificates related to identifying and validating MDM clients

type RsaPublicKey

type RsaPublicKey struct {
	N *big.Int
	E int
}

RsaPublicKey reflects the ASN.1 structure of a PKCS#1 public key.

type Service

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

Service contains the code for safely (using a Mutex) getting and updating certificates.

func NewService

func NewService(store datastore.Store) (*Service, error)

NewService initialises and returns a new CertificateService

func (*Service) GenerateIdentity

func (s *Service) GenerateIdentity(subject pkix.Name) error

GenerateIdentity creates a new identity certificate and key pair

func (*Service) Get

func (s *Service) Get() Certificates

Get returns the loaded settings.

func (*Service) MountAPI

func (s *Service) MountAPI(builder *schemabuilder.Schema)

MountAPI attaches the Certificates Schema to the GraphQL API

Jump to

Keyboard shortcuts

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