diff --git a/cache.go b/cache.go index fb41de3..e61186d 100644 --- a/cache.go +++ b/cache.go @@ -199,9 +199,10 @@ func (c *Cache) Map() map[string]CacheObject { } type CacheObject struct { - Subject pkix.Name - NotAfter time.Time - Paths []PathObject + Subject pkix.Name + NotAfter time.Time + NotBefore time.Time + Paths []PathObject } type PathObject struct { diff --git a/client.go b/client.go index 9f39388..b079ed8 100644 --- a/client.go +++ b/client.go @@ -104,6 +104,7 @@ type CacheItem struct { Paths []CacheItemPath `json:"paths"` CommonName string `json:"common_name"` NotAfter int64 `json:"not_after"` + NotBefore int64 `json:"not_before"` } type CacheItemPath struct { diff --git a/core.go b/core.go index eb06156..3893fa3 100644 --- a/core.go +++ b/core.go @@ -89,8 +89,9 @@ func (b *Core) populateUsing(cache *Cache, paths storage.PathList) (*PopulateSta cache.Merge( fmt.Sprintf("%s", sha1.Sum(cert.Raw)), CacheObject{ - Subject: cert.Subject, - NotAfter: cert.NotAfter, + Subject: cert.Subject, + NotAfter: cert.NotAfter, + NotBefore: cert.NotBefore, Paths: []PathObject{ { Location: path + ":" + k, diff --git a/server/manager/source_manager.go b/server/manager/source_manager.go index 02ff923..37e0f75 100644 --- a/server/manager/source_manager.go +++ b/server/manager/source_manager.go @@ -125,6 +125,7 @@ func (s *SourceManager) Data() doomsday.CacheItems { Paths: paths, CommonName: v.Subject.CommonName, NotAfter: v.NotAfter.Unix(), + NotBefore: v.NotBefore.Unix(), }) }