aboutsummaryrefslogtreecommitdiff
path: root/doc.go
blob: 4c5502d28d08623edc14fd21e5b578a5a653834c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// acme implements Automatic Certificate Management Environment
package acme

// Important header fields
//
// Replay-Nonce		each response, required for next request
// Link			links to next stage
// Retry-After		polling interval
// Location		next step
// Content-Location	cert

// Action		Request		Response
//
// Register		POST new-reg	201 -> reg
// Request challenges	POST new-authz	201 -> authz
// Answer challenges	POST challenge	200
// Poll for status	GET  authz	200
// Request issuance	POST new-cert	201 -> cert
// Check for new cert	GET  cert	200

/*
                              directory
                                  .
                                  .
      ....................................................
      .                  .                  .            .
      .                  .                  .            .
      V     "next"       V      "next"      V            V
   new-reg ---+----> new-authz ---+----> new-cert    revoke-cert
      .       |          .        |         .            ^
      .       |          .        |         .            | "revoke"
      V       |          V        |         V            |
     reg* ----+        authz -----+       cert-----------+
                        . ^                 |
                        . | "up"            | "up"
                        V |                 V
                      challenge         cert-chain
*/

/*
func Dial(key crypto.PrivateKey, dir string) (*Provider, error)
func (p *Provider) Register(email, phone string) error
func (p *Provider) Authorize(domain []string, sol Solver) error
func (p *Provider) Cert() (*x509.Certificate, error)
func (p *Provider) Revoke(cert *x509.Certificate) error
func (p *HTTPSolver) Server() *http.Server
func (p *TLSSolver) Server() *http.Server
*/