Use gotuf expires function

The gotuf library defines a function to check expiration of timestamps which notary will make use of.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-07-29 17:11:56 -07:00
parent ac5feeb82a
commit f9c63780b7
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package timestamp
import (
"bytes"
"encoding/json"
"time"
"github.com/endophage/gotuf/data"
"github.com/endophage/gotuf/signed"
@ -93,7 +92,7 @@ func GetOrCreateTimestamp(gun string, store storage.MetaStore, cryptoService sig
// timestampExpired compares the current time to the expiry time of the timestamp
func timestampExpired(ts *data.SignedTimestamp) bool {
return time.Now().After(ts.Signed.Expires)
return signed.IsExpired(ts.Signed.Expires)
}
func snapshotExpired(ts *data.SignedTimestamp, snapshot []byte) bool {