aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-31 01:24:02 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-31 01:24:02 +0100
commitf7a6acda0e7d04c3fd98e72c6089ba4cfad74ddf (patch)
tree13d089204bd0d5b22208185ba75429a7a01292b8 /cmd
parentf1387fc588b5943c276770d56ec7e1cef3cecaa1 (diff)
Encapsulate desire
Diffstat (limited to 'cmd')
-rw-r--r--cmd/acme/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/acme/main.go b/cmd/acme/main.go
index 762de5f..dc397b2 100644
--- a/cmd/acme/main.go
+++ b/cmd/acme/main.go
@@ -2,6 +2,7 @@ package main
import (
"crypto/rsa"
+ "crypto/x509"
"flag"
"io"
"log"
@@ -40,7 +41,7 @@ func chkKey(k PrivKey) (*rsa.PrivateKey, error) {
}
}
-func saveCert(k Cert, crt []byte) error {
+func saveCert(k Cert, crt *x509.Certificate) error {
cert := k.CertPath()
fd, err := mkdirCreate(cert, 0755, 0644)
if err != nil {
@@ -98,6 +99,7 @@ func main() {
if err != nil {
log.Fatal("cert", err)
}
+ log.Println(crt.NotBefore, crt.NotAfter)
err = saveCert(des, crt)
if err != nil {