Otherwise there's no point in keeping around old service tickets.
To prevent really old tickets from working, we need to rotate
keys. We want slightly old ones to still work, though.. that's
why we keep 3.
return false;
}
- ExpiringCryptoKey& key = iter->second;
- if (key.expiration > g_clock.now()) {
- secret = key.key;
- return true;
- }
- dout(0) << "secret " << key << " expired!" << dendl;
- return false;
+ secret = iter->second.key;
+ return true;
}