x509keyserver

package module
v0.0.0-...-965d90e Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: BSD-3-Clause Imports: 8 Imported by: 3

README

x509keyserver

Simple X.509 key server with an RPC interface

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type X509KeyClient

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

Implementation of the X.509 key server RPC interface from the client side. Essentially implements a caching client which will keep up to "max_cache_size" records in its cache. They never expire since certificate index numbers shouldn't be reused and should therefor be unique.

func NewX509KeyClient

func NewX509KeyClient(
	server string,
	max_size int,
	timeout time.Duration,
	cache_prune_interval time.Duration) (*X509KeyClient, error)

Create a new caching X509 key client. "server" will be the server to connect to for retrieving certificates, "max_size" is the maximum size we'll want the cache to have, and "cache_prune_interval" is the maximum amount of time we'll allow the cache to go over quota.

func (*X509KeyClient) RetrieveCertificateByIndex

func (cl *X509KeyClient) RetrieveCertificateByIndex(index uint64) (*x509.Certificate, error)

Retrieve the certificate associated with the given key ID.

func (*X509KeyClient) TrimCache

func (cl *X509KeyClient) TrimCache()

Clean up old certificate entries.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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