aboutsummaryrefslogtreecommitdiff
path: root/provider.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-11 15:09:45 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-11 15:09:45 +0100
commit2d943e29468994f618f1cc5ff784f6b7f510ce05 (patch)
tree96eae321a1fbdef01c8ac3717e32ae3ab9f2cd76 /provider.go
parentee94e50bd3374c455b11bae95258ca144573dae4 (diff)
Move comments into doc.go
Diffstat (limited to 'provider.go')
-rw-r--r--provider.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/provider.go b/provider.go
index 4152d17..5ff00ab 100644
--- a/provider.go
+++ b/provider.go
@@ -56,26 +56,6 @@ func NewProvider(directory string) (*Provider, error) {
return p, nil
}
-// 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
-
-// request is used for
-// new-reg, new-authz, challenge, new-cert
-
func (p *Provider) post(uri string, s Signer, v interface{}) (*http.Response, error) {
log.Println("post", uri)
signed, err := s.Sign(v, p)
@@ -152,25 +132,6 @@ func cert(r io.Reader) (*x509.Certificate, error) {
return x509.ParseCertificate(der)
}
-/*
- 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 (p *Provider) Register(s Signer, c Contacts) error {
r := &Registration{
Resource: ResNewReg,