Changeset c92c664
- Timestamp:
- Dec 13, 2011 8:38:02 PM (9 years ago)
- Branches:
- master
- Children:
- 60297f56
- Parents:
- 24c1473
- Location:
- router/java/src/net/i2p/router/message
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/message/CloveSet.java
r24c1473 rc92c664 20 20 */ 21 21 class CloveSet { 22 private final List _cloves;22 private final List<GarlicClove> _cloves; 23 23 private Certificate _cert; 24 24 private long _msgId; … … 33 33 public int getCloveCount() { return _cloves.size(); } 34 34 public void addClove(GarlicClove clove) { _cloves.add(clove); } 35 public GarlicClove getClove(int index) { return (GarlicClove)_cloves.get(index); }35 public GarlicClove getClove(int index) { return _cloves.get(index); } 36 36 37 37 public Certificate getCertificate() { return _cert; } … … 47 47 buf.append("{"); 48 48 for (int i = 0; i < _cloves.size(); i++) { 49 GarlicClove clove = (GarlicClove)_cloves.get(i);49 GarlicClove clove = _cloves.get(i); 50 50 if (clove.getData() != null) 51 51 buf.append(clove.getData().getClass().getName()).append(", "); -
router/java/src/net/i2p/router/message/GarlicConfig.java
r24c1473 rc92c664 28 28 private long _id; 29 29 private long _expiration; 30 private final List _cloveConfigs;30 private final List<GarlicConfig> _cloveConfigs; 31 31 private DeliveryInstructions _instructions; 32 32 private boolean _requestAck; … … 143 143 } 144 144 public int getCloveCount() { return _cloveConfigs.size(); } 145 public GarlicConfig getClove(int index) { return (GarlicConfig)_cloveConfigs.get(index); }145 public GarlicConfig getClove(int index) { return _cloveConfigs.get(index); } 146 146 public void clearCloves() { _cloveConfigs.clear(); } 147 147 -
router/java/src/net/i2p/router/message/GarlicMessageParser.java
r24c1473 rc92c664 47 47 } 48 48 if (decrData == null) { 49 if (_log.shouldLog(Log.WARN)) 50 _log.warn("Decryption of garlic message failed", new Exception("Decrypt fail")); 49 // This is the usual error path and it's logged at WARN level in GarlicMessageReceiver 50 if (_log.shouldLog(Log.INFO)) 51 _log.info("Decryption of garlic message failed", new Exception("Decrypt fail")); 51 52 return null; 52 53 } else { … … 79 80 _log.debug("After reading clove " + i); 80 81 } 81 Certificate cert = new Certificate(); 82 offset += cert.readBytes(data, offset); 82 //Certificate cert = new Certificate(); 83 //offset += cert.readBytes(data, offset); 84 Certificate cert = Certificate.create(data, offset); 85 offset += cert.size(); 83 86 long msgId = DataHelper.fromLong(data, offset, 4); 84 87 offset += 4; 85 88 Date expiration = DataHelper.fromDate(data, offset); 86 offset += DataHelper.DATE_LENGTH;87 89 88 90 set.setCertificate(cert);
Note: See TracChangeset
for help on using the changeset viewer.