Changeset 4fe2479


Ignore:
Timestamp:
Dec 12, 2015 11:14:39 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
fee755b
Parents:
68ecd82
Message:

RouterInfo?: Log the full RI, not the hash of the data
(which is useless) on signature verification fail,
in an attempt to find the culprit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/data/router/RouterInfo.java

    r68ecd82 r4fe2479  
    488488        if (!_isValid) {
    489489            Log log = I2PAppContext.getGlobalContext().logManager().getLog(RouterInfo.class);
    490             byte data[] = null;
    491             try {
    492                 data = getBytes();
    493             } catch (DataFormatException dfe) {
    494                 log.error("Error validating", dfe);
    495                 return;
    496             }
    497             log.error("Invalid [" + SHA256Generator.getInstance().calculateHash(data).toBase64()
    498                            + (log.shouldLog(Log.WARN) ? ("]\n" + toString()) : ""),
    499                            new Exception("Signature failed"));
     490            // TODO change to warn
     491            //if (log.shouldWarn()) {
     492                log.error("Sig verify fail: " + toString(), new Exception("from"));
     493            //}
    500494        }
    501495    }
Note: See TracChangeset for help on using the changeset viewer.