added warning about keys tht are out of range when checking a msg signature

This commit is contained in:
csoler 2020-05-09 21:30:07 +02:00
parent 0c3b8641af
commit df2899bae9
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -419,10 +419,8 @@ bool GxsSecurity::validateNxsMsg(const RsNxsMsg& msg, const RsTlvKeySignature& s
/* check signature timeperiod */ /* check signature timeperiod */
if ((msgMeta.mPublishTs < key.startTS) || (key.endTS != 0 && msgMeta.mPublishTs > key.endTS)) if ((msgMeta.mPublishTs < key.startTS) || (key.endTS != 0 && msgMeta.mPublishTs > key.endTS))
{ {
#ifdef GXS_SECURITY_DEBUG RsWarn() << __PRETTY_FUNCTION__ << " GxsSecurity::validateNxsMsg() TS out of range for key " << msgMeta.mAuthorId
std::cerr << " GxsSecurity::validateNxsMsg() TS out of range"; << " usage is limited to TS=[" << key.startTS << "," << key.endTS << "] and msg publish time is " << msgMeta.mPublishTs << std::endl;
std::cerr << std::endl;
#endif
return false; return false;
} }