Documentation ¶
Index ¶
- Variables
- func NewResponseError(b []byte) error
- type Certificate
- type CertificateSearchResponse
- type Connector
- func (c *Connector) Authenticate(auth *endpoint.Authentication) (err error)
- func (c *Connector) GenerateRequest(config *endpoint.ZoneConfiguration, req *certificate.Request) (err error)
- func (c *Connector) GetType() endpoint.ConnectorType
- func (c *Connector) ImportCertificate(r *certificate.ImportRequest) (*certificate.ImportResponse, error)
- func (c *Connector) Ping() (err error)
- func (c *Connector) ReadPolicyConfiguration(zone string) (policy *endpoint.Policy, err error)
- func (c *Connector) ReadZoneConfiguration(zone string) (config *endpoint.ZoneConfiguration, err error)
- func (c *Connector) Register(email string) (err error)
- func (c *Connector) RenewCertificate(renewReq *certificate.RenewalRequest) (requestID string, err error)
- func (c *Connector) RequestCertificate(req *certificate.Request, zone string) (requestID string, err error)
- func (c *Connector) RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)
- func (c *Connector) RevokeCertificate(revReq *certificate.RevocationRequest) (err error)
- func (c *Connector) SetBaseURL(url string) error
- func (c *Connector) SetZone(z string)
- type RevocationReason
- type SearchRequest
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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 ¶
Ping attempts to connect to the TPP Server WebSDK API and returns an errror if it cannot
func (*Connector) ReadPolicyConfiguration ¶
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) 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 ¶
SetBaseURL sets the base URL used to communicate with TPP
type RevocationReason ¶
type RevocationReason int
type SearchRequest ¶
type SearchRequest []string