acmesim

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package acmesim is a small ACME server (RFC 8555) for tests and labs: HTTP-01 and DNS-01, wildcards, external account binding and revocation. It does not check signatures; DNS-01 validation asks DNSHas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// DNSHas says whether a TXT record exists at a name (DNS-01 validation).
	DNSHas func(name string) bool
	// FailOrders makes new orders fail with this status (403: rate limited).
	FailOrders int
	// contains filtered or unexported fields
}

Server is the fake CA.

func New

func New() *Server

New returns the CA's handler state; serve Handler anywhere.

func Start

func Start(t testing.TB) *Server

Start serves a new CA on a test server.

func (*Server) Directory

func (f *Server) Directory() string

Directory is the ACME directory URL of a Start-ed server.

func (*Server) EABKids

func (f *Server) EABKids() []string

EABKids lists the key ids accounts were registered with.

func (*Server) NewOrders

func (f *Server) NewOrders() int

NewOrders counts the orders made so far.

func (*Server) Revoked

func (f *Server) Revoked() int

Revoked counts the revoked certificates.

func (*Server) ServeHTTP

func (f *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is the CA.

func (*Server) SetFail

func (f *Server) SetFail(status int)

SetFail makes new orders fail with a status (0: work again).

Jump to

Keyboard shortcuts

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