aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-13 01:10:43 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-13 01:10:43 +0100
commitb58e13a34baf7e8f83033e43c57566524771f5dc (patch)
treef5dcdd232600bc475832956818bb7047a55ba244
parent0bb49a09e046040aace7cbb58796e952fcb17ff1 (diff)
hide aux methods
-rw-r--r--README.md37
-rw-r--r--desire.go4
-rw-r--r--provider.go4
3 files changed, 4 insertions, 41 deletions
diff --git a/README.md b/README.md
index 263761f..6698687 100644
--- a/README.md
+++ b/README.md
@@ -15,22 +15,6 @@
- [ ] Proof of Possession of a Prior Key
- [ ] DNS
-## File structure
-
-/var/lib/acme
- accounts/
- @mail/ (account ID)
- privkey
- provider
- certs/
- example.com/ (cert ID)
- cert
- chain
- fullchain -> /etc/ssl/certs/examople_com.pem
- privkey -> /etc/ssl/private/example_com.key
- desired/
- example.com: www.example.com example.com (text file)
-
## API
Register(email string) -> Registration(Account, PrivKey, Noncer)
LoadAccount(email string) -> --""--
@@ -44,27 +28,6 @@ get directory -> urls, first nonce
marshal, sign, post -> nonce, response, next
-## File structure (draft)
-
-file: account/\*
- another@example.com
- - private.key
- - provider
- - meta (ID) ?
-
-file: want/\* (yaml or toml)
- [domain.tld]
- - provider: letsencrypt/directory
- - account: another@example.com
- - domains: list of additonal domains (optional)
-
-file: certs/\*
- cert/domain.tld
-file: private/\*
- private/domain.tld
-file: tmp/\*
- tmp/domain.csr ?
-
## Use Flow
Init: param(email)
diff --git a/desire.go b/desire.go
index 5be5d3f..b945508 100644
--- a/desire.go
+++ b/desire.go
@@ -63,7 +63,7 @@ func (d *Desire) SaveCert(fname string) error {
return nil
}
-func (d *Desire) NewCSR() (string, error) {
+func (d *Desire) newCSR() (string, error) {
tmpl := x509.CertificateRequest{
Subject: pkix.Name{CommonName: d.altnames[0]},
}
@@ -86,7 +86,7 @@ func (d Desire) satisficed(c []Challenge, com []int) bool {
return true
}
-func (d Desire) Pick(a *Authorization) []Challenge {
+func (d Desire) pick(a *Authorization) []Challenge {
var c []Challenge
for _, com := range a.Combinations {
if d.satisficed(a.Challenges, com) {
diff --git a/provider.go b/provider.go
index 78381ae..33f3ba6 100644
--- a/provider.go
+++ b/provider.go
@@ -225,7 +225,7 @@ func (p *Provider) Authorize(s Signer, d *Desire) error {
return err
}
- for _, ch := range d.Pick(r) {
+ for _, ch := range d.pick(r) {
if err = p.solve(s, ch); err != nil {
return err
}
@@ -249,7 +249,7 @@ func (p *Provider) queryStatus(url string) (bool, error) {
}
func (p *Provider) newCert(uri string, s Signer, d *Desire) (*x509.Certificate, nextStep, error) {
- csr, err := d.NewCSR()
+ csr, err := d.newCSR()
if err != nil {
return nil, nextStep{}, err
}