vcclient

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreatedAccessToken = false

Functions

func PrependPolicyRoot

func PrependPolicyRoot(zone string) string

PrependPolicyRoot adds \Policy\ to the front of the zone string

Types

type CertArgs

type CertArgs struct {
	Name               string
	CommonName         string
	OrganizationName   string
	SANDNS             []string
	KeyCurve           certificate.EllipticCurve
	OrganizationalUnit []string
	Origin             string
	Country            string
	State              string
	Locality           string
	SANEmail           []string
	SANIP              []net.IP
	KeyPassword        string
}

CertArgs holds the arguments for certificate creation in vcert

type IVcertProxy

type IVcertProxy interface {
	PutCertificate(certName string, cert string, privateKey string) error
	List(vlimit int, zone string) ([]certificate.CertificateInfo, error)
	RetrieveCertificateByThumbprint(thumprint string) (*certificate.PEMCollection, error)
	Login() error
	Logout() error
	Revoke(thumbprint string) error
	Generate(args *CertArgs) (*certificate.PEMCollection, error)
}

IVcertProxy defines the interface for proxies that manage requests to vcert

type VcertProxy

type VcertProxy struct {
	Username      string
	Password      string
	Zone          string
	AccessToken   string
	LegacyAuth    bool
	Client        endpoint.Connector
	BaseURL       string
	ConnectorType string
}

VcertProxy contains the necessary config information for a vcert proxy

func (*VcertProxy) Generate

func (v *VcertProxy) Generate(args *CertArgs) (*certificate.PEMCollection, error)

Generate generates a certificate in vcert

func (*VcertProxy) List

func (v *VcertProxy) List(limit int, zone string) ([]certificate.CertificateInfo, error)

List retrieves the list of certificates from vcert

func (*VcertProxy) Login

func (v *VcertProxy) Login() error

Login creates a session with the TPP server

func (*VcertProxy) Logout added in v1.6.0

func (p *VcertProxy) Logout() error

logout revokes a access token in tpp (delete is not available via the tpp client library)

func (*VcertProxy) PutCertificate

func (v *VcertProxy) PutCertificate(certName string, cert string, privateKey string) error

PutCertificate uploads a certificate to vcert

func (*VcertProxy) RetrieveCertificateByThumbprint

func (v *VcertProxy) RetrieveCertificateByThumbprint(thumprint string) (*certificate.PEMCollection, error)

RetrieveCertificateByThumbprint fetches a certificate from vcert by the thumbprint

func (*VcertProxy) Revoke

func (v *VcertProxy) Revoke(thumbprint string) error

Revoke revokes a certificate in vcert (delete is not available via the api)

Jump to

Keyboard shortcuts

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