certifier

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "CERTIFIER"

Variables

This section is empty.

Functions

func AddCertificate

func AddCertificate(oper *protos.Identity, certDer []byte) error

Add an existing Certificate & associate it with operator

func CollectGarbage

func CollectGarbage() error

Let certifier to remove expired certificates

func FindCertificates

func FindCertificates(id *protos.Identity) ([]string, error)

Finds & returns Serial Numbers of all Certificates associated with the given Identity

func GetAll

GetAll returns all Certificates Records

func GetCACert

func GetCACert(getCAReq *certifierprotos.GetCARequest) (*protos.CACert, error)

Get the certificate for the requested CA

func GetCertificateIdentity

func GetCertificateIdentity(serialNum string) (*certifierprotos.CertificateInfo, error)

GetCertificateIdentity returns CertificateInfo of Certificate with the given Serial Number String. It's a simple wrapper for GetIdentity

func GetIdentity

Get the CertificateInfo {Identity, NotAfter} of an SN

func GetVerifiedCertificateIdentity

func GetVerifiedCertificateIdentity(serialNum string) (*protos.Identity, error)

GetVerifiedCertificateIdentity returns CertificateInfo of Certificate with the given Serial Number String and verifies its validity

func ListCertificates

func ListCertificates() ([]string, error)

Returns serial numbers of all registered certificates

func RevokeCertificate

func RevokeCertificate(sn *protos.Certificate_SN) error

Revoke Certificate and delete record of given SN

func RevokeCertificateSN

func RevokeCertificateSN(sn string) error

func SignCSR

func SignCSR(csr *protos.CSR) (*protos.Certificate, error)

Return a signed certificate given CSR

func VerifyDateRange

func VerifyDateRange(certInfo CertDateRange) error

Check if certificate time is not expired/not active yet

Types

type CertDateRange

type CertDateRange interface {
	GetNotBefore() *timestamp.Timestamp
	GetNotAfter() *timestamp.Timestamp
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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