aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--account.go3
-rw-r--r--cmd/acme/main.go8
2 files changed, 5 insertions, 6 deletions
diff --git a/account.go b/account.go
index 3d01e1d..d116bed 100644
--- a/account.go
+++ b/account.go
@@ -11,6 +11,9 @@ import (
"github.com/square/go-jose"
)
+// KeySize is a default RSA key size
+const KeySize = 2048
+
type Account struct {
Contact []string `json:"contact"`
PrivKey *rsa.PrivateKey `json:"key"`
diff --git a/cmd/acme/main.go b/cmd/acme/main.go
index 687fd6f..859dc5a 100644
--- a/cmd/acme/main.go
+++ b/cmd/acme/main.go
@@ -15,12 +15,8 @@ func must(err error) {
}
}
-const (
- eMail = `another@example.com`
- keySize = 2048
-)
-
var (
+ config = flag.String("config", "acme.toml", "configuration file")
server = flag.String("server", acme.LEStaging, "directory server")
port = flag.Int("port", 8443, "port to listen")
)
@@ -30,7 +26,7 @@ func init() {
}
func main() {
- acc, err := acme.NewAccount(eMail, keySize)
+ acc, err := acme.NewAccount("another@example.com", acme.KeySize)
must(err)
acme.Print(acc)
//acme.Dump(acc)