selfsigned

package
v0.0.0-...-147f0cf Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SelfSignedCertsService

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

SelfSignedCertsService creates certificates for use by services, devices and admin users.

This implements the ICertsService interface

Note that this service does not support certificate revocation.

See also: https://www.imperialviolet.org/2014/04/19/revchecking.html

Issued certificates are short-lived and must be renewed before they expire.

func NewSelfSignedCertsService

func NewSelfSignedCertsService(
	caCert *x509.Certificate,
	caKey *ecdsa.PrivateKey,
	hc *hubclient.HubClient,
) *SelfSignedCertsService

NewSelfSignedCertsService returns a new instance of the selfsigned certificate service

caCert is the CA certificate used to created certificates
caKey is the CA private key used to created certificates
hc is the connection to the hub with a service role. For testing it can be nil.

func (*SelfSignedCertsService) CreateDeviceCert

CreateDeviceCert creates a CA signed certificate for mutual authentication by IoT devices in PEM format

func (*SelfSignedCertsService) CreateServiceCert

CreateServiceCert creates a CA signed service certificate for mutual authentication between services

func (*SelfSignedCertsService) CreateUserCert

CreateUserCert creates a client certificate for end-users

func (*SelfSignedCertsService) Start

func (svc *SelfSignedCertsService) Start() (err error)

Start the service and listen for requests

func (*SelfSignedCertsService) Stop

func (svc *SelfSignedCertsService) Stop() error

Stop the service and remove subscription

func (*SelfSignedCertsService) VerifyCert

VerifyCert verifies whether the given certificate is a valid client certificate

Jump to

Keyboard shortcuts

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