Version: v3.18.4+incompatible Latest Latest

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 50




This section is empty.


This section is empty.


This section is empty.


type AllowedKeyConfiguration

type AllowedKeyConfiguration struct {
	KeyType   certificate.KeyType
	KeySizes  []int
	KeyCurves []certificate.EllipticCurve

AllowedKeyConfiguration contains an allowed key type with its sizes or curves

type Authentication

type Authentication struct {
	User     string
	Password string
	APIKey   string

Authentication provides a data construct for authentication data

type Connector

type Connector interface {
	GetType() ConnectorType
	SetBaseURL(url string) (err error)
	SetZone(z string)
	Ping() (err error)
	Register(email string) (err error)
	Authenticate(auth *Authentication) (err error)
	ReadZoneConfiguration(zone string) (config *ZoneConfiguration, err error)
	GenerateRequest(config *ZoneConfiguration, req *certificate.Request) (err error)
	RequestCertificate(req *certificate.Request, zone string) (requestID string, err error)
	RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)
	RevokeCertificate(req *certificate.RevocationRequest) error
	RenewCertificate(req *certificate.RenewalRequest) (requestID string, err error)
	ImportCertificate(req *certificate.ImportRequest) (*certificate.ImportResponse, error)
	ReadPolicyConfiguration(zone string) (policy *Policy, err error)

Connector provides a common interface for external communications with TPP or Venafi Cloud

type ConnectorType

type ConnectorType int

ConnectorType represents the available connectors

const (
	ConnectorTypeUndefined ConnectorType = iota
	// ConnectorTypeFake is a fake connector for tests
	// ConnectorTypeCloud represents the Cloud connector type
	// ConnectorTypeTPP represents the TPP connector type

func (ConnectorType) String

func (t ConnectorType) String() string

type ErrCertificatePending

type ErrCertificatePending struct {
	CertificateID string
	Status        string

ErrCertificatePending provides a common error structure for a timeout while retrieving a certificate

func (ErrCertificatePending) Error

func (err ErrCertificatePending) Error() string

type ErrRetrieveCertificateTimeout

type ErrRetrieveCertificateTimeout struct {
	CertificateID string

ErrRetrieveCertificateTimeout provides a common error structure for a timeout while retrieving a certificate

func (ErrRetrieveCertificateTimeout) Error

type Policy

type Policy struct {
	SubjectCNRegexes         []string
	SubjectORegexes          []string
	SubjectOURegexes         []string
	SubjectSTRegexes         []string
	SubjectLRegexes          []string
	SubjectCRegexes          []string
	AllowedKeyConfigurations []AllowedKeyConfiguration
	DnsSanRegExs             []string
	IpSanRegExs              []string
	EmailSanRegExs           []string
	UriSanRegExs             []string
	UpnSanRegExs             []string
	AllowWildcards           bool
	AllowKeyReuse            bool

type ZoneConfiguration

type ZoneConfiguration struct {
	Organization       string
	OrganizationalUnit []string
	Country            string
	Province           string
	Locality           string

	HashAlgorithm x509.SignatureAlgorithm

	CustomAttributeValues map[string]string

ZoneConfiguration provides a common structure for certificate request data provided by the remote endpoint

func NewZoneConfiguration

func NewZoneConfiguration() *ZoneConfiguration

NewZoneConfiguration creates a new zone configuration which creates the map used in the configuration

func (*ZoneConfiguration) UpdateCertificateRequest

func (z *ZoneConfiguration) UpdateCertificateRequest(request *certificate.Request)

UpdateCertificateRequest updates a certificate request based on the zone configurataion retrieved from the remote endpoint

func (*ZoneConfiguration) ValidateCertificateRequest

func (z *ZoneConfiguration) ValidateCertificateRequest(request *certificate.Request) error

ValidateCertificateRequest validates the request against the zone configuration

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto