Documentation ¶
Index ¶
- Variables
- type Authorization
- type AuthorizationExport
- type AuthorizationResource
- type AuthorizationStatus
- type Certificate
- type CertificateExport
- type Challenge
- func (challenge *Challenge) GetStatus() string
- func (challenge *Challenge) GetType() string
- func (challenge *Challenge) GetURI() string
- func (challenge *Challenge) GetValidated() string
- func (challenge *Challenge) MarshalJSON() (data []byte, err error)
- func (challenge *Challenge) UnmarshalJSON(data []byte) error
- type ChallengeData
- type ChallengeDataImplementation
- type ChallengeImplementation
- type ChallengeResponding
- type DNSIdentifier
- type Directory
- type DirectoryResource
- type JSONSignature
- type PasswordPrompt
- type Registration
- type RegistrationExport
- type RegistrationResource
- type Resource
- type ResourceAuthorizationTag
- type ResourceCertificateTag
- type ResourceChallengeTag
- type ResourceNewAuthorizationTag
- type ResourceNewCertificateTag
- type ResourceNewRegistrationTag
- type ResourceRecoverRegistrationTag
- type ResourceRegistrationTag
- type ResourceRevokeCertificateTag
- type SigningKey
- func (skey SigningKey) EncryptPrivateKey(password string, alg x509.PEMCipher) (*pem.Block, error)
- func (skey SigningKey) GetPublicKey() *jose.JsonWebKey
- func (skey SigningKey) GetSignatureAlgorithm() jose.SignatureAlgorithm
- func (skey SigningKey) Sign(payload []byte, nonce string) (*jose.JsonWebSignature, error)
- func (skey SigningKey) Verify(signature string, payload *[]byte, nonce *string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var NotASinglePemBlock = errors.New("Expected single PEM block")
View Source
var UnexpectedPemBlock = errors.New("Unexpected PEM block")
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct { Resource AuthorizationResource Location string // map challenge uri to per challenge data ChallengesData map[string]ChallengeData }
func (Authorization) Export ¶
func (auth Authorization) Export(password string) (*AuthorizationExport, error)
func (*Authorization) Import ¶
func (auth *Authorization) Import(export AuthorizationExport, prompt PasswordPrompt) error
func (*Authorization) Respond ¶
func (authorization *Authorization) Respond(registration Registration, challengeIndex int) (ChallengeResponding, error)
type AuthorizationExport ¶
type AuthorizationExport struct {
JsonPem []byte
}
type AuthorizationResource ¶
type AuthorizationResource struct { Resource ResourceAuthorizationTag `json:"resource"` DNSIdentifier DNSIdentifier `json:"identifier,omitempty"` Status AuthorizationStatus `json:"status,omitempty"` Challenges []Challenge `json:"challenges,omitempty"` Combinations [][]int `json:"combinations,omitempty"` Expires *time.Time `json:"expires,omitempty"` }
type AuthorizationStatus ¶
type AuthorizationStatus string
func (AuthorizationStatus) MarshalJSON ¶
func (status AuthorizationStatus) MarshalJSON() (data []byte, err error)
func (AuthorizationStatus) String ¶
func (status AuthorizationStatus) String() string
func (*AuthorizationStatus) UnmarshalJSON ¶
func (status *AuthorizationStatus) UnmarshalJSON(data []byte) error
type Certificate ¶
type Certificate struct { Name string Revoked bool Certificate *x509.Certificate PrivateKey *pem.Block Location string LinkIssuer string }
func (Certificate) Export ¶
func (cert Certificate) Export(password string) (*CertificateExport, error)
func (*Certificate) Import ¶
func (cert *Certificate) Import(export CertificateExport, prompt PasswordPrompt) error
type CertificateExport ¶
type Challenge ¶
type Challenge struct {
// contains filtered or unexported fields
}
func (*Challenge) GetValidated ¶
func (*Challenge) MarshalJSON ¶
func (*Challenge) UnmarshalJSON ¶
type ChallengeData ¶
type ChallengeData struct {
// contains filtered or unexported fields
}
func (ChallengeData) GetType ¶
func (cdata ChallengeData) GetType() string
func (ChallengeData) MarshalJSON ¶
func (cdata ChallengeData) MarshalJSON() ([]byte, error)
func (*ChallengeData) UnmarshalJSON ¶
func (cdata *ChallengeData) UnmarshalJSON(data []byte) error
type ChallengeDataImplementation ¶
type ChallengeDataImplementation interface {
GetType() string
}
type ChallengeImplementation ¶
type ChallengeResponding ¶
type ChallengeResponding interface { ResetResponse() error InitializeResponse(UI ui.UserInterface) error ShowInstructions(UI ui.UserInterface) error Verify() error SendPayload() (interface{}, error) ChallengeData() ChallengeData Challenge() Challenge Registration() *Registration }
type DNSIdentifier ¶
type DNSIdentifier string
func (DNSIdentifier) MarshalJSON ¶
func (dnsId DNSIdentifier) MarshalJSON() (data []byte, err error)
func (*DNSIdentifier) UnmarshalJSON ¶
func (dnsId *DNSIdentifier) UnmarshalJSON(data []byte) error
type Directory ¶
type Directory struct { RootURL string Resource DirectoryResource }
type DirectoryResource ¶
type DirectoryResource struct { NewRegistration string `json:"new-reg,omitempty"` RecoverRegistration string `json:"recover-reg,omitempty"` NewAuthorization string `json:"new-authz,omitempty"` NewCertificate string `json:"new-cert,omitempty"` RevokeCertificate string `json:"revoke-cert,omitempty"` }
type JSONSignature ¶
type JSONSignature struct {
Signature *jose.JsonWebSignature
}
wrapper to marshal/unmarshal json
func (JSONSignature) MarshalJSON ¶
func (sig JSONSignature) MarshalJSON() ([]byte, error)
func (*JSONSignature) UnmarshalJSON ¶
func (sig *JSONSignature) UnmarshalJSON(data []byte) error
type PasswordPrompt ¶
type Registration ¶
type Registration struct { Resource RegistrationResource SigningKey SigningKey Location string LinkTermsOfService string RecoveryToken string Name string }
func (Registration) Export ¶
func (reg Registration) Export(password string) (*RegistrationExport, error)
func (*Registration) Import ¶
func (reg *Registration) Import(export RegistrationExport, prompt PasswordPrompt) error
type RegistrationExport ¶
type RegistrationResource ¶
type RegistrationResource struct { Resource ResourceRegistrationTag `json:"resource"` Contact []string `json:"contact,omitempty"` AgreementURL string `json:"agreement,omitempty"` AuthorizationsURL string `json:"authorizations,omitempty"` CertificatesURL string `json:"certificates,omitempty"` }
type Resource ¶
type Resource int
const ( // action resources to create new resources Resource_NewRegistration Resource = iota Resource_RecoverRegistration Resource_NewAuthorization Resource_NewCertificate Resource_RevokeCertificate // existing resources with an actual value Resource_Registration Resource_Authorization Resource_Challenge Resource_Certificate )
func (Resource) MarshalJSON ¶
func (Resource) UnmarshalJSON ¶
type ResourceAuthorizationTag ¶
type ResourceAuthorizationTag struct{}
func (ResourceAuthorizationTag) MarshalJSON ¶
func (ResourceAuthorizationTag) MarshalJSON() ([]byte, error)
func (ResourceAuthorizationTag) UnmarshalJSON ¶
func (ResourceAuthorizationTag) UnmarshalJSON(data []byte) error
type ResourceCertificateTag ¶
type ResourceCertificateTag struct{}
func (ResourceCertificateTag) MarshalJSON ¶
func (ResourceCertificateTag) MarshalJSON() ([]byte, error)
func (ResourceCertificateTag) UnmarshalJSON ¶
func (ResourceCertificateTag) UnmarshalJSON(data []byte) error
type ResourceChallengeTag ¶
type ResourceChallengeTag struct{}
func (ResourceChallengeTag) MarshalJSON ¶
func (ResourceChallengeTag) MarshalJSON() ([]byte, error)
func (ResourceChallengeTag) UnmarshalJSON ¶
func (ResourceChallengeTag) UnmarshalJSON(data []byte) error
type ResourceNewAuthorizationTag ¶
type ResourceNewAuthorizationTag struct{}
func (ResourceNewAuthorizationTag) MarshalJSON ¶
func (ResourceNewAuthorizationTag) MarshalJSON() ([]byte, error)
func (ResourceNewAuthorizationTag) UnmarshalJSON ¶
func (ResourceNewAuthorizationTag) UnmarshalJSON(data []byte) error
type ResourceNewCertificateTag ¶
type ResourceNewCertificateTag struct{}
func (ResourceNewCertificateTag) MarshalJSON ¶
func (ResourceNewCertificateTag) MarshalJSON() ([]byte, error)
func (ResourceNewCertificateTag) UnmarshalJSON ¶
func (ResourceNewCertificateTag) UnmarshalJSON(data []byte) error
type ResourceNewRegistrationTag ¶
type ResourceNewRegistrationTag struct{}
func (ResourceNewRegistrationTag) MarshalJSON ¶
func (ResourceNewRegistrationTag) MarshalJSON() ([]byte, error)
func (ResourceNewRegistrationTag) UnmarshalJSON ¶
func (ResourceNewRegistrationTag) UnmarshalJSON(data []byte) error
type ResourceRecoverRegistrationTag ¶
type ResourceRecoverRegistrationTag struct{}
func (ResourceRecoverRegistrationTag) MarshalJSON ¶
func (ResourceRecoverRegistrationTag) MarshalJSON() ([]byte, error)
func (ResourceRecoverRegistrationTag) UnmarshalJSON ¶
func (ResourceRecoverRegistrationTag) UnmarshalJSON(data []byte) error
type ResourceRegistrationTag ¶
type ResourceRegistrationTag struct{}
func (ResourceRegistrationTag) MarshalJSON ¶
func (ResourceRegistrationTag) MarshalJSON() ([]byte, error)
func (ResourceRegistrationTag) UnmarshalJSON ¶
func (ResourceRegistrationTag) UnmarshalJSON(data []byte) error
type ResourceRevokeCertificateTag ¶
type ResourceRevokeCertificateTag struct{}
func (ResourceRevokeCertificateTag) MarshalJSON ¶
func (ResourceRevokeCertificateTag) MarshalJSON() ([]byte, error)
func (ResourceRevokeCertificateTag) UnmarshalJSON ¶
func (ResourceRevokeCertificateTag) UnmarshalJSON(data []byte) error
type SigningKey ¶
type SigningKey struct {
// contains filtered or unexported fields
}
func CreateSigningKey ¶
func LoadSigningKey ¶
func LoadSigningKey(block pem.Block) (SigningKey, error)
func (SigningKey) EncryptPrivateKey ¶
func (SigningKey) GetPublicKey ¶
func (skey SigningKey) GetPublicKey() *jose.JsonWebKey
func (SigningKey) GetSignatureAlgorithm ¶
func (skey SigningKey) GetSignatureAlgorithm() jose.SignatureAlgorithm
func (SigningKey) Sign ¶
func (skey SigningKey) Sign(payload []byte, nonce string) (*jose.JsonWebSignature, error)
Source Files ¶
- authorization.go
- authorization_dns_identifier.go
- authorization_status.go
- certificate.go
- challenge.go
- challenge_data.go
- challenge_dvsni.go
- challenge_http-01.go
- challenge_simple_http.go
- challenge_unknown.go
- directory.go
- export.go
- export_authorization.go
- export_certificate.go
- export_registration.go
- insecure_https.go
- registration.go
- resource_type.go
- signing_key.go
Click to show internal directories.
Click to hide internal directories.