certsclient

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertsClient

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

CertsClient is a marshaller for cert service messages using a provided hub connection. This uses the default serializer to marshal and unmarshal messages.

func NewCertsClient

func NewCertsClient(hc *hubclient.HubClient) *CertsClient

NewCertsClient returns a certs service client for managing certificates

hc is the hub client connection to use

func (*CertsClient) CreateDeviceCert

func (cl *CertsClient) CreateDeviceCert(deviceID string, pubKeyPEM string, validityDays int) (
	certPEM string, caCertPEM string, err error)

CreateDeviceCert generates or renews IoT device certificate for access hub IoT gateway

func (*CertsClient) CreateServiceCert

func (cl *CertsClient) CreateServiceCert(
	serviceID string, pubKeyPEM string, names []string, validityDays int) (
	certPEM string, caCertPEM string, err error)

CreateServiceCert generates or renews service certificates for access hub IoT gateway

func (*CertsClient) CreateUserCert

func (cl *CertsClient) CreateUserCert(
	userID string, pubKeyPEM string, validityDays int) (
	certPEM string, caCertPEM string, err error)

CreateUserCert generates or renews user certificates for access hiveot hub

func (*CertsClient) VerifyCert

func (cl *CertsClient) VerifyCert(
	clientID string, certPEM string) (err error)

VerifyCert verifies if the certificate is valid for the Hub

Jump to

Keyboard shortcuts

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