From df2899bae943e4e37d9534813f702eae77eab633 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 9 May 2020 21:30:07 +0200 Subject: [PATCH] added warning about keys tht are out of range when checking a msg signature --- libretroshare/src/gxs/gxssecurity.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/gxs/gxssecurity.cc b/libretroshare/src/gxs/gxssecurity.cc index 608e938fc..1a2d115c8 100644 --- a/libretroshare/src/gxs/gxssecurity.cc +++ b/libretroshare/src/gxs/gxssecurity.cc @@ -419,10 +419,8 @@ bool GxsSecurity::validateNxsMsg(const RsNxsMsg& msg, const RsTlvKeySignature& s /* check signature timeperiod */ if ((msgMeta.mPublishTs < key.startTS) || (key.endTS != 0 && msgMeta.mPublishTs > key.endTS)) { - #ifdef GXS_SECURITY_DEBUG - std::cerr << " GxsSecurity::validateNxsMsg() TS out of range"; - std::cerr << std::endl; - #endif + RsWarn() << __PRETTY_FUNCTION__ << " GxsSecurity::validateNxsMsg() TS out of range for key " << msgMeta.mAuthorId + << " usage is limited to TS=[" << key.startTS << "," << key.endTS << "] and msg publish time is " << msgMeta.mPublishTs << std::endl; return false; }