tpp

package
v3.18.4+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RevocationReasonsMap = map[string]RevocationReason{
	"":                       0,
	"none":                   0,
	"key-compromise":         1,
	"ca-compromise":          2,
	"affiliation-changed":    3,
	"superseded":             4,
	"cessation-of-operation": 5,
}

this maps *certificate.RevocationRequest.Reason to TPP-specific webSDK codes

Functions

func NewResponseError

func NewResponseError(b []byte) error

Types

type Certificate

type Certificate struct {
	//Id                   string   `json:"DN"`
	//ManagedCertificateId string   `json:"DN"`
	CertificateRequestId string `json:"DN"`
}

type CertificateSearchResponse

type CertificateSearchResponse struct {
	Certificates []Certificate `json:"Certificates"`
	Count        int           `json:"TotalCount"`
}

func ParseCertificateSearchResponse

func ParseCertificateSearchResponse(httpStatusCode int, body []byte) (searchResult *CertificateSearchResponse, err error)

type Connector

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

Connector contains the base data needed to communicate with a TPP Server

func NewConnector

func NewConnector(verbose bool, trust *x509.CertPool) *Connector

NewConnector creates a new TPP Connector object used to communicate with TPP

func (*Connector) Authenticate

func (c *Connector) Authenticate(auth *endpoint.Authentication) (err error)

Authenticate authenticates the user to the TPP

func (*Connector) GenerateRequest

func (c *Connector) GenerateRequest(config *endpoint.ZoneConfiguration, req *certificate.Request) (err error)

GenerateRequest creates a new certificate request, based on the zone/policy configuration and the user data

func (*Connector) GetType

func (c *Connector) GetType() endpoint.ConnectorType

func (*Connector) ImportCertificate

func (c *Connector) ImportCertificate(r *certificate.ImportRequest) (*certificate.ImportResponse, error)

func (*Connector) Ping

func (c *Connector) Ping() (err error)

Ping attempts to connect to the TPP Server WebSDK API and returns an errror if it cannot

func (*Connector) ReadPolicyConfiguration

func (c *Connector) ReadPolicyConfiguration(zone string) (policy *endpoint.Policy, err error)

func (*Connector) ReadZoneConfiguration

func (c *Connector) ReadZoneConfiguration(zone string) (config *endpoint.ZoneConfiguration, err error)

ReadZoneConfiguration reads the policy data from TPP to get locked and pre-configured values for certificate requests

func (*Connector) Register

func (c *Connector) Register(email string) (err error)

Register does nothing for TPP

func (*Connector) RenewCertificate

func (c *Connector) RenewCertificate(renewReq *certificate.RenewalRequest) (requestID string, err error)

RenewCertificate attempts to renew the certificate

func (*Connector) RequestCertificate

func (c *Connector) RequestCertificate(req *certificate.Request, zone string) (requestID string, err error)

RequestCertificate submits the CSR to TPP returning the DN of the requested Certificate

func (*Connector) RetrieveCertificate

func (c *Connector) RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)

RetrieveCertificate attempts to retrieve the requested certificate

func (*Connector) RevokeCertificate

func (c *Connector) RevokeCertificate(revReq *certificate.RevocationRequest) (err error)

RevokeCertificate attempts to revoke the certificate

func (*Connector) SetBaseURL

func (c *Connector) SetBaseURL(url string) error

SetBaseURL sets the base URL used to communicate with TPP

func (*Connector) SetZone

func (c *Connector) SetZone(z string)

type RevocationReason

type RevocationReason int

type SearchRequest

type SearchRequest []string

Jump to

Keyboard shortcuts

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