Changeset 03d430b for router


Ignore:
Timestamp:
Jun 19, 2018 10:31:02 AM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4cd9fe7
Parents:
5592992
Message:

SSU: Catch ISE

Location:
router/java/src/net/i2p/router
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterVersion.java

    r5592992 r03d430b  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 20;
     21    public final static long BUILD = 21;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java

    r5592992 r03d430b  
    181181    public synchronized void generateSessionKey() throws DHSessionKeyBuilder.InvalidPublicParameterException {
    182182        if (_sessionKey != null) return;
    183         _keyBuilder.setPeerPublicValue(_receivedX);
     183        try {
     184            _keyBuilder.setPeerPublicValue(_receivedX);
     185        } catch (IllegalStateException ise) {
     186            throw new DHSessionKeyBuilder.InvalidPublicParameterException("reused keys?", ise);
     187        }
    184188        _sessionKey = _keyBuilder.getSessionKey();
    185189        ByteArray extra = _keyBuilder.getExtraBytes();
  • router/java/src/net/i2p/router/transport/udp/OutboundEstablishState.java

    r5592992 r03d430b  
    384384        if (_keyBuilder == null)
    385385            throw new DHSessionKeyBuilder.InvalidPublicParameterException("Illegal state - never generated a key builder");
    386         _keyBuilder.setPeerPublicValue(_receivedY);
     386        try {
     387            _keyBuilder.setPeerPublicValue(_receivedY);
     388        } catch (IllegalStateException ise) {
     389            throw new DHSessionKeyBuilder.InvalidPublicParameterException("reused keys?", ise);
     390        }
    387391        _sessionKey = _keyBuilder.getSessionKey();
    388392        ByteArray extra = _keyBuilder.getExtraBytes();
Note: See TracChangeset for help on using the changeset viewer.