save the STK expiry time as a time.Duration

This commit is contained in:
Marten Seemann
2017-04-01 13:41:38 +07:00
parent 81985f44bd
commit 6cc6d49a10
3 changed files with 4 additions and 4 deletions

View File

@@ -281,7 +281,7 @@ func (h *cryptoSetupServer) verifySTK(stk []byte) bool {
utils.Debugf("STK invalid: %s", err.Error())
return false
}
if time.Now().After(stkTime.Add(protocol.STKExpiryTimeSec * time.Second)) {
if time.Now().After(stkTime.Add(protocol.STKExpiryTime)) {
return false
}
return true