server

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: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CA_KEY_SIZE = 2048
	NONCE_BYTES = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

type Challenge struct {
	Identifier string
	Challenges []*acme.ChallengeType
}

type Server

type Server struct {
	*http.Server
	CertPath string
	KeyPath  string
}

func NewServer

func NewServer(service *Service) *Server

func (*Server) Start

func (s *Server) Start() error

type Service

type Service struct {
	KeyPair     *rsa.PrivateKey
	Certificate *x509.Certificate
	// contains filtered or unexported fields
}

func NewService

func NewService(s State) *Service

func (*Service) AuthorizationRequest

func (s *Service) AuthorizationRequest(message *acme.AuthorizationRequestMessage) (*acme.AuthorizationMessage, error)

func (*Service) CertificateRequest

func (s *Service) CertificateRequest(message *acme.CertificateRequestMessage) (*acme.CertificateMessage, error)

func (*Service) ChallengeRequest

func (s *Service) ChallengeRequest(message *acme.ChallengeRequestMessage) (*acme.ChallengeMessage, error)

func (*Service) InitCertificateAuthority

func (s *Service) InitCertificateAuthority() error

type State

type State interface {
	IssuedChallenge(nonce string) (*Challenge, error)
	SetIssuedChallenge(nonce string, challenge *Challenge) error

	AuthorizedKeys(identifier string) ([]*acme.Jwk, error)
	SetAuthorizedKeys(identifier string, keys ...*acme.Jwk) error

	RecoveryKey(key string) (string, error)
	SetRecoveryKey(key, identifier string) error

	Certificate(serial string) ([]byte, error)
	SetCertificate(serial string, certificate []byte) error

	RevocationStatus(fingerprint string) (bool, error)
	SetRevocationStatus(fingerprint string, status bool) error

	DeferredResponse(token string) (string, error)
	SetDeferredResponse(token, response string) error
}

Jump to

Keyboard shortcuts

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