acme

package
v0.0.0-...-017c246 Latest Latest
Warning

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

Go to latest
Published: May 28, 2015 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(s string) ([]byte, error)

Base64Decode decodes the given string using the standard base64 url decoder but first adds the appropriate number of trailing '=' characters in accordance with the jose specification. http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2

func Base64Encode

func Base64Encode(b []byte) string

Base64Encode encodes the given data using the standard base64 url encoding format but with all trailing '=' characters ommitted in accordance with the jose specification. http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2

func ValidDomain

func ValidDomain(s string) error

Checks for a valid domain name. Checks lengths, characters, and looks for a valid TLD (according to IANA).

func VerifyCsr

func VerifyCsr(csr *x509.CertificateRequest) error

func VerifySignature

func VerifySignature(sig *Signature, content []byte) (bool, error)

Types

type AuthorizationMessage

type AuthorizationMessage struct {
	*BaseMessage         // authorization
	RecoveryToken string `json:"recoveryToken,omitempty"`
	Identifier    string `json:"identifier,omitempty"`
	Jwk           *Jwk   `json:"jwk,omitempty"`
}

func NewAuthorizationMessage

func NewAuthorizationMessage() AuthorizationMessage

type AuthorizationRequestMessage

type AuthorizationRequestMessage struct {
	*BaseMessage                     // authorizationRequest
	SessionId    string              `json:"sessionID"`
	Nonce        string              `json:"nonce"`
	Signature    *Signature          `json:"signature"`
	Responses    []map[string]string `json:"responses"`
	Contact      []string            `json:"contact,omitempty"`
}

type BaseMessage

type BaseMessage struct {
	Type string `json:"type"`
}

type CertificateMessage

type CertificateMessage struct {
	*BaseMessage          // certificate
	Certificate  string   `json:"certificate"`
	Chain        []string `json:"chain,omitempty"`
	Refresh      string   `json:"refresh,omitempty"`
}

func NewCertificateMessage

func NewCertificateMessage() CertificateMessage

type CertificateRequestMessage

type CertificateRequestMessage struct {
	*BaseMessage            // certificateRequest
	Csr          string     `json:"csr"`
	Signature    *Signature `json:"signature"`
}

type ChallengeMessage

type ChallengeMessage struct {
	*BaseMessage                    // challenge
	SessionId    string             `json:"sessionID"`
	Nonce        string             `json:"nonce"`
	Challenges   []*ChallengeType   `json:"challenges"`
	Combinations [][]*ChallengeType `json:"combinations,omitempty"`
}

func NewChallengeMessage

func NewChallengeMessage() ChallengeMessage

type ChallengeRequestMessage

type ChallengeRequestMessage struct {
	*BaseMessage        // challengeRequest
	Identifier   string `json:"identifier"`
}

type ChallengeType

type ChallengeType struct {
	Type  string `json:"type"`
	Token string `json:"token"`
}

type DeferMessage

type DeferMessage struct {
	*BaseMessage        // defer
	Token        string `json:"token"`
	Interval     int64  `json:"interval,omitempty"`
	Message      string `json:"message,omitempty"`
}

func NewDeferMessage

func NewDeferMessage() DeferMessage

type ErrorMessage

type ErrorMessage struct {
	*BaseMessage // error

	// malformed      The request message was malformed
	// unauthorized   The client lacks sufficient authorization
	// serverInternal The server experienced an internal error
	// notSupported   The request type is not supported
	// unknown        The server does not recognize an ID/token in the request
	// badCSR         The CSR is unacceptable (e.g., due to a short key)
	Error    string `json:"error"`
	Message  string `json:"message,omitempty"`
	MoreInfo string `json:"moreInfo,omitempty"`
}

func NewErrorMessage

func NewErrorMessage() ErrorMessage

type Jwk

type Jwk struct {
	Kty string `json:"kty"`
	E   string `json:"e"`
	N   string `json:"n"`
}

type RevocationMessage

type RevocationMessage struct {
	*BaseMessage // revocation
}

func NewRevocationMessage

func NewRevocationMessage() RevocationMessage

type RevocationRequestMessage

type RevocationRequestMessage struct {
	*BaseMessage            // revocationRequest
	Certificate  string     `json:"certificate"`
	Signature    *Signature `json:"signature"`
}

type Signature

type Signature struct {
	Alg   string `json:"alg"`
	Sig   string `json:"sig"`
	Nonce string `json:"nonce"`
	Jwk   Jwk    `json:"jwk"`
}

type StatusRequestMessage

type StatusRequestMessage struct {
	*BaseMessage        // statusRequest
	Token        string `json:"token"`
}

func NewStatusRequestMessage

func NewStatusRequestMessage() StatusRequestMessage

Jump to

Keyboard shortcuts

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