diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-07-17 23:54:42 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-07-24 23:23:33 +0100 |
commit | 44fef1c2a163bdfd781ef08a06e3cf5cf9b7d5da (patch) | |
tree | bcde234bf45255a8935aeacf7ee544f256b455cc /server/store/store_test.go | |
parent | c9849d667ab55c23d343332a11afb3eb8ede3f2d (diff) |
Add a page for revoking certs
Add a template for revocation
Use DATETIME type to store created/expires times
Require auth for the /admin and /revoke endpoints
Diffstat (limited to 'server/store/store_test.go')
-rw-r--r-- | server/store/store_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/store/store_test.go b/server/store/store_test.go index d3aa3c1..ee80241 100644 --- a/server/store/store_test.go +++ b/server/store/store_test.go @@ -31,8 +31,8 @@ func TestParseCertificate(t *testing.T) { a.Equal(c.KeyId, rec.KeyID) a.Equal(c.ValidPrincipals, rec.Principals) - a.Equal(c.ValidBefore, rec.Expires) - a.Equal(c.ValidAfter, rec.CreatedAt) + a.Equal(c.ValidBefore, uint64(rec.Expires.Unix())) + a.Equal(c.ValidAfter, uint64(rec.CreatedAt.Unix())) } func testStore(t *testing.T, db CertStorer) { @@ -42,7 +42,7 @@ func testStore(t *testing.T, db CertStorer) { for _, id := range ids { r := &CertRecord{ KeyID: id, - Expires: uint64(time.Now().UTC().Unix()) - 10, + Expires: time.Now().UTC().Add(time.Second * -10), } if err := db.SetRecord(r); err != nil { t.Error(err) |