aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-12 23:17:31 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-12 23:17:31 +0100
commit20650c97ee0a7195957ce8f30f87a901bda28e89 (patch)
tree22e44f456e87fe2b96a59558fb97a872722eecbc
parent14b97b923d25386e068612f94540dc37e21e09d9 (diff)
cleanup
-rw-r--r--crypto.go9
-rw-r--r--desire.go9
2 files changed, 0 insertions, 18 deletions
diff --git a/crypto.go b/crypto.go
index a9c8b4c..e275933 100644
--- a/crypto.go
+++ b/crypto.go
@@ -1,7 +1,6 @@
package acme
import (
- "crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
@@ -29,14 +28,6 @@ func LoadKey(r io.Reader) (*rsa.PrivateKey, error) {
return x509.ParsePKCS1PrivateKey(block.Bytes)
}
-func NewKey(w io.Writer, size int) (*rsa.PrivateKey, error) {
- key, err := rsa.GenerateKey(rand.Reader, size)
- if err != nil {
- return nil, err
- }
- return key, SaveKey(w, key)
-}
-
func SaveKey(w io.Writer, key *rsa.PrivateKey) error {
block := &pem.Block{
Type: "RSA PRIVATE KEY",
diff --git a/desire.go b/desire.go
index c0a6042..5be5d3f 100644
--- a/desire.go
+++ b/desire.go
@@ -77,15 +77,6 @@ func (d *Desire) NewCSR() (string, error) {
return base64.RawURLEncoding.EncodeToString(der), nil
}
-func (d *Desire) AddCert(der []byte) error {
- cert, err := x509.ParseCertificate(der)
- if err != nil {
- return err
- }
- d.cert = append(d.cert, cert)
- return nil
-}
-
func (d Desire) satisficed(c []Challenge, com []int) bool {
for _, n := range com {
if _, ok := d.solver[c[n].Type]; !ok {