Changeset 0d330ca for core


Ignore:
Timestamp:
Jan 10, 2019 1:39:18 PM (17 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e02a0df
Parents:
8cd7e7d
Message:

I2CP: Basic router-side handling of meta LS2
Improve error handling of LS2 params client-side
Methods to remember blinded key in LS2

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

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java

    r8cd7e7d r0d330ca  
    104104            } catch (NumberFormatException nfe) {
    105105              session.propogateError("Bad LS2 type", nfe);
     106              session.destroySession();
    106107              return true;
    107108            }
     
    125126            } else {
    126127              session.propogateError("Unsupported LS2 type", new Exception());
     128              session.destroySession();
    127129              return;
    128130            }
     
    285287            if (!ok) {
    286288                session.propogateError("Bad offline signature", new Exception());
    287                 // TODO just let the router handle it for now
     289                session.destroySession();
    288290            }
    289291        }
     
    307309        } catch (DataFormatException dfe) {
    308310            session.propogateError("Error signing the leaseSet", dfe);
     311            session.destroySession();
    309312        } catch (I2PSessionException ise) {
    310313            if (session.isClosed()) {
  • core/java/src/net/i2p/client/impl/RequestVariableLeaseSetMessageHandler.java

    r8cd7e7d r0d330ca  
    5151            } else {
    5252              session.propogateError("Unsupported LS2 type", new Exception());
     53              session.destroySession();
    5354              return;
    5455            }
  • core/java/src/net/i2p/data/LeaseSet2.java

    r8cd7e7d r0d330ca  
    4040    // only used if more than one key, otherwise null
    4141    private List<PublicKey> _encryptionKeys;
     42    // If this leaseset was formerly blinded, the blinded hash, so we can find it again
     43    private Hash _blindedHash;
    4244
    4345    private static final int FLAG_OFFLINE_KEYS = 1;
     
    181183        byte[] data = baos.toByteArray();
    182184        return ctx.dsa().verifySignature(_offlineSignature, data, 0, data.length, getSigningPublicKey());
     185    }
     186
     187    /**
     188     * Set this on creation if known
     189     */
     190    public void setBlindedHash(Hash bh) {
     191        _blindedHash = bh;
     192    }
     193
     194    /**
     195     * The orignal blinded hash, where this came from.
     196     * @return null if unknown or not previously blinded
     197     */
     198    public Hash getBlindedHash() {
     199        return _blindedHash;
    183200    }
    184201
Note: See TracChangeset for help on using the changeset viewer.